Imported Upstream version 3.17.2 upstream/3.17.2
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Oct 2021 00:20:02 +0000 (09:20 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Oct 2021 00:20:02 +0000 (09:20 +0900)
36 files changed:
Help/command/macro.rst
Help/command/target_precompile_headers.rst
Help/generator/Ninja.rst
Help/prop_sf/SKIP_PRECOMPILE_HEADERS.rst
Help/variable/CMAKE_CURRENT_FUNCTION.rst
Help/variable/CMAKE_CURRENT_FUNCTION_LIST_DIR.rst
Help/variable/CMAKE_CURRENT_FUNCTION_LIST_FILE.rst
Help/variable/CMAKE_CURRENT_FUNCTION_LIST_LINE.rst
Modules/FindBoost.cmake
Modules/FindCUDAToolkit.cmake
Modules/FindMPI.cmake
Modules/FindPython/Support.cmake
Modules/Platform/Darwin-Initialize.cmake
Source/CMakeVersion.cmake
Source/CPack/cmCPackDebGenerator.cxx
Source/CPack/cmCPackGenerator.cxx
Source/cmFileCommand.cxx
Source/cmGlobalNinjaGenerator.cxx
Source/cmGlobalNinjaGenerator.h
Source/cmLocalGenerator.cxx
Source/cmLocalGenerator.h
Source/cmLocalUnixMakefileGenerator3.cxx
Source/cmMakefileTargetGenerator.cxx
Source/cmNinjaTargetGenerator.cxx
Source/cmTarget.cxx
Tests/CMakeLists.txt
Tests/FindPython/CMakeLists.txt
Tests/FindPython/IronPython/CMakeLists.txt [new file with mode: 0644]
Tests/FindPython/IronPython2/CMakeLists.txt [new file with mode: 0644]
Tests/RunCMake/Ninja/ChangeBuildType.cmake [new file with mode: 0644]
Tests/RunCMake/Ninja/RunCMakeTest.cmake
Tests/RunCMake/PrecompileHeaders/PchMultilanguage-check.cmake
Tests/RunCMake/PrecompileHeaders/PchMultilanguage.cmake
Tests/RunCMake/PrecompileHeaders/include/foo_C.h [new file with mode: 0644]
Tests/RunCMake/PrecompileHeaders/include/foo_CXX.h [new file with mode: 0644]
Utilities/Scripts/BoostScanDeps.cmake

index 3f6f2f9..008d049 100644 (file)
@@ -95,7 +95,7 @@ Unlike a function, the :variable:`CMAKE_CURRENT_FUNCTION`,
 :variable:`CMAKE_CURRENT_FUNCTION_LIST_DIR`,
 :variable:`CMAKE_CURRENT_FUNCTION_LIST_FILE`,
 :variable:`CMAKE_CURRENT_FUNCTION_LIST_LINE` variables are not
-set for macro.
+set for macro.
 
 .. _`Argument Caveats`:
 
index 569c7eb..0d4f45a 100644 (file)
@@ -56,35 +56,34 @@ e.g. ``[["other_header.h"]]``) will be treated as is, and include directories
 must be available for the compiler to find them.  Other header file names
 (e.g. ``project_header.h``) are interpreted as being relative to the current
 source directory (e.g. :variable:`CMAKE_CURRENT_SOURCE_DIR`) and will be
-included by absolute path.
-
-Arguments to ``target_precompile_headers()`` may use "generator expressions"
-with the syntax ``$<...>``.
-See the :manual:`cmake-generator-expressions(7)` manual for available
-expressions.  See the :manual:`cmake-compile-features(7)` manual for
-information on compile features and a list of supported compilers.
-The ``$<COMPILE_LANGUAGE:...>`` generator expression is particularly
-useful for specifying a language-specific header to precompile for
-only one language (e.g. ``CXX`` and not ``C``).  For example:
+included by absolute path.  For example:
 
 .. code-block:: cmake
 
   target_precompile_headers(myTarget
     PUBLIC
       project_header.h
-      "$<$<COMPILE_LANGUAGE:CXX>:cxx_only.h>"
     PRIVATE
       [["other_header.h"]]
       <unordered_map>
   )
 
-When specifying angle brackets inside a :manual:`generator expression
-<cmake-generator-expressions(7)>`, be sure to encode the closing ``>``
-as ``$<ANGLE-R>``.  For example:
+Arguments to ``target_precompile_headers()`` may use "generator expressions"
+with the syntax ``$<...>``.
+See the :manual:`cmake-generator-expressions(7)` manual for available
+expressions.
+The ``$<COMPILE_LANGUAGE:...>`` generator expression is particularly
+useful for specifying a language-specific header to precompile for
+only one language (e.g. ``CXX`` and not ``C``).  In this case, header
+file names that are not explicitly in double quotes or angle brackets
+must be specified by absolute path.  Also, when specifying angle brackets
+inside a generator expression, be sure to encode the closing ``>`` as
+``$<ANGLE-R>``.  For example:
 
 .. code-block:: cmake
 
   target_precompile_headers(mylib PRIVATE
+    "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/cxx_only.h>"
     "$<$<COMPILE_LANGUAGE:C>:<stddef.h$<ANGLE-R>>"
     "$<$<COMPILE_LANGUAGE:CXX>:<cstddef$<ANGLE-R>>"
   )
index 275055d..08ee81b 100644 (file)
@@ -33,11 +33,7 @@ Fortran Support
 ^^^^^^^^^^^^^^^
 
 The ``Ninja`` generator conditionally supports Fortran when the ``ninja``
-tool has the required features.  As of this version of CMake the needed
-features have not been integrated into upstream Ninja.  Kitware maintains
-a branch of Ninja with the required features on `github.com/Kitware/ninja`_.
-
-.. _`github.com/Kitware/ninja`: https://github.com/Kitware/ninja/tree/features-for-fortran#readme
+tool is at least version 1.10 (which has the required features).
 
 See Also
 ^^^^^^^^
index 5f39f30..0031da3 100644 (file)
@@ -6,8 +6,8 @@ Is this source file skipped by :prop_tgt:`PRECOMPILE_HEADERS` feature.
 This property helps with build problems that one would run into
 when using the :prop_tgt:`PRECOMPILE_HEADERS` feature.
 
-One example would be the usage of Objective-C (*.m) files, and
-Objective-C++ (*.mm) files, which lead to compilation failure
+One example would be the usage of Objective-C (``*.m``) files, and
+Objective-C++ (``*.mm``) files, which lead to compilation failure
 because they are treated (in case of Ninja / Makefile generator)
 as C, and CXX respectively. The precompile headers are not
 compatible between languages.
index aa2936c..fb7f610 100644 (file)
@@ -2,5 +2,9 @@ CMAKE_CURRENT_FUNCTION
 ----------------------
 
 When executing code inside a :command:`function`, this variable
-contains the name of the current function.  It can be used for
+contains the name of the current function.  It can be useful for
 diagnostic or debug messages.
+
+See also :variable:`CMAKE_CURRENT_FUNCTION_LIST_DIR`,
+:variable:`CMAKE_CURRENT_FUNCTION_LIST_FILE` and
+:variable:`CMAKE_CURRENT_FUNCTION_LIST_LINE`.
index 0119381..44ae1e5 100644 (file)
@@ -2,32 +2,40 @@ CMAKE_CURRENT_FUNCTION_LIST_DIR
 -------------------------------
 
 When executing code inside a :command:`function`, this variable
-contains the full directory of the listfile defining the current function.
+contains the full directory of the listfile that defined the current function.
 
-It is quite common practice in CMake that modules use some additional files
-(e.g., templates to render).  And the code typically did the following:
+It is quite common practice in CMake for modules to use some additional files,
+such as templates to be copied in after substituting CMake variables.
+In such cases, a function needs to know where to locate those files in a way
+that doesn't depend on where the function is called.  Without
+``CMAKE_CURRENT_FUNCTION_LIST_DIR``, the code to do that would typically use
+the following pattern:
 
 .. code-block:: cmake
-    :caption: Bad
 
-    set(_THIS_MODULE_BASE_DIR "${CMAKE_CURRENT_LIST_DIR}")
+  set(_THIS_MODULE_BASE_DIR "${CMAKE_CURRENT_LIST_DIR}")
 
-    function(foo)
-      configure_file(
-        "${_THIS_MODULE_BASE_DIR}/some.template.in"
-        some.output
-      )
-    endfunction()
+  function(foo)
+    configure_file(
+      "${_THIS_MODULE_BASE_DIR}/some.template.in"
+      some.output
+    )
+  endfunction()
 
-Using this variable inside a function eliminates the neccessity of the
-additional one with "global" scope:
+Using ``CMAKE_CURRENT_FUNCTION_LIST_DIR`` inside the function instead
+eliminates the need for the extra variable which would otherwise be visible
+outside the function's scope.
+The above example can be written in the more concise and more robust form:
 
 .. code-block:: cmake
-    :caption: Good
-
-    function(foo)
-      configure_file(
-        "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/some.template.in"
-        some.output
-      )
-    endfunction()
+
+  function(foo)
+    configure_file(
+      "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/some.template.in"
+      some.output
+    )
+  endfunction()
+
+See also :variable:`CMAKE_CURRENT_FUNCTION`,
+:variable:`CMAKE_CURRENT_FUNCTION_LIST_FILE` and
+:variable:`CMAKE_CURRENT_FUNCTION_LIST_LINE`.
index d2c846a..c737af9 100644 (file)
@@ -2,4 +2,8 @@ CMAKE_CURRENT_FUNCTION_LIST_FILE
 --------------------------------
 
 When executing code inside a :command:`function`, this variable
-contains the full path to the listfile declaring a current function.
+contains the full path to the listfile that defined the current function.
+
+See also :variable:`CMAKE_CURRENT_FUNCTION`,
+:variable:`CMAKE_CURRENT_FUNCTION_LIST_DIR` and
+:variable:`CMAKE_CURRENT_FUNCTION_LIST_LINE`.
index 5a7cd13..ad6282e 100644 (file)
@@ -2,4 +2,9 @@ CMAKE_CURRENT_FUNCTION_LIST_LINE
 --------------------------------
 
 When executing code inside a :command:`function`, this variable
-contains the line number in the listfile where a current function has defined.
+contains the line number in the listfile where the current function
+was defined.
+
+See also :variable:`CMAKE_CURRENT_FUNCTION`,
+:variable:`CMAKE_CURRENT_FUNCTION_LIST_DIR` and
+:variable:`CMAKE_CURRENT_FUNCTION_LIST_FILE`.
index 3c52466..53fc4b7 100644 (file)
@@ -850,318 +850,334 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
   endif()
 
   set(_Boost_IMPORTED_TARGETS TRUE)
-  if(Boost_VERSION_STRING AND Boost_VERSION_STRING VERSION_LESS 1.33.0)
-    message(WARNING "Imported targets and dependency information not available for Boost version ${Boost_VERSION_STRING} (all versions older than 1.33)")
-    set(_Boost_IMPORTED_TARGETS FALSE)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.33.0 AND Boost_VERSION_STRING VERSION_LESS 1.35.0)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex thread)
-    set(_Boost_REGEX_DEPENDENCIES thread)
-    set(_Boost_WAVE_DEPENDENCIES filesystem thread)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.35.0 AND Boost_VERSION_STRING VERSION_LESS 1.36.0)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system thread)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.36.0 AND Boost_VERSION_STRING VERSION_LESS 1.38.0)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l)
-    set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system thread)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.38.0 AND Boost_VERSION_STRING VERSION_LESS 1.43.0)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l)
-    set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
-    set(_Boost_THREAD_DEPENDENCIES date_time)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system thread date_time)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.43.0 AND Boost_VERSION_STRING VERSION_LESS 1.44.0)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
-    set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
-    set(_Boost_THREAD_DEPENDENCIES date_time)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system thread date_time)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.44.0 AND Boost_VERSION_STRING VERSION_LESS 1.45.0)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random serialization)
-    set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
-    set(_Boost_THREAD_DEPENDENCIES date_time)
-    set(_Boost_WAVE_DEPENDENCIES serialization filesystem system thread date_time)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.45.0 AND Boost_VERSION_STRING VERSION_LESS 1.47.0)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
-    set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
-    set(_Boost_THREAD_DEPENDENCIES date_time)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.47.0 AND Boost_VERSION_STRING VERSION_LESS 1.48.0)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
-    set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
-    set(_Boost_THREAD_DEPENDENCIES date_time)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.48.0 AND Boost_VERSION_STRING VERSION_LESS 1.50.0)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
-    set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
-    set(_Boost_THREAD_DEPENDENCIES date_time)
-    set(_Boost_TIMER_DEPENDENCIES chrono system)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.50.0 AND Boost_VERSION_STRING VERSION_LESS 1.53.0)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
-    set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
-    set(_Boost_THREAD_DEPENDENCIES chrono system date_time)
-    set(_Boost_TIMER_DEPENDENCIES chrono system)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.53.0 AND Boost_VERSION_STRING VERSION_LESS 1.54.0)
-    set(_Boost_ATOMIC_DEPENDENCIES thread chrono system date_time)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
-    set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
-    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
-    set(_Boost_TIMER_DEPENDENCIES chrono system)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.54.0 AND Boost_VERSION_STRING VERSION_LESS 1.55.0)
-    set(_Boost_ATOMIC_DEPENDENCIES thread chrono system date_time)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono)
-    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
-    set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
-    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
-    set(_Boost_TIMER_DEPENDENCIES chrono system)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.55.0 AND Boost_VERSION_STRING VERSION_LESS 1.56.0)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_COROUTINE_DEPENDENCIES context system)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono)
-    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
-    set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
-    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
-    set(_Boost_TIMER_DEPENDENCIES chrono system)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.56.0 AND Boost_VERSION_STRING VERSION_LESS 1.59.0)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_COROUTINE_DEPENDENCIES context system)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono)
-    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_RANDOM_DEPENDENCIES system)
-    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
-    set(_Boost_TIMER_DEPENDENCIES chrono system)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.59.0 AND Boost_VERSION_STRING VERSION_LESS 1.60.0)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_COROUTINE_DEPENDENCIES context system)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_LOG_DEPENDENCIES log_setup date_time system 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_RANDOM_DEPENDENCIES system)
-    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
-    set(_Boost_TIMER_DEPENDENCIES chrono system)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.60.0 AND Boost_VERSION_STRING VERSION_LESS 1.61.0)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_COROUTINE_DEPENDENCIES context system)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_LOG_DEPENDENCIES date_time log_setup system 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_RANDOM_DEPENDENCIES system)
-    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
-    set(_Boost_TIMER_DEPENDENCIES chrono system)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.61.0 AND Boost_VERSION_STRING VERSION_LESS 1.62.0)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
-    set(_Boost_COROUTINE_DEPENDENCIES context system)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_LOG_DEPENDENCIES date_time log_setup system 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_RANDOM_DEPENDENCIES system)
-    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.62.0 AND Boost_VERSION_STRING VERSION_LESS 1.63.0)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
-    set(_Boost_COROUTINE_DEPENDENCIES context system)
-    set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_LOG_DEPENDENCIES date_time log_setup system 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_RANDOM_DEPENDENCIES system)
-    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.63.0 AND Boost_VERSION_STRING VERSION_LESS 1.65.0)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
-    set(_Boost_COROUTINE_DEPENDENCIES context system)
-    set(_Boost_COROUTINE2_DEPENDENCIES context fiber thread chrono system date_time)
-    set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_LOG_DEPENDENCIES date_time log_setup system 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_RANDOM_DEPENDENCIES system)
-    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.65.0 AND Boost_VERSION_STRING VERSION_LESS 1.67.0)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
-    set(_Boost_COROUTINE_DEPENDENCIES context system)
-    set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_LOG_DEPENDENCIES date_time log_setup system 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_RANDOM_DEPENDENCIES system)
-    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
-    set(_Boost_TIMER_DEPENDENCIES chrono system)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.67.0 AND Boost_VERSION_STRING VERSION_LESS 1.68.0)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
-    set(_Boost_COROUTINE_DEPENDENCIES context system)
-    set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_LOG_DEPENDENCIES date_time log_setup system 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_RANDOM_DEPENDENCIES system)
-    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
-    set(_Boost_TIMER_DEPENDENCIES chrono system)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.68.0 AND Boost_VERSION_STRING VERSION_LESS 1.69.0)
-    set(_Boost_CHRONO_DEPENDENCIES system)
-    set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
-    set(_Boost_CONTRACT_DEPENDENCIES thread chrono system date_time)
-    set(_Boost_COROUTINE_DEPENDENCIES context system)
-    set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
-    set(_Boost_FILESYSTEM_DEPENDENCIES system)
-    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-    set(_Boost_LOG_DEPENDENCIES date_time log_setup system 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_RANDOM_DEPENDENCIES system)
-    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
-    set(_Boost_TIMER_DEPENDENCIES chrono system)
-    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.69.0 AND Boost_VERSION_STRING VERSION_LESS 1.70.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 system)
-    set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic)
-    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.70.0 AND Boost_VERSION_STRING VERSION_LESS 1.72.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)
-  elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.72.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 chrono 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)
-    if(NOT Boost_VERSION_STRING VERSION_LESS 1.73.0)
-      message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
+  if(Boost_VERSION_STRING)
+    if(Boost_VERSION_STRING VERSION_LESS 1.33.0)
+      message(WARNING "Imported targets and dependency information not available for Boost version ${Boost_VERSION_STRING} (all versions older than 1.33)")
+      set(_Boost_IMPORTED_TARGETS FALSE)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.35.0)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex thread)
+      set(_Boost_REGEX_DEPENDENCIES thread)
+      set(_Boost_WAVE_DEPENDENCIES filesystem thread)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.36.0)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_MPI_DEPENDENCIES serialization)
+      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system thread)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.38.0)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l)
+      set(_Boost_MPI_DEPENDENCIES serialization)
+      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system thread)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.43.0)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l)
+      set(_Boost_MPI_DEPENDENCIES serialization)
+      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+      set(_Boost_THREAD_DEPENDENCIES date_time)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system thread date_time)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.44.0)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
+      set(_Boost_MPI_DEPENDENCIES serialization)
+      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+      set(_Boost_THREAD_DEPENDENCIES date_time)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system thread date_time)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.45.0)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random serialization)
+      set(_Boost_MPI_DEPENDENCIES serialization)
+      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+      set(_Boost_THREAD_DEPENDENCIES date_time)
+      set(_Boost_WAVE_DEPENDENCIES serialization filesystem system thread date_time)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.47.0)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
+      set(_Boost_MPI_DEPENDENCIES serialization)
+      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+      set(_Boost_THREAD_DEPENDENCIES date_time)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.48.0)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
+      set(_Boost_MPI_DEPENDENCIES serialization)
+      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+      set(_Boost_THREAD_DEPENDENCIES date_time)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.50.0)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
+      set(_Boost_MPI_DEPENDENCIES serialization)
+      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+      set(_Boost_THREAD_DEPENDENCIES date_time)
+      set(_Boost_TIMER_DEPENDENCIES chrono system)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.53.0)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
+      set(_Boost_MPI_DEPENDENCIES serialization)
+      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+      set(_Boost_THREAD_DEPENDENCIES chrono system date_time)
+      set(_Boost_TIMER_DEPENDENCIES chrono system)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.54.0)
+      set(_Boost_ATOMIC_DEPENDENCIES thread chrono system date_time)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
+      set(_Boost_MPI_DEPENDENCIES serialization)
+      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+      set(_Boost_TIMER_DEPENDENCIES chrono system)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.55.0)
+      set(_Boost_ATOMIC_DEPENDENCIES thread chrono system date_time)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono)
+      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
+      set(_Boost_MPI_DEPENDENCIES serialization)
+      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+      set(_Boost_TIMER_DEPENDENCIES chrono system)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.56.0)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_COROUTINE_DEPENDENCIES context system)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono)
+      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
+      set(_Boost_MPI_DEPENDENCIES serialization)
+      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+      set(_Boost_TIMER_DEPENDENCIES chrono system)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.59.0)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_COROUTINE_DEPENDENCIES context system)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono)
+      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_RANDOM_DEPENDENCIES system)
+      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+      set(_Boost_TIMER_DEPENDENCIES chrono system)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.60.0)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_COROUTINE_DEPENDENCIES context system)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_LOG_DEPENDENCIES log_setup date_time system 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_RANDOM_DEPENDENCIES system)
+      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+      set(_Boost_TIMER_DEPENDENCIES chrono system)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.61.0)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_COROUTINE_DEPENDENCIES context system)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_LOG_DEPENDENCIES date_time log_setup system 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_RANDOM_DEPENDENCIES system)
+      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+      set(_Boost_TIMER_DEPENDENCIES chrono system)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.62.0)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+      set(_Boost_COROUTINE_DEPENDENCIES context system)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_LOG_DEPENDENCIES date_time log_setup system 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_RANDOM_DEPENDENCIES system)
+      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.63.0)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+      set(_Boost_COROUTINE_DEPENDENCIES context system)
+      set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_LOG_DEPENDENCIES date_time log_setup system 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_RANDOM_DEPENDENCIES system)
+      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.65.0)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+      set(_Boost_COROUTINE_DEPENDENCIES context system)
+      set(_Boost_COROUTINE2_DEPENDENCIES context fiber thread chrono system date_time)
+      set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_LOG_DEPENDENCIES date_time log_setup system 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_RANDOM_DEPENDENCIES system)
+      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.67.0)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+      set(_Boost_COROUTINE_DEPENDENCIES context system)
+      set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_LOG_DEPENDENCIES date_time log_setup system 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_RANDOM_DEPENDENCIES system)
+      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+      set(_Boost_TIMER_DEPENDENCIES chrono system)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.68.0)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+      set(_Boost_COROUTINE_DEPENDENCIES context system)
+      set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_LOG_DEPENDENCIES date_time log_setup system 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_RANDOM_DEPENDENCIES system)
+      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+      set(_Boost_TIMER_DEPENDENCIES chrono system)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.69.0)
+      set(_Boost_CHRONO_DEPENDENCIES system)
+      set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+      set(_Boost_CONTRACT_DEPENDENCIES thread chrono system date_time)
+      set(_Boost_COROUTINE_DEPENDENCIES context system)
+      set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+      set(_Boost_LOG_DEPENDENCIES date_time log_setup system 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_RANDOM_DEPENDENCIES system)
+      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+      set(_Boost_TIMER_DEPENDENCIES chrono system)
+      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.70.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 system)
+      set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic)
+      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.72.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)
+    elseif(Boost_VERSION_STRING VERSION_LESS 1.73.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 chrono 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_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)
+      if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.74.0)
+        message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
+      endif()
     endif()
   endif()
 
@@ -1224,6 +1240,7 @@ function(_Boost_COMPONENT_HEADERS component _hdrs)
   set(_Boost_MPI_HEADERS                 "boost/mpi.hpp")
   set(_Boost_MPI_PYTHON_HEADERS          "boost/mpi/python/config.hpp")
   set(_Boost_NUMPY_HEADERS               "boost/python/numpy.hpp")
+  set(_Boost_NOWIDE_HEADERS              "boost/nowide/cstdlib.hpp")
   set(_Boost_PRG_EXEC_MONITOR_HEADERS    "boost/test/prg_exec_monitor.hpp")
   set(_Boost_PROGRAM_OPTIONS_HEADERS     "boost/program_options.hpp")
   set(_Boost_PYTHON_HEADERS              "boost/python.hpp")
index 4b14ddc..de7e785 100644 (file)
@@ -711,8 +711,15 @@ find_path(CUDAToolkit_INCLUDE_DIR
 # And find the CUDA Runtime Library libcudart
 find_library(CUDA_CUDART
   NAMES cudart
-  PATH_SUFFIXES lib64 lib64/stubs lib/x64
+  PATH_SUFFIXES lib64 lib/x64
 )
+if (NOT CUDA_CUDART)
+  find_library(CUDA_CUDART
+    NAMES cudart
+    PATH_SUFFIXES lib64/stubs lib/x64/stubs
+  )
+endif()
+
 if (NOT CUDA_CUDART AND NOT CUDAToolkit_FIND_QUIETLY)
   message(STATUS "Unable to find cudart library.")
 endif()
@@ -759,9 +766,20 @@ if(CUDAToolkit_FOUND)
       NAMES ${search_names}
       HINTS ${CUDAToolkit_LIBRARY_DIR}
             ENV CUDA_PATH
-      PATH_SUFFIXES nvidia/current lib64 lib64/stubs lib/x64 lib lib/stubs
+      PATH_SUFFIXES nvidia/current lib64 lib/x64 lib
                     ${arg_EXTRA_PATH_SUFFIXES}
     )
+    # Don't try any stub directories intil we have exhausted all other
+    # search locations.
+    if(NOT CUDA_${lib_name}_LIBRARY)
+      find_library(CUDA_${lib_name}_LIBRARY
+        NAMES ${search_names}
+        HINTS ${CUDAToolkit_LIBRARY_DIR}
+              ENV CUDA_PATH
+        PATH_SUFFIXES lib64/stubs lib/x64/stubs lib/stubs stubs
+      )
+    endif()
+
     mark_as_advanced(CUDA_${lib_name}_LIBRARY)
 
     if (NOT TARGET CUDA::${lib_name} AND CUDA_${lib_name}_LIBRARY)
index 41e1d08..cdbb927 100644 (file)
@@ -298,9 +298,9 @@ else()
 endif()
 
 # PGI compiler names
-set(_MPI_PGI_C_COMPILER_NAMES              mpipgcc mppgcc)
-set(_MPI_PGI_CXX_COMPILER_NAMES            mpipgCC mppgCC)
-set(_MPI_PGI_Fortran_COMPILER_NAMES        mpipgf95 mpipgf90 mppgf95 mppgf90 mpipgf77 mppgf77)
+set(_MPI_PGI_C_COMPILER_NAMES              mpipgicc mpipgcc mppgcc)
+set(_MPI_PGI_CXX_COMPILER_NAMES            mpipgic++ mpipgCC mppgCC)
+set(_MPI_PGI_Fortran_COMPILER_NAMES        mpipgifort mpipgf95 mpipgf90 mppgf95 mppgf90 mpipgf77 mppgf77)
 
 # XLC MPI Compiler names
 set(_MPI_XL_C_COMPILER_NAMES               mpxlc      mpxlc_r    mpixlc     mpixlc_r)
index 6bd10b3..8789d7b 100644 (file)
@@ -440,7 +440,7 @@ function (_PYTHON_GET_VERSION)
       set (${_PGV_PREFIX}VERSION_PATCH ${version_patch} PARENT_SCOPE)
 
       # compute ABI flags
-      if (version_major VERSION_GREATER 2)
+      if (version_major VERSION_GREATER "2")
         file (STRINGS "${_${_PYTHON_PREFIX}_INCLUDE_DIR}/pyconfig.h" config REGEX "(Py_DEBUG|WITH_PYMALLOC|Py_UNICODE_SIZE|MS_WIN32)")
         set (abi)
         if (config MATCHES "#[ ]*define[ ]+MS_WIN32")
@@ -474,14 +474,14 @@ function (_PYTHON_VALIDATE_INTERPRETER)
 
   cmake_parse_arguments (PARSE_ARGV 0 _PVI "EXACT;CHECK_EXISTS" "" "")
   if (_PVI_UNPARSED_ARGUMENTS)
-    set (expected_version ${_PVI_UNPARSED_ARGUMENTS})
+    set (expected_version "${_PVI_UNPARSED_ARGUMENTS}")
   else()
     unset (expected_version)
   endif()
 
   if (_PVI_CHECK_EXISTS AND NOT EXISTS "${_${_PYTHON_PREFIX}_EXECUTABLE}")
     # interpreter does not exist anymore
-    set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Cannot find the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"")
+    set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Cannot find the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"" PARENT_SCOPE)
     set_property (CACHE _${_PYTHON_PREFIX}_EXECUTABLE PROPERTY VALUE "${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND")
     return()
   endif()
@@ -500,7 +500,7 @@ function (_PYTHON_VALIDATE_INTERPRETER)
     endif()
     if (NOT abi IN_LIST _${_PYTHON_PREFIX}_ABIFLAGS)
       # incompatible ABI
-      set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Wrong ABI for the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"")
+      set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Wrong ABI for the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"" PARENT_SCOPE)
       set_property (CACHE _${_PYTHON_PREFIX}_EXECUTABLE PROPERTY VALUE "${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND")
       return()
     endif()
@@ -518,12 +518,12 @@ function (_PYTHON_VALIDATE_INTERPRETER)
                      OUTPUT_STRIP_TRAILING_WHITESPACE)
     if (result)
       # interpreter is not usable
-      set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Cannot use the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"")
+      set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Cannot use the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"" PARENT_SCOPE)
       set_property (CACHE _${_PYTHON_PREFIX}_EXECUTABLE PROPERTY VALUE "${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND")
     else()
       if (_PVI_EXACT AND NOT version VERSION_EQUAL expected_version)
         # interpreter has wrong version
-        set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Wrong version for the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"")
+        set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Wrong version for the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"" PARENT_SCOPE)
         set_property (CACHE _${_PYTHON_PREFIX}_EXECUTABLE PROPERTY VALUE "${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND")
       else()
         # check that version is OK
@@ -531,7 +531,7 @@ function (_PYTHON_VALIDATE_INTERPRETER)
         string(REGEX REPLACE "^([0-9]+)\\.?.*$" "\\1" expected_major_version "${expected_version}")
         if (NOT major_version VERSION_EQUAL expected_major_version
             OR NOT version VERSION_GREATER_EQUAL expected_version)
-          set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Wrong version for the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"")
+          set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Wrong version for the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"" PARENT_SCOPE)
           set_property (CACHE _${_PYTHON_PREFIX}_EXECUTABLE PROPERTY VALUE "${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND")
         endif()
       endif()
@@ -552,9 +552,9 @@ function (_PYTHON_VALIDATE_INTERPRETER)
       if (result OR NOT version EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
         # interpreter not usable or has wrong major version
         if (result)
-          set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Cannot use the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"")
+          set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Cannot use the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"" PARENT_SCOPE)
         else()
-          set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Wrong major version for the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"")
+          set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Wrong major version for the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"" PARENT_SCOPE)
         endif()
         set_property (CACHE _${_PYTHON_PREFIX}_EXECUTABLE PROPERTY VALUE "${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND")
         return()
@@ -574,9 +574,9 @@ function (_PYTHON_VALIDATE_INTERPRETER)
     if (result OR NOT size EQUAL CMAKE_SIZEOF_VOID_P)
       # interpreter not usable or has wrong architecture
       if (result)
-        set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Cannot use the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"")
+        set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Cannot use the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"" PARENT_SCOPE)
       else()
-        set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Wrong architecture for the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"")
+        set (_${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE "Wrong architecture for the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"" PARENT_SCOPE)
       endif()
       set_property (CACHE _${_PYTHON_PREFIX}_EXECUTABLE PROPERTY VALUE "${_PYTHON_PREFIX}_EXECUTABLE-NOTFOUND")
       return()
@@ -585,24 +585,24 @@ function (_PYTHON_VALIDATE_INTERPRETER)
 endfunction()
 
 
-function (_PYTHON_VALIDATE_COMPILER expected_version)
+function (_PYTHON_VALIDATE_COMPILER)
   if (NOT _${_PYTHON_PREFIX}_COMPILER)
     return()
   endif()
 
-  cmake_parse_arguments (_PVC "EXACT;CHECK_EXISTS" "" "" ${ARGN})
+  cmake_parse_arguments (PARSE_ARGV 0 _PVC "EXACT;CHECK_EXISTS" "" "")
   if (_PVC_UNPARSED_ARGUMENTS)
     set (major_version FALSE)
-    set (expected_version ${_PVC_UNPARSED_ARGUMENTS})
+    set (expected_version "${_PVC_UNPARSED_ARGUMENTS}")
   else()
     set (major_version TRUE)
-    set (expected_version ${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR})
+    set (expected_version "${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR}")
     set (_PVC_EXACT TRUE)
   endif()
 
   if (_PVC_CHECK_EXISTS AND NOT EXISTS "${_${_PYTHON_PREFIX}_COMPILER}")
     # Compiler does not exist anymore
-    set (_${_PYTHON_PREFIX}_Compiler_REASON_FAILURE "Cannot find the compiler \"${_${_PYTHON_PREFIX}_COMPILER}\"")
+    set (_${_PYTHON_PREFIX}_Compiler_REASON_FAILURE "Cannot find the compiler \"${_${_PYTHON_PREFIX}_COMPILER}\"" PARENT_SCOPE)
     set_property (CACHE _${_PYTHON_PREFIX}_COMPILER PROPERTY VALUE "${_PYTHON_PREFIX}_COMPILER-NOTFOUND")
     return()
   endif()
@@ -625,15 +625,15 @@ function (_PYTHON_VALIDATE_COMPILER expected_version)
                    RESULT_VARIABLE result
                    OUTPUT_VARIABLE version
                    ERROR_QUIET)
-  file (REMOVE_RECURSE "${_${_PYTHON_PREFIX}_VERSION_DIR}")
-
-  if (result OR (_PVC_EXACT AND NOT version VERSION_EQUAL expected_version) OR (version VERSION_LESS expected_version))
-    # Compiler not usable or has wrong version
-    if (result)
-      set (_${_PYTHON_PREFIX}_Compiler_REASON_FAILURE "Cannot use the compiler \"${_${_PYTHON_PREFIX}_COMPILER}\"")
-    else()
-      set (_${_PYTHON_PREFIX}_Compiler_REASON_FAILURE "Wrong version for the compiler \"${_${_PYTHON_PREFIX}_COMPILER}\"")
-    endif()
+  file (REMOVE_RECURSE "${working_dir}")
+  if (result)
+    # compiler is not usable
+    set (_${_PYTHON_PREFIX}_Compiler_REASON_FAILURE "Cannot use the compiler \"${_${_PYTHON_PREFIX}_COMPILER}\"" PARENT_SCOPE)
+    set_property (CACHE _${_PYTHON_PREFIX}_COMPILER PROPERTY VALUE "${_PYTHON_PREFIX}_COMPILER-NOTFOUND")
+  elseif ((_PVC_EXACT AND NOT version VERSION_EQUAL expected_version)
+          OR NOT version VERSION_GREATER_EQUAL expected_version)
+    # Compiler has wrong version
+    set (_${_PYTHON_PREFIX}_Compiler_REASON_FAILURE "Wrong version for the compiler \"${_${_PYTHON_PREFIX}_COMPILER}\"" PARENT_SCOPE)
     set_property (CACHE _${_PYTHON_PREFIX}_COMPILER PROPERTY VALUE "${_PYTHON_PREFIX}_COMPILER-NOTFOUND")
   endif()
 endfunction()
@@ -653,7 +653,7 @@ function (_PYTHON_VALIDATE_LIBRARY)
 
   if (_PVL_CHECK_EXISTS AND NOT EXISTS "${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}")
     # library does not exist anymore
-    set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Cannot find the library \"${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}\"")
+    set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Cannot find the library \"${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}\"" PARENT_SCOPE)
     set_property (CACHE _${_PYTHON_PREFIX}_LIBRARY_RELEASE PROPERTY VALUE "${_PYTHON_PREFIX}_LIBRARY_RELEASE-NOTFOUND")
     if (WIN32)
       set_property (CACHE _${_PYTHON_PREFIX}_LIBRARY_DEBUG PROPERTY VALUE "${_PYTHON_PREFIX}_LIBRARY_DEBUG-NOTFOUND")
@@ -667,19 +667,19 @@ function (_PYTHON_VALIDATE_LIBRARY)
 
   if (DEFINED _${_PYTHON_PREFIX}_FIND_ABI AND NOT lib_ABI IN_LIST _${_PYTHON_PREFIX}_ABIFLAGS)
     # incompatible ABI
-    set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong ABI for the library \"${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}\"")
+    set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong ABI for the library \"${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}\"" PARENT_SCOPE)
     set_property (CACHE _${_PYTHON_PREFIX}_LIBRARY_RELEASE PROPERTY VALUE "${_PYTHON_PREFIX}_LIBRARY_RELEASE-NOTFOUND")
   else()
     if (expected_version)
       if ((_PVL_EXACT AND NOT lib_VERSION VERSION_EQUAL expected_version) OR (lib_VERSION VERSION_LESS expected_version))
         # library has wrong version
-        set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong version for the library \"${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}\"")
+        set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong version for the library \"${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}\"" PARENT_SCOPE)
         set_property (CACHE _${_PYTHON_PREFIX}_LIBRARY_RELEASE PROPERTY VALUE "${_PYTHON_PREFIX}_LIBRARY_RELEASE-NOTFOUND")
       endif()
     else()
       if (NOT lib_VERSION_MAJOR VERSION_EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
         # library has wrong major version
-        set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong major version for the library \"${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}\"")
+        set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong major version for the library \"${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}\"" PARENT_SCOPE)
         set_property (CACHE _${_PYTHON_PREFIX}_LIBRARY_RELEASE PROPERTY VALUE "${_PYTHON_PREFIX}_LIBRARY_RELEASE-NOTFOUND")
       endif()
     endif()
@@ -710,7 +710,7 @@ function (_PYTHON_VALIDATE_INCLUDE_DIR)
 
   if (_PVID_CHECK_EXISTS AND NOT EXISTS "${_${_PYTHON_PREFIX}_INCLUDE_DIR}")
     # include file does not exist anymore
-    set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Cannot find the directory \"${_${_PYTHON_PREFIX}_INCLUDE_DIR}\"")
+    set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Cannot find the directory \"${_${_PYTHON_PREFIX}_INCLUDE_DIR}\"" PARENT_SCOPE)
     set_property (CACHE _${_PYTHON_PREFIX}_INCLUDE_DIR PROPERTY VALUE "${_PYTHON_PREFIX}_INCLUDE_DIR-NOTFOUND")
     return()
   endif()
@@ -720,19 +720,19 @@ function (_PYTHON_VALIDATE_INCLUDE_DIR)
 
   if (DEFINED _${_PYTHON_PREFIX}_FIND_ABI AND NOT inc_ABI IN_LIST _${_PYTHON_PREFIX}_ABIFLAGS)
     # incompatible ABI
-    set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong ABI for the directory \"${_${_PYTHON_PREFIX}_INCLUDE_DIR}\"")
+    set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong ABI for the directory \"${_${_PYTHON_PREFIX}_INCLUDE_DIR}\"" PARENT_SCOPE)
     set_property (CACHE _${_PYTHON_PREFIX}_INCLUDE_DIR PROPERTY VALUE "${_PYTHON_PREFIX}_INCLUDE_DIR-NOTFOUND")
   else()
     if (expected_version)
       if ((_PVID_EXACT AND NOT inc_VERSION VERSION_EQUAL expected_version) OR (inc_VERSION VERSION_LESS expected_version))
         # include dir has wrong version
-        set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong version for the directory \"${_${_PYTHON_PREFIX}_INCLUDE_DIR}\"")
+        set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong version for the directory \"${_${_PYTHON_PREFIX}_INCLUDE_DIR}\"" PARENT_SCOPE)
         set_property (CACHE _${_PYTHON_PREFIX}_INCLUDE_DIR PROPERTY VALUE "${_PYTHON_PREFIX}_INCLUDE_DIR-NOTFOUND")
       endif()
     else()
       if (NOT inc_VERSION_MAJOR VERSION_EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
         # include dir has wrong major version
-        set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong major version for the directory \"${_${_PYTHON_PREFIX}_INCLUDE_DIR}\"")
+        set (_${_PYTHON_PREFIX}_Development_REASON_FAILURE "Wrong major version for the directory \"${_${_PYTHON_PREFIX}_INCLUDE_DIR}\"" PARENT_SCOPE)
         set_property (CACHE _${_PYTHON_PREFIX}_INCLUDE_DIR PROPERTY VALUE "${_PYTHON_PREFIX}_INCLUDE_DIR-NOTFOUND")
       endif()
     endif()
@@ -813,7 +813,7 @@ endif()
 
 # Set ABIs to search
 ## default: search any ABI
-if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR VERSION_LESS 3)
+if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR VERSION_LESS "3")
   # ABI not supported
   unset (_${_PYTHON_PREFIX}_FIND_ABI)
   set (_${_PYTHON_PREFIX}_ABIFLAGS "")
@@ -963,7 +963,8 @@ unset (_${_PYTHON_PREFIX}_NumPy_REASON_FAILURE)
 
 # first step, search for the interpreter
 if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS)
-  list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS _${_PYTHON_PREFIX}_EXECUTABLE)
+  list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS _${_PYTHON_PREFIX}_EXECUTABLE
+                                              _${_PYTHON_PREFIX}_INTERPRETER_PROPERTIES)
   if (${_PYTHON_PREFIX}_FIND_REQUIRED_Interpreter)
     list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_EXECUTABLE)
   endif()
@@ -1399,7 +1400,7 @@ if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS)
           unset (${_PYTHON_PREFIX}_SITEARCH)
         endif()
 
-        if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR VERSION_GREATER_EQUAL 3)
+        if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR VERSION_GREATER_EQUAL "3")
           _python_get_config_var (${_PYTHON_PREFIX}_SOABI SOABI)
         endif()
 
@@ -1587,7 +1588,7 @@ if ("Compiler" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS)
   if (_${_PYTHON_PREFIX}_COMPILER AND _${_PYTHON_PREFIX}_COMPILER_USABLE)
     if (${_PYTHON_PREFIX}_Interpreter_FOUND)
       # Compiler must be compatible with interpreter
-      if (${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR} VERSION_EQUAL ${${_PYTHON_PREFIX}_VERSION_MAJOR}.${${_PYTHON_PREFIX}_VERSION_MINOR})
+      if ("${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR}" VERSION_EQUAL "${${_PYTHON_PREFIX}_VERSION_MAJOR}.${${_PYTHON_PREFIX}_VERSION_MINOR}")
         set (${_PYTHON_PREFIX}_Compiler_FOUND TRUE)
       endif()
     elseif (${_PYTHON_PREFIX}_VERSION_MAJOR VERSION_EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
@@ -2224,7 +2225,7 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS
     _python_get_version (INCLUDE PREFIX _${_PYTHON_PREFIX}_INC_)
 
     # update versioning
-    if (_${_PYTHON_PREFIX}_INC_VERSION VERSION_EQUAL ${_${_PYTHON_PREFIX}_VERSION})
+    if (_${_PYTHON_PREFIX}_INC_VERSION VERSION_EQUAL _${_PYTHON_PREFIX}_VERSION)
       set (_${_PYTHON_PREFIX}_VERSION_PATCH ${_${_PYTHON_PREFIX}_INC_VERSION_PATCH})
     endif()
   endif()
@@ -2266,12 +2267,12 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS
   if (_${_PYTHON_PREFIX}_LIBRARY_RELEASE AND _${_PYTHON_PREFIX}_INCLUDE_DIR)
     if (${_PYTHON_PREFIX}_Interpreter_FOUND OR ${_PYTHON_PREFIX}_Compiler_FOUND)
       # development environment must be compatible with interpreter/compiler
-      if (${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR} VERSION_EQUAL ${${_PYTHON_PREFIX}_VERSION_MAJOR}.${${_PYTHON_PREFIX}_VERSION_MINOR}
-          AND ${_${_PYTHON_PREFIX}_INC_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_INC_VERSION_MINOR} VERSION_EQUAL ${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR})
+      if ("${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR}" VERSION_EQUAL "${${_PYTHON_PREFIX}_VERSION_MAJOR}.${${_PYTHON_PREFIX}_VERSION_MINOR}"
+          AND "${_${_PYTHON_PREFIX}_INC_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_INC_VERSION_MINOR}" VERSION_EQUAL "${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR}")
         set (${_PYTHON_PREFIX}_Development_FOUND TRUE)
       endif()
     elseif (${_PYTHON_PREFIX}_VERSION_MAJOR VERSION_EQUAL _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR
-            AND ${_${_PYTHON_PREFIX}_INC_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_INC_VERSION_MINOR} VERSION_EQUAL ${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR})
+            AND "${_${_PYTHON_PREFIX}_INC_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_INC_VERSION_MINOR}" VERSION_EQUAL "${_${_PYTHON_PREFIX}_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_VERSION_MINOR}")
       set (${_PYTHON_PREFIX}_Development_FOUND TRUE)
     endif()
     if (DEFINED _${_PYTHON_PREFIX}_FIND_ABI AND
@@ -2281,7 +2282,7 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS
     endif()
   endif()
 
-  if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR VERSION_GREATER_EQUAL 3
+  if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR VERSION_GREATER_EQUAL "3"
       AND NOT DEFINED ${_PYTHON_PREFIX}_SOABI)
     _python_get_config_var (${_PYTHON_PREFIX}_SOABI SOABI)
   endif()
@@ -2389,9 +2390,11 @@ endif()
 
 unset (_${_PYTHON_PREFIX}_REASON_FAILURE)
 foreach (_${_PYTHON_PREFIX}_COMPONENT IN ITEMS Interpreter Compiler Development NumPy)
-  if (_${_PYTHON_PREFIX}_${_${_PYTHON_PREFIX}_COMPONENT}_REASON_FAILURE)
+  if (NOT ${_PYTHON_PREFIX}_${_${_PYTHON_PREFIX}_COMPONENT}_FOUND
+      AND _${_PYTHON_PREFIX}_${_${_PYTHON_PREFIX}_COMPONENT}_REASON_FAILURE)
     string (APPEND _${_PYTHON_PREFIX}_REASON_FAILURE "\n        ${_${_PYTHON_PREFIX}_COMPONENT}: ${_${_PYTHON_PREFIX}_${_${_PYTHON_PREFIX}_COMPONENT}_REASON_FAILURE}")
   endif()
+  unset (_${_PYTHON_PREFIX}_${_${_PYTHON_PREFIX}_COMPONENT}_REASON_FAILURE)
 endforeach()
 
 include (${CMAKE_CURRENT_LIST_DIR}/../FindPackageHandleStandardArgs.cmake)
index 80e668e..80e9a40 100644 (file)
@@ -133,6 +133,80 @@ function(_apple_resolve_sdk_path sdk_name ret)
   )
   set(${ret} "${_stdout}" PARENT_SCOPE)
 endfunction()
+
+function(_apple_resolve_supported_archs_for_sdk_from_system_lib sdk_path ret ret_failed)
+  # Detect the supported SDK architectures by inspecting the main libSystem library.
+  set(common_lib_prefix "${sdk_path}/usr/lib/libSystem")
+  set(system_lib_dylib_path "${common_lib_prefix}.dylib")
+  set(system_lib_tbd_path "${common_lib_prefix}.tbd")
+
+  # Newer SDKs ship text based dylib stub files which contain the architectures supported by the
+  # library in text form.
+  if(EXISTS "${system_lib_tbd_path}")
+    file(STRINGS "${system_lib_tbd_path}" tbd_lines REGEX "^archs: +\\[.+\\]")
+    if(NOT tbd_lines)
+      set(${ret_failed} TRUE PARENT_SCOPE)
+      return()
+    endif()
+
+    # The tbd architectures line looks like the following:
+    # archs:           [ armv7, armv7s, arm64, arm64e ]
+    list(GET tbd_lines 0 first_arch_line)
+    string(REGEX REPLACE
+           "archs: +\\[ (.+) \\]" "\\1" arches_comma_separated "${first_arch_line}")
+    string(STRIP "${arches_comma_separated}" arches_comma_separated)
+    string(REPLACE "," ";" arch_list "${arches_comma_separated}")
+    string(REPLACE " " "" arch_list "${arch_list}")
+    if(NOT arch_list)
+      set(${ret_failed} TRUE PARENT_SCOPE)
+      return()
+    endif()
+    set(${ret} "${arch_list}" PARENT_SCOPE)
+  elseif(EXISTS "${system_lib_dylib_path}")
+    # Old SDKs (Xcode < 7) ship dylib files, use lipo to inspect the supported architectures.
+    # Can't use -archs because the option is not available in older Xcode versions.
+    execute_process(
+      COMMAND lipo -info ${system_lib_dylib_path}
+      OUTPUT_VARIABLE lipo_output
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+      ERROR_VARIABLE _stderr
+      RESULT_VARIABLE _failed
+    )
+    if(_failed OR NOT lipo_output OR NOT lipo_output MATCHES "(Non-fat file:|Architectures in the fat file:)")
+      set(${ret_failed} TRUE PARENT_SCOPE)
+      return()
+    endif()
+
+    # The lipo output looks like the following:
+    # Non-fat file: <path> is architecture: i386
+    # Architectures in the fat file: <path> are: i386 x86_64
+    string(REGEX REPLACE
+           "^(.+)is architecture:(.+)" "\\2" arches_space_separated "${lipo_output}")
+    string(REGEX REPLACE
+            "^(.+)are:(.+)" "\\2" arches_space_separated "${arches_space_separated}")
+
+    # Need to clean up the arches, with Xcode 4.6.3 the output of lipo -info contains some
+    # additional info, e.g.
+    # Architectures in the fat file: <path> are: armv7 (cputype (12) cpusubtype (11))
+    string(REGEX REPLACE
+            "\\(.+\\)" "" arches_space_separated "${arches_space_separated}")
+
+    # The output is space separated.
+    string(STRIP "${arches_space_separated}" arches_space_separated)
+    string(REPLACE " " ";" arch_list "${arches_space_separated}")
+
+    if(NOT arch_list)
+      set(${ret_failed} TRUE PARENT_SCOPE)
+      return()
+    endif()
+    set(${ret} "${arch_list}" PARENT_SCOPE)
+  else()
+    # This shouldn't happen, but keep it for safety.
+    message(WARNING "No way to find architectures for given sdk_path '${sdk_path}'")
+    set(${ret_failed} TRUE PARENT_SCOPE)
+  endif()
+endfunction()
+
 # Handle multi-arch sysroots. Do this before CMAKE_OSX_SYSROOT is
 # transformed into a path, so that we know the sysroot name.
 function(_apple_resolve_multi_arch_sysroots)
@@ -166,13 +240,8 @@ function(_apple_resolve_multi_arch_sysroots)
       continue()
     endif()
 
-    execute_process(
-      COMMAND plutil -extract SupportedTargets.${sdk}.Archs json ${_sdk_path}/SDKSettings.plist -o -
-      OUTPUT_VARIABLE _sdk_archs_json
-      OUTPUT_STRIP_TRAILING_WHITESPACE
-      ERROR_VARIABLE _stderr
-      RESULT_VARIABLE _failed
-      )
+    _apple_resolve_supported_archs_for_sdk_from_system_lib(${_sdk_path} _sdk_archs _failed)
+
     if(_failed)
       # Failure to extract supported architectures for an SDK means that the installed SDK is old
       # and does not provide such information (SDKs that come with Xcode >= 10.x started providing
@@ -181,10 +250,6 @@ function(_apple_resolve_multi_arch_sysroots)
       return()
     endif()
 
-    # Poor man's JSON decoding
-    string(REGEX REPLACE "[]\\[\"]" "" _sdk_archs ${_sdk_archs_json})
-    string(REPLACE "," ";" _sdk_archs ${_sdk_archs})
-
     set(_sdk_archs_${sdk} ${_sdk_archs})
     set(_sdk_path_${sdk} ${_sdk_path})
   endforeach()
index bf7aa87..fd71385 100644 (file)
@@ -1,7 +1,7 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 17)
-set(CMake_VERSION_PATCH 1)
+set(CMake_VERSION_PATCH 2)
 #set(CMake_VERSION_RC 0)
 set(CMake_VERSION_IS_DIRTY 0)
 
@@ -21,7 +21,7 @@ endif()
 
 if(NOT CMake_VERSION_NO_GIT)
   # If this source was exported by 'git archive', use its commit info.
-  set(git_info [==[bd580b7d56 CMake 3.17.1]==])
+  set(git_info [==[615129f3eb CMake 3.17.2]==])
 
   # Otherwise, try to identify the current development source version.
   if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "
index 5b7d8fb..d92acde 100644 (file)
@@ -484,6 +484,7 @@ int cmCPackDebGenerator::PackageOnePack(std::string const& initialTopLevel,
     findExpr += "/*";
     gl.RecurseOn();
     gl.SetRecurseListDirs(true);
+    gl.SetRecurseThroughSymlinks(false);
     if (!gl.FindFiles(findExpr)) {
       cmCPackLogger(cmCPackLog::LOG_ERROR,
                     "Cannot find any files in the installed directory"
@@ -508,6 +509,7 @@ int cmCPackDebGenerator::PackageOnePack(std::string const& initialTopLevel,
     findExpr += "/*";
     gl.RecurseOn();
     gl.SetRecurseListDirs(true);
+    gl.SetRecurseThroughSymlinks(false);
     if (!gl.FindFiles(findExpr)) {
       cmCPackLogger(cmCPackLog::LOG_ERROR,
                     "Cannot find any files in the installed directory"
@@ -627,6 +629,7 @@ int cmCPackDebGenerator::PackageComponentsAllInOne(
   findExpr += "/*";
   gl.RecurseOn();
   gl.SetRecurseListDirs(true);
+  gl.SetRecurseThroughSymlinks(false);
   if (!gl.FindFiles(findExpr)) {
     cmCPackLogger(cmCPackLog::LOG_ERROR,
                   "Cannot find any files in the installed directory"
index 712eb77..e053144 100644 (file)
@@ -354,6 +354,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
                     "- Install directory: " << top << std::endl);
       gl.RecurseOn();
       gl.SetRecurseListDirs(true);
+      gl.SetRecurseThroughSymlinks(false);
       if (!gl.FindFiles(findExpr)) {
         cmCPackLogger(cmCPackLog::LOG_ERROR,
                       "Cannot find any files in the installed directory"
@@ -862,6 +863,7 @@ int cmCPackGenerator::InstallCMakeProject(
     findExpr += "/*";
     glB.RecurseOn();
     glB.SetRecurseListDirs(true);
+    glB.SetRecurseThroughSymlinks(false);
     glB.FindFiles(findExpr);
     filesBefore = glB.GetFiles();
     std::sort(filesBefore.begin(), filesBefore.end());
index 79110ab..e36abdc 100644 (file)
@@ -2051,6 +2051,13 @@ bool HandleUploadCommand(std::vector<std::string> const& args,
                            cmFileCommandCurlDebugCallback);
   check_curl_result(res, "UPLOAD cannot set debug function: ");
 
+  // make sure default CAInfo is set
+  std::string const& cainfo_err = cmCurlSetCAInfo(curl, nullptr);
+  if (!cainfo_err.empty()) {
+    status.SetError(cainfo_err);
+    return false;
+  }
+
   cmFileCommandVectorOfChar chunkResponse;
   cmFileCommandVectorOfChar chunkDebug;
 
index 331cf78..b6c343c 100644 (file)
@@ -714,14 +714,7 @@ bool cmGlobalNinjaGenerator::CheckFortran(cmMakefile* mf) const
   e <<
     "The Ninja generator does not support Fortran using Ninja version\n"
     "  " + this->NinjaVersion + "\n"
-    "due to lack of required features.  "
-    "Kitware has implemented the required features and they have been "
-    "merged to upstream ninja for inclusion in Ninja 1.10 and higher.  "
-    "As of this version of CMake, Ninja 1.10 has not been released.  "
-    "Meanwhile, Kitware maintains a branch of Ninja at:\n"
-    "  https://github.com/Kitware/ninja/tree/features-for-fortran#readme\n"
-    "with the required features.  "
-    "One may build ninja from that branch to get support for Fortran."
+    "due to lack of required features.  Ninja 1.10 or higher is required."
     ;
   /* clang-format on */
   mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
@@ -1062,10 +1055,9 @@ void cmGlobalNinjaGenerator::WriteAssumedSourceDependencies()
 }
 
 std::string cmGlobalNinjaGenerator::OrderDependsTargetForTarget(
-  cmGeneratorTarget const* target, const std::string& config)
+  cmGeneratorTarget const* target, const std::string& /*config*/) const
 {
-  return "cmake_object_order_depends_target_" + target->GetName() + "_" +
-    cmSystemTools::UpperCase(config);
+  return cmStrCat("cmake_object_order_depends_target_", target->GetName());
 }
 
 void cmGlobalNinjaGenerator::AppendTargetOutputs(
@@ -2686,3 +2678,10 @@ bool cmGlobalNinjaMultiGenerator::ReadCacheEntriesForBuild(
 
   return true;
 }
+
+std::string cmGlobalNinjaMultiGenerator::OrderDependsTargetForTarget(
+  cmGeneratorTarget const* target, const std::string& config) const
+{
+  return cmStrCat("cmake_object_order_depends_target_", target->GetName(), '_',
+                  cmSystemTools::UpperCase(config));
+}
index 5668dd1..b89fb8f 100644 (file)
@@ -315,8 +315,8 @@ public:
     ASD.insert(deps.begin(), deps.end());
   }
 
-  static std::string OrderDependsTargetForTarget(
-    cmGeneratorTarget const* target, const std::string& config);
+  virtual std::string OrderDependsTargetForTarget(
+    cmGeneratorTarget const* target, const std::string& config) const;
 
   void AppendTargetOutputs(
     cmGeneratorTarget const* target, cmNinjaDeps& outputs,
@@ -644,6 +644,9 @@ public:
   bool SupportsCrossConfigs() const override { return true; }
   bool SupportsDefaultConfigs() const override { return true; }
 
+  std::string OrderDependsTargetForTarget(
+    cmGeneratorTarget const* target, const std::string& config) const override;
+
 protected:
   bool OpenBuildFileStreams() override;
   void CloseBuildFileStreams() override;
index 2c923dd..c2ec5f5 100644 (file)
@@ -1789,6 +1789,26 @@ std::string cmLocalGenerator::GetLinkLibsCMP0065(
   return linkFlags;
 }
 
+bool cmLocalGenerator::AllAppleArchSysrootsAreTheSame(
+  const std::vector<std::string>& archs, const char* sysroot)
+{
+  if (!sysroot) {
+    return false;
+  }
+
+  for (std::string const& arch : archs) {
+    std::string const& archSysroot = this->AppleArchSysroots[arch];
+    if (cmIsOff(archSysroot)) {
+      continue;
+    }
+    if (archSysroot != sysroot) {
+      return false;
+    }
+  }
+
+  return true;
+}
+
 void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
                                             cmGeneratorTarget const* target,
                                             const std::string& lang,
@@ -1814,7 +1834,8 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
       std::string("CMAKE_") + lang + "_SYSROOT_FLAG";
     const char* sysrootFlag = this->Makefile->GetDefinition(sysrootFlagVar);
     if (sysrootFlag && *sysrootFlag) {
-      if (!this->AppleArchSysroots.empty()) {
+      if (!this->AppleArchSysroots.empty() &&
+          !this->AllAppleArchSysrootsAreTheSame(archs, sysroot)) {
         for (std::string const& arch : archs) {
           std::string const& archSysroot = this->AppleArchSysroots[arch];
           if (cmIsOff(archSysroot)) {
index 5377be9..a459384 100644 (file)
@@ -528,6 +528,8 @@ private:
                                    int targetType);
 
   void ComputeObjectMaxPath();
+  bool AllAppleArchSysrootsAreTheSame(const std::vector<std::string>& archs,
+                                      const char* sysroot);
 };
 
 #if !defined(CMAKE_BOOTSTRAP)
index 24a6351..c9c656c 100644 (file)
@@ -1472,7 +1472,7 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies(
     // Create the scanner for this language
     std::unique_ptr<cmDepends> scanner;
     if (lang == "C" || lang == "CXX" || lang == "RC" || lang == "ASM" ||
-        lang == "CUDA") {
+        lang == "OBJC" || lang == "OBJCXX" || lang == "CUDA") {
       // TODO: Handle RC (resource files) dependencies correctly.
       scanner = cm::make_unique<cmDependsC>(this, targetDir, lang, &validDeps);
     }
index d7e2de6..a8769d8 100644 (file)
@@ -677,8 +677,9 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
   // At the moment, it is assumed that C, C++, Fortran, and CUDA have both
   // assembly and preprocessor capabilities. The same is true for the
   // ability to export compile commands
-  bool lang_has_preprocessor = ((lang == "C") || (lang == "CXX") ||
-                                (lang == "Fortran") || (lang == "CUDA"));
+  bool lang_has_preprocessor =
+    ((lang == "C") || (lang == "CXX") || (lang == "OBJC") ||
+     (lang == "OBJCXX") || (lang == "Fortran") || (lang == "CUDA"));
   bool const lang_has_assembly = lang_has_preprocessor;
   bool const lang_can_export_cmds = lang_has_preprocessor;
 
index abf12f8..486ed8d 100644 (file)
@@ -142,7 +142,7 @@ bool cmNinjaTargetGenerator::NeedDyndep(std::string const& lang) const
 std::string cmNinjaTargetGenerator::OrderDependsTargetForTarget(
   const std::string& config)
 {
-  return cmGlobalNinjaGenerator::OrderDependsTargetForTarget(
+  return this->GetGlobalGenerator()->OrderDependsTargetForTarget(
     this->GeneratorTarget, config);
 }
 
index 97d7fce..1ad9fd1 100644 (file)
@@ -238,8 +238,11 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
     !impl->Makefile->GetSafeDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX").empty();
 
   // Check whether we are targeting AIX.
-  impl->IsAIX =
-    (impl->Makefile->GetSafeDefinition("CMAKE_SYSTEM_NAME") == "AIX");
+  {
+    std::string const& systemName =
+      impl->Makefile->GetSafeDefinition("CMAKE_SYSTEM_NAME");
+    impl->IsAIX = (systemName == "AIX" || systemName == "OS400");
+  }
 
   // Check whether we are targeting an Android platform.
   impl->IsAndroid =
index 33c7514..aff7383 100644 (file)
@@ -1470,7 +1470,8 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
     add_subdirectory(GoogleTest)
   endif()
 
-  if(CMake_TEST_FindPython OR CMake_TEST_FindPython_NumPy OR CMake_TEST_FindPython_Conda)
+  if(CMake_TEST_FindPython OR CMake_TEST_FindPython_NumPy
+      OR CMake_TEST_FindPython_Conda OR CMake_TEST_FindPython_IronPython)
     add_subdirectory(FindPython)
   endif()
 
index 01fa6c3..5c954e2 100644 (file)
@@ -249,9 +249,9 @@ if(CMake_TEST_FindPython_NumPy)
     --build-options ${build_options}
     --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
   )
- endif()
+endif()
 
- if(CMake_TEST_FindPython_Conda)
+if(CMake_TEST_FindPython_Conda)
   add_test(NAME FindPython.VirtualEnvConda COMMAND
     ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
     --build-and-test
@@ -262,4 +262,68 @@ if(CMake_TEST_FindPython_NumPy)
     --build-options ${build_options}
     --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
     )
- endif()
+endif()
+
+if(CMake_TEST_FindPython_IronPython)
+  add_test(NAME FindPython.IronPython2.LOCATION COMMAND
+    ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+    --build-and-test
+    "${CMake_SOURCE_DIR}/Tests/FindPython/IronPython2"
+    "${CMake_BINARY_DIR}/Tests/FindPython/IronPython2.LOCATION"
+    ${build_generator_args}
+    --build-project TestIronPython2
+    --build-options ${build_options} -DPython2_FIND_STRATEGY=LOCATION
+    --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+    )
+  add_test(NAME FindPython.IronPython2.VERSION COMMAND
+    ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+    --build-and-test
+    "${CMake_SOURCE_DIR}/Tests/FindPython/IronPython2"
+    "${CMake_BINARY_DIR}/Tests/FindPython/IronPython2.VERSION"
+    ${build_generator_args}
+    --build-project TestIronPython2
+    --build-options ${build_options} -DPython2_FIND_STRATEGY=VERSION
+    --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+    )
+
+  add_test(NAME FindPython.IronPython.LOCATION COMMAND
+    ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+    --build-and-test
+    "${CMake_SOURCE_DIR}/Tests/FindPython/IronPython"
+    "${CMake_BINARY_DIR}/Tests/FindPython/IronPython.LOCATION"
+    ${build_generator_args}
+    --build-project TestIronPython
+    --build-options ${build_options} -DPython_FIND_STRATEGY=LOCATION
+    --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+    )
+  add_test(NAME FindPython.IronPython.VERSION COMMAND
+    ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+    --build-and-test
+    "${CMake_SOURCE_DIR}/Tests/FindPython/IronPython"
+    "${CMake_BINARY_DIR}/Tests/FindPython/IronPython.VERSION"
+    ${build_generator_args}
+    --build-project TestIronPython
+    --build-options ${build_options} -DPython_FIND_STRATEGY=VERSION
+    --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+    )
+  add_test(NAME FindPython.IronPython.V2.LOCATION COMMAND
+    ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+    --build-and-test
+    "${CMake_SOURCE_DIR}/Tests/FindPython/IronPython"
+    "${CMake_BINARY_DIR}/Tests/FindPython/IronPython.V2.LOCATION"
+    ${build_generator_args}
+    --build-project TestIronPython
+    --build-options ${build_options} -DPython_REQUESTED_VERSION=2 -DPython_FIND_STRATEGY=LOCATION
+    --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+    )
+  add_test(NAME FindPython.IronPython.V2.VERSION COMMAND
+    ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+    --build-and-test
+    "${CMake_SOURCE_DIR}/Tests/FindPython/IronPython"
+    "${CMake_BINARY_DIR}/Tests/FindPython/IronPython.V2.VERSION"
+    ${build_generator_args}
+    --build-project TestIronPython
+    --build-options ${build_options} -DPython_REQUESTED_VERSION=2 -DPython_FIND_STRATEGY=VERSION
+    --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+    )
+endif()
diff --git a/Tests/FindPython/IronPython/CMakeLists.txt b/Tests/FindPython/IronPython/CMakeLists.txt
new file mode 100644 (file)
index 0000000..c96a3e0
--- /dev/null
@@ -0,0 +1,22 @@
+cmake_minimum_required(VERSION 3.1)
+
+project(TestIronPython C)
+
+find_package(Python ${Python_REQUESTED_VERSION} REQUIRED COMPONENTS Interpreter Compiler)
+if (NOT Python_FOUND)
+  message (FATAL_ERROR "Fail to found Python ${Python_REQUESTED_VERSION}")
+endif()
+
+if (NOT Python_Compiler_FOUND)
+  message (FATAL_ERROR "Fail to found Python Compiler")
+endif()
+if (NOT Python_COMPILER_ID STREQUAL "IronPython")
+  message (FATAL_ERROR "Erroneous compiler ID (${Python_COMPILER_ID})")
+endif()
+
+if(NOT TARGET Python::Interpreter)
+  message(SEND_ERROR "Python::Interpreter not found")
+endif()
+if(NOT TARGET Python::Compiler)
+  message(SEND_ERROR "Python::Interpreter not found")
+endif()
diff --git a/Tests/FindPython/IronPython2/CMakeLists.txt b/Tests/FindPython/IronPython2/CMakeLists.txt
new file mode 100644 (file)
index 0000000..43ec309
--- /dev/null
@@ -0,0 +1,22 @@
+cmake_minimum_required(VERSION 3.1)
+
+project(TestIronPython2 C)
+
+find_package(Python2 REQUIRED COMPONENTS Interpreter Compiler)
+if (NOT Python2_FOUND)
+  message (FATAL_ERROR "Fail to found Python 2")
+endif()
+
+if (NOT Python2_Compiler_FOUND)
+  message (FATAL_ERROR "Fail to found Python 2 Compiler")
+endif()
+if (NOT Python2_COMPILER_ID STREQUAL "IronPython")
+  message (FATAL_ERROR "Erroneous compiler ID (${Python2_COMPILER_ID})")
+endif()
+
+if(NOT TARGET Python2::Interpreter)
+  message(SEND_ERROR "Python2::Interpreter not found")
+endif()
+if(NOT TARGET Python2::Compiler)
+  message(SEND_ERROR "Python2::Compiler not found")
+endif()
diff --git a/Tests/RunCMake/Ninja/ChangeBuildType.cmake b/Tests/RunCMake/Ninja/ChangeBuildType.cmake
new file mode 100644 (file)
index 0000000..80405a8
--- /dev/null
@@ -0,0 +1,12 @@
+enable_language(C)
+
+function(change_build_type_subdir)
+  set(CMAKE_BUILD_TYPE Release)
+  add_subdirectory(SubDirPrefix)
+endfunction()
+
+change_build_type_subdir()
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+add_executable(hello hello_sub_greeting.c)
+target_link_libraries(hello greeting)
index a00d830..0eada08 100644 (file)
@@ -307,3 +307,12 @@ function (run_PreventConfigureFileDupBuildRule)
   run_ninja("${RunCMake_TEST_BINARY_DIR}" -w dupbuild=err)
 endfunction()
 run_PreventConfigureFileDupBuildRule()
+
+function (run_ChangeBuildType)
+  set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ChangeBuildType-build)
+  set(RunCMake_TEST_OPTIONS "-DCMAKE_BUILD_TYPE:STRING=Debug")
+  run_cmake(ChangeBuildType)
+  unset(RunCMake_TEST_OPTIONS)
+  run_ninja("${RunCMake_TEST_BINARY_DIR}" -w dupbuild=err)
+endfunction()
+run_ChangeBuildType()
index 1696037..3119341 100644 (file)
@@ -17,14 +17,14 @@ endif()
 
 file(STRINGS ${foobar_pch_h_header} foobar_pch_h_header_strings)
 
-if (NOT foobar_pch_h_header_strings MATCHES ";#include <stddef.h>(;|$)")
+if (NOT foobar_pch_h_header_strings MATCHES ";#include \"[^\"]*PrecompileHeaders/include/foo_C.h\";#include <stddef.h>(;|$)")
   set(RunCMake_TEST_FAILED "Generated foo pch header\n  ${foobar_pch_h_header}\nhas bad content:\n  ${foobar_pch_h_header_strings}")
   return()
 endif()
 
 file(STRINGS ${foobar_pch_hxx_header} foobar_pch_hxx_header_strings)
 
-if (NOT foobar_pch_hxx_header_strings MATCHES ";#include <cstddef>(;|$)")
+if (NOT foobar_pch_hxx_header_strings MATCHES ";#include \"[^\"]*PrecompileHeaders/include/foo_CXX.h\";#include <cstddef>(;|$)")
   set(RunCMake_TEST_FAILED "Generated foo pch header\n  ${foobar_pch_hxx_header}\nhas bad content:\n  ${foobar_pch_hxx_header_strings}")
   return()
 endif()
index cdc42b2..bb18a64 100644 (file)
@@ -7,6 +7,8 @@ add_executable(foobar
 )
 target_include_directories(foobar PUBLIC include)
 target_precompile_headers(foobar PRIVATE
+  "$<$<COMPILE_LANGUAGE:C>:${CMAKE_CURRENT_SOURCE_DIR}/include/foo_C.h>"
+  "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/include/foo_CXX.h>"
   "$<$<COMPILE_LANGUAGE:C>:<stddef.h$<ANGLE-R>>"
   "$<$<COMPILE_LANGUAGE:CXX>:<cstddef$<ANGLE-R>>"
   )
diff --git a/Tests/RunCMake/PrecompileHeaders/include/foo_C.h b/Tests/RunCMake/PrecompileHeaders/include/foo_C.h
new file mode 100644 (file)
index 0000000..f4de601
--- /dev/null
@@ -0,0 +1 @@
+#include "foo.h"
diff --git a/Tests/RunCMake/PrecompileHeaders/include/foo_CXX.h b/Tests/RunCMake/PrecompileHeaders/include/foo_CXX.h
new file mode 100644 (file)
index 0000000..f4de601
--- /dev/null
@@ -0,0 +1 @@
+#include "foo.h"
index 28a94ce..5794d03 100644 (file)
@@ -134,11 +134,17 @@ function(_Boost_FIND_COMPONENT_DEPENDENCIES component includedir _ret_libs)
             continue()
           endif()
           if(component STREQUAL "python" AND
-             boost_component_match STREQUAL "numpy")
+             _boost_component_match STREQUAL "numpy")
             # Optional python dependency; skip to avoid making it a
             # hard dependency (handle as special-case for numpy).
             continue()
           endif()
+          if(component STREQUAL "nowide" AND
+             _boost_component_match STREQUAL "filesystem")
+            # Optional filesystem dependency; skip to avoid making it a
+            # hard dependency.
+            continue()
+          endif()
           if (_boost_dep_found EQUAL -1 AND
               NOT "${_boost_component_match}" STREQUAL "${component}")
             list(APPEND _boost_DEPS "${_boost_component_match}")