File tree Expand file tree Collapse file tree 4 files changed +26
-2
lines changed
Expand file tree Collapse file tree 4 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -2861,7 +2861,8 @@ if (("Development.Module" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS
28612861 endif ()
28622862 unset (_${_PYTHON_PREFIX} _INCLUDE_HINTS)
28632863
2864- if (_${_PYTHON_PREFIX} _LIBRARY_RELEASE)
2864+ if ("LIBRARY" IN_LIST _${_PYTHON_PREFIX} _FIND_DEVELOPMENT_ARTIFACTS
2865+ AND _${_PYTHON_PREFIX} _LIBRARY_RELEASE)
28652866 # Use the library's install prefix as a hint
28662867 if (_${_PYTHON_PREFIX} _LIBRARY_RELEASE MATCHES "^(.+/Frameworks/Python.framework/Versions/[0-9.]+)" )
28672868 list (APPEND _${_PYTHON_PREFIX} _INCLUDE_HINTS "${CMAKE_MATCH_1} " )
@@ -2945,7 +2946,8 @@ if (("Development.Module" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS
29452946 if (_${_PYTHON_PREFIX} _INCLUDE_DIR)
29462947 # retrieve version from header file
29472948 _python_get_version (INCLUDE PREFIX _${_PYTHON_PREFIX} _INC_)
2948- if (_${_PYTHON_PREFIX} _LIBRARY_RELEASE)
2949+ if ("LIBRARY" IN_LIST _${_PYTHON_PREFIX} _FIND_DEVELOPMENT_ARTIFACTS
2950+ AND _${_PYTHON_PREFIX} _LIBRARY_RELEASE)
29492951 if ("${_${_PYTHON_PREFIX} _INC_VERSION_MAJOR}.${_${_PYTHON_PREFIX} _INC_VERSION_MINOR}"
29502952 VERSION_EQUAL _${_PYTHON_PREFIX} _VERSION)
29512953 # update versioning
Original file line number Diff line number Diff line change @@ -423,6 +423,19 @@ if(CMake_TEST_FindPython)
423423 --test -command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION >
424424 )
425425
426+ add_test (NAME FindPython.DifferentComponents COMMAND
427+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION >
428+ --build -and -test
429+ "${CMake_SOURCE_DIR} /Tests/FindPython/DifferentComponents"
430+ "${CMake_BINARY_DIR} /Tests/FindPython/DifferentComponents"
431+ ${build_generator_args}
432+ --build -project DifferentComponents
433+ --build -options ${build_options} "-Dbuild_generator_args=${build_generator_args} "
434+ "-DCMake_SOURCE_DIR=${CMake_SOURCE_DIR} "
435+ "-DCMake_BINARY_DIR=${CMake_BINARY_DIR} "
436+ --test -command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION >
437+ )
438+
426439 if (CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin" )
427440 add_test (NAME FindPython.Interpreter.SOABI COMMAND
428441 ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION >
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.1)
2+
3+ project (TestDifferentComponents LANGUAGES C)
4+
5+ add_subdirectory (subdir)
6+
7+ find_package (Python3 REQUIRED COMPONENTS Development.Module)
Original file line number Diff line number Diff line change 1+
2+ find_package (Python3 REQUIRED COMPONENTS Development)
You can’t perform that action at this time.
0 commit comments