]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: add 1.75 to known versions
authorKefu Chai <kchai@redhat.com>
Thu, 18 Mar 2021 13:08:08 +0000 (21:08 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 19 Mar 2021 12:35:51 +0000 (20:35 +0800)
sync with
https://github.com/Kitware/CMake/blob/507710438d6033011cf980dc8a3c739b8bc1bb1c/Modules/FindBoost.cmake

for v1.75 support

Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/FindBoost.cmake

index 824e5fdb77ecd918acef99ea49c9241b5eef6359..3080062526b4c67f4fc2c0087fd69259988c1ef0 100644 (file)
@@ -7,7 +7,9 @@ FindBoost
 
 Find Boost include dirs and libraries
 
-Use this module by invoking find_package with the form::
+Use this module by invoking :command:`find_package` with the form:
+
+.. code-block:: cmake
 
   find_package(Boost
     [version] [EXACT]      # Minimum or EXACT version e.g. 1.67.0
@@ -20,97 +22,134 @@ Use this module by invoking find_package with the form::
 
 This module finds headers and requested component libraries OR a CMake
 package configuration file provided by a "Boost CMake" build.  For the
-latter case skip to the "Boost CMake" section below.  For the former
-case results are reported in variables::
-
-  Boost_FOUND            - True if headers and requested libraries were found
-  Boost_INCLUDE_DIRS     - Boost include directories
-  Boost_LIBRARY_DIRS     - Link directories for Boost libraries
-  Boost_LIBRARIES        - Boost component libraries to be linked
-  Boost_<C>_FOUND        - True if component <C> was found (<C> is upper-case)
-  Boost_<C>_LIBRARY      - Libraries to link for component <C> (may include
-                           target_link_libraries debug/optimized keywords)
-  Boost_VERSION_MACRO    - BOOST_VERSION value from boost/version.hpp
-  Boost_VERSION_STRING   - Boost version number in x.y.z format
-  Boost_VERSION          - if CMP0093 NEW => same as Boost_VERSION_STRING
-                           if CMP0093 OLD or unset => same as Boost_VERSION_MACRO
-  Boost_LIB_VERSION      - Version string appended to library filenames
-  Boost_VERSION_MAJOR    - Boost major version number (X in X.y.z)
-                           alias: Boost_MAJOR_VERSION
-  Boost_VERSION_MINOR    - Boost minor version number (Y in x.Y.z)
-                           alias: Boost_MINOR_VERSION
-  Boost_VERSION_PATCH    - Boost subminor version number (Z in x.y.Z)
-                           alias: Boost_SUBMINOR_VERSION
-  Boost_VERSION_COUNT    - Amount of version components (3)
-  Boost_LIB_DIAGNOSTIC_DEFINITIONS (Windows)
-                         - Pass to add_definitions() to have diagnostic
-                           information about Boost's automatic linking
-                           displayed during compilation
-
-Note that Boost Python components require a Python version suffix
-(Boost 1.67 and later), e.g. ``python36`` or ``python27`` for the
-versions built against Python 3.6 and 2.7, respectively.  This also
-applies to additional components using Python including
-``mpi_python`` and ``numpy``.  Earlier Boost releases may use
-distribution-specific suffixes such as ``2``, ``3`` or ``2.7``.
-These may also be used as suffixes, but note that they are not
-portable.
-
-This module reads hints about search locations from variables::
-
-  BOOST_ROOT             - Preferred installation prefix
-   (or BOOSTROOT)
-  BOOST_INCLUDEDIR       - Preferred include directory e.g. <prefix>/include
-  BOOST_LIBRARYDIR       - Preferred library directory e.g. <prefix>/lib
-  Boost_NO_SYSTEM_PATHS  - Set to ON to disable searching in locations not
-                           specified by these hint variables. Default is OFF.
-  Boost_ADDITIONAL_VERSIONS
-                         - List of Boost versions not known to this module
-                           (Boost install locations may contain the version)
-
-and saves search results persistently in CMake cache entries::
-
-  Boost_INCLUDE_DIR         - Directory containing Boost headers
-  Boost_LIBRARY_DIR_RELEASE - Directory containing release Boost libraries
-  Boost_LIBRARY_DIR_DEBUG   - Directory containing debug Boost libraries
-  Boost_<C>_LIBRARY_DEBUG   - Component <C> library debug variant
-  Boost_<C>_LIBRARY_RELEASE - Component <C> library release variant
-
-The following :prop_tgt:`IMPORTED` targets are also defined::
-
-  Boost::headers                - Target for header-only dependencies
-                                  (Boost include directory)
-                                  alias: Boost::boost
-  Boost::<C>                    - Target for specific component dependency
-                                  (shared or static library); <C> is lower-
-                                  case
-  Boost::diagnostic_definitions - interface target to enable diagnostic
-                                  information about Boost's automatic linking
-                                  during compilation (adds BOOST_LIB_DIAGNOSTIC)
-  Boost::disable_autolinking    - interface target to disable automatic
-                                  linking with MSVC (adds BOOST_ALL_NO_LIB)
-  Boost::dynamic_linking        - interface target to enable dynamic linking
-                                  linking with MSVC (adds BOOST_ALL_DYN_LINK)
+latter case skip to the :ref:`Boost CMake` section below.
 
-Implicit dependencies such as ``Boost::filesystem`` requiring
-``Boost::system`` will be automatically detected and satisfied, even
-if system is not specified when using :command:`find_package` and if
-``Boost::system`` is not added to :command:`target_link_libraries`.  If using
-``Boost::thread``, then ``Threads::Threads`` will also be added automatically.
+.. versionadded:: 3.7
+  ``bzip2`` and ``zlib`` components (Windows only).
 
-It is important to note that the imported targets behave differently
-than variables created by this module: multiple calls to
-:command:`find_package(Boost)` in the same directory or sub-directories with
-different options (e.g. static or shared) will not override the
-values of the targets created by the first call.
+.. versionadded:: 3.11
+  The ``OPTIONAL_COMPONENTS`` option.
+
+.. versionadded:: 3.13
+  ``stacktrace_*`` components.
+
+.. versionadded:: 3.19
+  ``bzip2`` and ``zlib`` components on all platforms.
+
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module defines the following variables:
+
+``Boost_FOUND``
+  True if headers and requested libraries were found.
+
+``Boost_INCLUDE_DIRS``
+  Boost include directories.
+
+``Boost_LIBRARY_DIRS``
+  Link directories for Boost libraries.
+
+``Boost_LIBRARIES``
+  Boost component libraries to be linked.
+
+``Boost_<COMPONENT>_FOUND``
+  True if component ``<COMPONENT>`` was found (``<COMPONENT>`` name is upper-case).
+
+``Boost_<COMPONENT>_LIBRARY``
+  Libraries to link for component ``<COMPONENT>`` (may include
+  :command:`target_link_libraries` debug/optimized keywords).
+
+``Boost_VERSION_MACRO``
+  ``BOOST_VERSION`` value from ``boost/version.hpp``.
+
+``Boost_VERSION_STRING``
+  Boost version number in ``X.Y.Z`` format.
+
+``Boost_VERSION``
+  Boost version number in ``X.Y.Z`` format (same as ``Boost_VERSION_STRING``).
+
+  .. versionchanged:: 3.15
+    In previous CMake versions, this variable used the raw version string
+    from the Boost header (same as ``Boost_VERSION_MACRO``).
+    See policy :policy:`CMP0093`.
+
+``Boost_LIB_VERSION``
+  Version string appended to library filenames.
+
+``Boost_VERSION_MAJOR``, ``Boost_MAJOR_VERSION``
+  Boost major version number (``X`` in ``X.Y.Z``).
+
+``Boost_VERSION_MINOR``, ``Boost_MINOR_VERSION``
+  Boost minor version number (``Y`` in ``X.Y.Z``).
+
+``Boost_VERSION_PATCH``, ``Boost_SUBMINOR_VERSION``
+  Boost subminor version number (``Z`` in ``X.Y.Z``).
+
+``Boost_VERSION_COUNT``
+  Amount of version components (3).
+
+``Boost_LIB_DIAGNOSTIC_DEFINITIONS`` (Windows-specific)
+  Pass to :command:`add_definitions` to have diagnostic
+  information about Boost's automatic linking
+  displayed during compilation
+
+.. versionadded:: 3.15
+  The ``Boost_VERSION_<PART>`` variables.
+
+Cache variables
+^^^^^^^^^^^^^^^
+
+Search results are saved persistently in CMake cache entries:
+
+``Boost_INCLUDE_DIR``
+  Directory containing Boost headers.
+
+``Boost_LIBRARY_DIR_RELEASE``
+  Directory containing release Boost libraries.
+
+``Boost_LIBRARY_DIR_DEBUG``
+  Directory containing debug Boost libraries.
+
+``Boost_<COMPONENT>_LIBRARY_DEBUG``
+  Component ``<COMPONENT>`` library debug variant.
+
+``Boost_<COMPONENT>_LIBRARY_RELEASE``
+  Component ``<COMPONENT>`` library release variant.
+
+.. versionadded:: 3.3
+  Per-configuration variables ``Boost_LIBRARY_DIR_RELEASE`` and
+  ``Boost_LIBRARY_DIR_DEBUG``.
+
+Hints
+^^^^^
+
+This module reads hints about search locations from variables:
+
+``BOOST_ROOT``, ``BOOSTROOT``
+  Preferred installation prefix.
+
+``BOOST_INCLUDEDIR``
+  Preferred include directory e.g. ``<prefix>/include``.
+
+``BOOST_LIBRARYDIR``
+  Preferred library directory e.g. ``<prefix>/lib``.
+
+``Boost_NO_SYSTEM_PATHS``
+  Set to ``ON`` to disable searching in locations not
+  specified by these hint variables. Default is ``OFF``.
+
+``Boost_ADDITIONAL_VERSIONS``
+  List of Boost versions not known to this module.
+  (Boost install locations may contain the version).
 
 Users may set these hints or results as ``CACHE`` entries.  Projects
 should not read these entries directly but instead use the above
 result variables.  Note that some hint names start in upper-case
-"BOOST".  One may specify these as environment variables if they are
+``BOOST``.  One may specify these as environment variables if they are
 not specified as CMake variables or cache entries.
 
-This module first searches for the ``Boost`` header files using the above
+This module first searches for the Boost header files using the above
 hint variables (excluding ``BOOST_LIBRARYDIR``) and saves the result in
 ``Boost_INCLUDE_DIR``.  Then it searches for requested component libraries
 using the above hints (excluding ``BOOST_INCLUDEDIR`` and
@@ -118,83 +157,170 @@ using the above hints (excluding ``BOOST_INCLUDEDIR`` and
 and the library name configuration settings below.  It saves the
 library directories in ``Boost_LIBRARY_DIR_DEBUG`` and
 ``Boost_LIBRARY_DIR_RELEASE`` and individual library
-locations in ``Boost_<C>_LIBRARY_DEBUG`` and ``Boost_<C>_LIBRARY_RELEASE``.
+locations in ``Boost_<COMPONENT>_LIBRARY_DEBUG`` and ``Boost_<COMPONENT>_LIBRARY_RELEASE``.
 When one changes settings used by previous searches in the same build
 tree (excluding environment variables) this module discards previous
 search results affected by the changes and searches again.
 
+Imported Targets
+^^^^^^^^^^^^^^^^
+
+.. versionadded:: 3.5
+
+This module defines the following :prop_tgt:`IMPORTED` targets:
+
+``Boost::boost``
+  Target for header-only dependencies. (Boost include directory).
+
+``Boost::headers``
+  .. versionadded:: 3.15
+    Alias for ``Boost::boost``.
+
+``Boost::<component>``
+  Target for specific component dependency (shared or static library);
+  ``<component>`` name is lower-case.
+
+``Boost::diagnostic_definitions``
+  Interface target to enable diagnostic information about Boost's automatic
+  linking during compilation (adds ``-DBOOST_LIB_DIAGNOSTIC``).
+
+``Boost::disable_autolinking``
+  Interface target to disable automatic linking with MSVC
+  (adds ``-DBOOST_ALL_NO_LIB``).
+
+``Boost::dynamic_linking``
+  Interface target to enable dynamic linking with MSVC
+  (adds ``-DBOOST_ALL_DYN_LINK``).
+
+Implicit dependencies such as ``Boost::filesystem`` requiring
+``Boost::system`` will be automatically detected and satisfied, even
+if system is not specified when using :command:`find_package` and if
+``Boost::system`` is not added to :command:`target_link_libraries`.  If using
+``Boost::thread``, then ``Threads::Threads`` will also be added automatically.
+
+It is important to note that the imported targets behave differently
+than variables created by this module: multiple calls to
+:command:`find_package(Boost)` in the same directory or sub-directories with
+different options (e.g. static or shared) will not override the
+values of the targets created by the first call.
+
+Other Variables
+^^^^^^^^^^^^^^^
+
 Boost libraries come in many variants encoded in their file name.
 Users or projects may tell this module which variant to find by
-setting variables::
-
-  Boost_USE_DEBUG_LIBS     - Set to ON or OFF to specify whether to search
-                             and use the debug libraries.  Default is ON.
-  Boost_USE_RELEASE_LIBS   - Set to ON or OFF to specify whether to search
-                             and use the release libraries.  Default is ON.
-  Boost_USE_MULTITHREADED  - Set to OFF to use the non-multithreaded
-                             libraries ('mt' tag).  Default is ON.
-  Boost_USE_STATIC_LIBS    - Set to ON to force the use of the static
-                             libraries.  Default is OFF.
-  Boost_USE_STATIC_RUNTIME - Set to ON or OFF to specify whether to use
-                             libraries linked statically to the C++ runtime
-                             ('s' tag).  Default is platform dependent.
-  Boost_USE_DEBUG_RUNTIME  - Set to ON or OFF to specify whether to use
-                             libraries linked to the MS debug C++ runtime
-                             ('g' tag).  Default is ON.
-  Boost_USE_DEBUG_PYTHON   - Set to ON to use libraries compiled with a
-                             debug Python build ('y' tag). Default is OFF.
-  Boost_USE_STLPORT        - Set to ON to use libraries compiled with
-                             STLPort ('p' tag).  Default is OFF.
-  Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
-                           - Set to ON to use libraries compiled with
-                             STLPort deprecated "native iostreams"
-                             ('n' tag).  Default is OFF.
-  Boost_COMPILER           - Set to the compiler-specific library suffix
-                             (e.g. "-gcc43").  Default is auto-computed
-                             for the C++ compiler in use.  A list may be
-                             used if multiple compatible suffixes should
-                             be tested for, in decreasing order of
-                             preference.
-  Boost_LIB_PREFIX         - Set to the platform-specific library name
-                             prefix (e.g. "lib") used by Boost static libs.
-                             This is needed only on platforms where CMake
-                             does not know the prefix by default.
-  Boost_ARCHITECTURE       - Set to the architecture-specific library suffix
-                             (e.g. "-x64").  Default is auto-computed for the
-                             C++ compiler in use.
-  Boost_THREADAPI          - Suffix for "thread" component library name,
-                             such as "pthread" or "win32".  Names with
-                             and without this suffix will both be tried.
-  Boost_NAMESPACE          - Alternate namespace used to build boost with
-                             e.g. if set to "myboost", will search for
-                             myboost_thread instead of boost_thread.
-
-Other variables one may set to control this module are::
-
-  Boost_DEBUG              - Set to ON to enable debug output from FindBoost.
-                             Please enable this before filing any bug report.
-  Boost_REALPATH           - Set to ON to resolve symlinks for discovered
-                             libraries to assist with packaging.  For example,
-                             the "system" component library may be resolved to
-                             "/usr/lib/libboost_system.so.1.67.0" instead of
-                             "/usr/lib/libboost_system.so".  This does not
-                             affect linking and should not be enabled unless
-                             the user needs this information.
-  Boost_LIBRARY_DIR        - Default value for Boost_LIBRARY_DIR_RELEASE and
-                             Boost_LIBRARY_DIR_DEBUG.
+setting variables:
+
+``Boost_USE_DEBUG_LIBS``
+  .. versionadded:: 3.10
+
+  Set to ``ON`` or ``OFF`` to specify whether to search and use the debug
+  libraries.  Default is ``ON``.
+
+``Boost_USE_RELEASE_LIBS``
+  .. versionadded:: 3.10
+
+  Set to ``ON`` or ``OFF`` to specify whether to search and use the release
+  libraries.  Default is ``ON``.
+
+``Boost_USE_MULTITHREADED``
+  Set to OFF to use the non-multithreaded libraries ("mt" tag). Default is
+  ``ON``.
+
+``Boost_USE_STATIC_LIBS``
+  Set to ON to force the use of the static libraries.  Default is ``OFF``.
+
+``Boost_USE_STATIC_RUNTIME``
+  Set to ``ON`` or ``OFF`` to specify whether to use libraries linked
+  statically to the C++ runtime ("s" tag).  Default is platform dependent.
+
+``Boost_USE_DEBUG_RUNTIME``
+  Set to ``ON`` or ``OFF`` to specify whether to use libraries linked to the
+  MS debug C++ runtime ("g" tag).  Default is ``ON``.
+
+``Boost_USE_DEBUG_PYTHON``
+  Set to ``ON`` to use libraries compiled with a debug Python build ("y"
+  tag).  Default is ``OFF``.
+
+``Boost_USE_STLPORT``
+  Set to ``ON`` to use libraries compiled with STLPort ("p" tag). Default is
+  ``OFF``.
+
+``Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS``
+  Set to ON to use libraries compiled with STLPort deprecated "native
+  iostreams" ("n" tag).  Default is ``OFF``.
+
+``Boost_COMPILER``
+  Set to the compiler-specific library suffix (e.g. ``-gcc43``).  Default is
+  auto-computed for the C++ compiler in use.
+
+  .. versionchanged:: 3.9
+    A list may be used if multiple compatible suffixes should be tested for,
+    in decreasing order of preference.
+
+``Boost_LIB_PREFIX``
+  .. versionadded:: 3.18
+
+  Set to the platform-specific library name prefix (e.g. ``lib``) used by
+  Boost static libs.  This is needed only on platforms where CMake does not
+  know the prefix by default.
+
+``Boost_ARCHITECTURE``
+  .. versionadded:: 3.13
+
+  Set to the architecture-specific library suffix (e.g. ``-x64``).
+  Default is auto-computed for the C++ compiler in use.
+
+``Boost_THREADAPI``
+  Suffix for ``thread`` component library name, such as ``pthread`` or
+  ``win32``.  Names with and without this suffix will both be tried.
+
+``Boost_NAMESPACE``
+  Alternate namespace used to build boost with e.g. if set to ``myboost``,
+  will search for ``myboost_thread`` instead of ``boost_thread``.
+
+Other variables one may set to control this module are:
+
+``Boost_DEBUG``
+  Set to ``ON`` to enable debug output from ``FindBoost``.
+  Please enable this before filing any bug report.
+
+``Boost_REALPATH``
+  Set to ``ON`` to resolve symlinks for discovered libraries to assist with
+  packaging.  For example, the "system" component library may be resolved to
+  ``/usr/lib/libboost_system.so.1.67.0`` instead of
+  ``/usr/lib/libboost_system.so``.  This does not affect linking and should
+  not be enabled unless the user needs this information.
+
+``Boost_LIBRARY_DIR``
+  Default value for ``Boost_LIBRARY_DIR_RELEASE`` and
+  ``Boost_LIBRARY_DIR_DEBUG``.
+
+``Boost_NO_WARN_NEW_VERSIONS``
+  .. versionadded:: 3.20
+
+  Set to ``ON`` to suppress the warning about unknown dependencies for new
+  Boost versions.
 
 On Visual Studio and Borland compilers Boost headers request automatic
 linking to corresponding libraries.  This requires matching libraries
 to be linked explicitly or available in the link library search path.
 In this case setting ``Boost_USE_STATIC_LIBS`` to ``OFF`` may not achieve
 dynamic linking.  Boost automatic linking typically requests static
-libraries with a few exceptions (such as ``Boost.Python``).  Use::
+libraries with a few exceptions (such as ``Boost.Python``).  Use:
+
+.. code-block:: cmake
 
   add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
 
 to ask Boost to report information about automatic linking requests.
 
-Example to find Boost headers only::
+Examples
+^^^^^^^^
+
+Find Boost headers only:
+
+.. code-block:: cmake
 
   find_package(Boost 1.36.0)
   if(Boost_FOUND)
@@ -202,7 +328,9 @@ Example to find Boost headers only::
     add_executable(foo foo.cc)
   endif()
 
-Example to find Boost libraries and use imported targets::
+Find Boost libraries and use imported targets:
+
+.. code-block:: cmake
 
   find_package(Boost 1.56 REQUIRED COMPONENTS
                date_time filesystem iostreams)
@@ -210,17 +338,21 @@ Example to find Boost libraries and use imported targets::
   target_link_libraries(foo Boost::date_time Boost::filesystem
                             Boost::iostreams)
 
-Example to find Boost Python 3.6 libraries and use imported targets::
+Find Boost Python 3.6 libraries and use imported targets:
+
+.. code-block:: cmake
 
   find_package(Boost 1.67 REQUIRED COMPONENTS
                python36 numpy36)
   add_executable(foo foo.cc)
   target_link_libraries(foo Boost::python36 Boost::numpy36)
 
-Example to find Boost headers and some *static* (release only) libraries::
+Find Boost headers and some *static* (release only) libraries:
+
+.. code-block:: cmake
 
   set(Boost_USE_STATIC_LIBS        ON)  # only find static libs
-  set(Boost_USE_DEBUG_LIBS         OFF) # ignore debug libs and
+  set(Boost_USE_DEBUG_LIBS        OFF)  # ignore debug libs and
   set(Boost_USE_RELEASE_LIBS       ON)  # only find release libs
   set(Boost_USE_MULTITHREADED      ON)
   set(Boost_USE_STATIC_RUNTIME    OFF)
@@ -231,6 +363,8 @@ Example to find Boost headers and some *static* (release only) libraries::
     target_link_libraries(foo ${Boost_LIBRARIES})
   endif()
 
+.. _`Boost CMake`:
+
 Boost CMake
 ^^^^^^^^^^^
 
@@ -238,7 +372,7 @@ If Boost was built using the boost-cmake project or from Boost 1.70.0 on
 it provides a package configuration file for use with find_package's config mode.
 This module looks for the package configuration file called
 ``BoostConfig.cmake`` or ``boost-config.cmake`` and stores the result in
-``CACHE`` entry "Boost_DIR".  If found, the package configuration file is loaded
+``CACHE`` entry ``Boost_DIR``.  If found, the package configuration file is loaded
 and this module returns with no further action.  See documentation of
 the Boost CMake package configuration for details on what it provides.
 
@@ -247,14 +381,12 @@ Set ``Boost_NO_BOOST_CMAKE`` to ``ON``, to disable the search for boost-cmake.
 
 # The FPHSA helper provides standard way of reporting final search results to
 # the user including the version and component checks.
-include(FindPackageHandleStandardArgs)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
 
 # Save project's policies
 cmake_policy(PUSH)
 cmake_policy(SET CMP0057 NEW) # if IN_LIST
-if(POLICY CMP0102)
-  cmake_policy(SET CMP0102 NEW) # if mark_as_advanced(non_cache_var)
-endif()
+cmake_policy(SET CMP0102 NEW) # if mark_as_advanced(non_cache_var)
 
 function(_boost_get_existing_target component target_var)
   set(names "${component}")
@@ -307,7 +439,7 @@ function(_boost_get_canonical_target_name component target_var)
 endfunction()
 
 macro(_boost_set_in_parent_scope name value)
-  # Set a variable in parent scope and make it visibile in current scope
+  # Set a variable in parent scope and make it visible in current scope
   set(${name} "${value}" PARENT_SCOPE)
   set(${name} "${value}")
 endmacro()
@@ -452,15 +584,19 @@ if (NOT Boost_NO_BOOST_CMAKE)
   # Do the same find_package call but look specifically for the CMake version.
   # Note that args are passed in the Boost_FIND_xxxxx variables, so there is no
   # need to delegate them to this find_package call.
-  cmake_policy(PUSH)
   if(BOOST_ROOT AND NOT Boost_ROOT)
-    if(POLICY CMP0074)
-      cmake_policy(SET CMP0074 NEW)
-    endif()
+    # Honor BOOST_ROOT by setting Boost_ROOT with CMP0074 NEW behavior.
+    cmake_policy(PUSH)
+    cmake_policy(SET CMP0074 NEW)
     set(Boost_ROOT "${BOOST_ROOT}")
+    set(_Boost_ROOT_FOR_CONFIG 1)
   endif()
   find_package(Boost QUIET NO_MODULE ${_boost_FIND_PACKAGE_ARGS})
-  cmake_policy(POP)
+  if(_Boost_ROOT_FOR_CONFIG)
+    unset(_Boost_ROOT_FOR_CONFIG)
+    unset(Boost_ROOT)
+    cmake_policy(POP)
+  endif()
   if (DEFINED Boost_DIR)
     mark_as_advanced(Boost_DIR)
   endif ()
@@ -723,7 +859,8 @@ endfunction()
 # Guesses Boost's compiler prefix used in built library names
 # Returns the guess by setting the variable pointed to by _ret
 function(_Boost_GUESS_COMPILER_PREFIX _ret)
-  if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntel")
+  if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntel"
+      OR "x${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "xIntelLLVM")
     if(WIN32)
       set (_boost_COMPILER "-iw")
     else()
@@ -1184,11 +1321,26 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
       set(_Boost_TIMER_DEPENDENCIES chrono)
       set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic)
       set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.75.0)
+      set(_Boost_CONTRACT_DEPENDENCIES thread chrono date_time)
+      set(_Boost_COROUTINE_DEPENDENCIES context)
+      set(_Boost_FIBER_DEPENDENCIES context)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_LOG_DEPENDENCIES date_time log_setup filesystem thread regex chrono atomic)
+      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+      set(_Boost_MPI_DEPENDENCIES serialization)
+      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+      set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
+      set(_Boost_THREAD_DEPENDENCIES chrono date_time atomic)
+      set(_Boost_TIMER_DEPENDENCIES chrono)
+      set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
     else()
       set(_Boost_CONTRACT_DEPENDENCIES thread chrono date_time)
       set(_Boost_COROUTINE_DEPENDENCIES context)
       set(_Boost_FIBER_DEPENDENCIES context)
       set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_JSON_DEPENDENCIES container)
       set(_Boost_LOG_DEPENDENCIES date_time log_setup filesystem thread regex chrono atomic)
       set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
       set(_Boost_MPI_DEPENDENCIES serialization)
@@ -1198,7 +1350,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
       set(_Boost_TIMER_DEPENDENCIES chrono)
       set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic)
       set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-      if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.75.0)
+      if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.76.0 AND NOT Boost_NO_WARN_NEW_VERSIONS)
         message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
       endif()
     endif()
@@ -1470,7 +1622,7 @@ else()
   # _Boost_COMPONENT_HEADERS.  See the instructions at the top of
   # _Boost_COMPONENT_DEPENDENCIES.
   set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
-    "1.74.0" "1.74"
+    "1.75.0" "1.75" "1.74.0" "1.74"
     "1.73.0" "1.73" "1.72.0" "1.72" "1.71.0" "1.71" "1.70.0" "1.70" "1.69.0" "1.69"
     "1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
     "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
@@ -1509,13 +1661,11 @@ _Boost_DEBUG_PRINT_VAR("${CMAKE_CURRENT_LIST_FILE}" "${CMAKE_CURRENT_LIST_LINE}"
 _Boost_DEBUG_PRINT_VAR("${CMAKE_CURRENT_LIST_FILE}" "${CMAKE_CURRENT_LIST_LINE}" "Boost_ADDITIONAL_VERSIONS")
 _Boost_DEBUG_PRINT_VAR("${CMAKE_CURRENT_LIST_FILE}" "${CMAKE_CURRENT_LIST_LINE}" "Boost_NO_SYSTEM_PATHS")
 
-if(POLICY CMP0074)
-  cmake_policy(GET CMP0074 _Boost_CMP0074)
-  if(NOT "x${_Boost_CMP0074}x" STREQUAL "xNEWx")
-    _Boost_CHECK_SPELLING(Boost_ROOT)
-  endif()
-  unset(_Boost_CMP0074)
+cmake_policy(GET CMP0074 _Boost_CMP0074)
+if(NOT "x${_Boost_CMP0074}x" STREQUAL "xNEWx")
+  _Boost_CHECK_SPELLING(Boost_ROOT)
 endif()
+unset(_Boost_CMP0074)
 _Boost_CHECK_SPELLING(Boost_LIBRARYDIR)
 _Boost_CHECK_SPELLING(Boost_INCLUDEDIR)
 
@@ -1664,19 +1814,15 @@ if(Boost_INCLUDE_DIR)
   set(Boost_VERSION_STRING "${Boost_VERSION_MAJOR}.${Boost_VERSION_MINOR}.${Boost_VERSION_PATCH}")
 
   # Define final Boost_VERSION
-  if(POLICY CMP0093)
-    cmake_policy(GET CMP0093 _Boost_CMP0093
-      PARENT_SCOPE # undocumented, do not use outside of CMake
-    )
-    if("x${_Boost_CMP0093}x" STREQUAL "xNEWx")
-      set(Boost_VERSION ${Boost_VERSION_STRING})
-    else()
-      set(Boost_VERSION ${Boost_VERSION_MACRO})
-    endif()
-    unset(_Boost_CMP0093)
+  cmake_policy(GET CMP0093 _Boost_CMP0093
+    PARENT_SCOPE # undocumented, do not use outside of CMake
+  )
+  if("x${_Boost_CMP0093}x" STREQUAL "xNEWx")
+    set(Boost_VERSION ${Boost_VERSION_STRING})
   else()
     set(Boost_VERSION ${Boost_VERSION_MACRO})
   endif()
+  unset(_Boost_CMP0093)
 
   _Boost_DEBUG_PRINT_VAR("${CMAKE_CURRENT_LIST_FILE}" "${CMAKE_CURRENT_LIST_LINE}" "Boost_VERSION")
   _Boost_DEBUG_PRINT_VAR("${CMAKE_CURRENT_LIST_FILE}" "${CMAKE_CURRENT_LIST_LINE}" "Boost_VERSION_STRING")
@@ -1767,7 +1913,8 @@ endif()
 if(WIN32 AND Boost_USE_DEBUG_RUNTIME)
   if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC"
           OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang"
-          OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntel")
+          OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntel"
+          OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntelLLVM")
     string(APPEND _boost_DEBUG_ABI_TAG "g")
   endif()
 endif()