diff options
| author | Brad King <brad.king@kitware.com> | 2022-06-28 13:22:48 (GMT) |
|---|---|---|
| committer | Kitware Robot <kwrobot@kitware.com> | 2022-06-28 13:22:55 (GMT) |
| commit | 3fcdc98b7dfd028e4e90db26b289a0ee7ccb1202 (patch) | |
| tree | 236b576636f06f4aa281c2ac3d4c2cd9cf3fa7e3 /Tests/FindPython | |
| parent | 6f55f5847d7579d37deb7261b2fa0f256ea645b5 (diff) | |
| parent | ece3bedbf2cdc4857f19e2fceafa98a3f8002b4a (diff) | |
| download | CMake-3fcdc98b7dfd028e4e90db26b289a0ee7ccb1202.zip CMake-3fcdc98b7dfd028e4e90db26b289a0ee7ccb1202.tar.gz CMake-3fcdc98b7dfd028e4e90db26b289a0ee7ccb1202.tar.bz2 | |
Merge topic 'FindPython-multiple-queries'
ece3bedbf2 FindPython: fix error on multiple queries with different COMPONENTS
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7410
Diffstat (limited to 'Tests/FindPython')
| -rw-r--r-- | Tests/FindPython/CMakeLists.txt | 13 | ||||
| -rw-r--r-- | Tests/FindPython/DifferentComponents/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | Tests/FindPython/DifferentComponents/subdir/CMakeLists.txt | 2 |
3 files changed, 22 insertions, 0 deletions
diff --git a/Tests/FindPython/CMakeLists.txt b/Tests/FindPython/CMakeLists.txt index 520ba9e..d4cf36b 100644 --- a/Tests/FindPython/CMakeLists.txt +++ b/Tests/FindPython/CMakeLists.txt @@ -423,6 +423,19 @@ if(CMake_TEST_FindPython) --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> ) + add_test(NAME FindPython.DifferentComponents COMMAND + ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/DifferentComponents" + "${CMake_BINARY_DIR}/Tests/FindPython/DifferentComponents" + ${build_generator_args} + --build-project DifferentComponents + --build-options ${build_options} "-Dbuild_generator_args=${build_generator_args}" + "-DCMake_SOURCE_DIR=${CMake_SOURCE_DIR}" + "-DCMake_BINARY_DIR=${CMake_BINARY_DIR}" + --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> + ) + if (CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin") add_test(NAME FindPython.Interpreter.SOABI COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> diff --git a/Tests/FindPython/DifferentComponents/CMakeLists.txt b/Tests/FindPython/DifferentComponents/CMakeLists.txt new file mode 100644 index 0000000..7476632 --- /dev/null +++ b/Tests/FindPython/DifferentComponents/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) + +project(TestDifferentComponents LANGUAGES C) + +add_subdirectory(subdir) + +find_package(Python3 REQUIRED COMPONENTS Development.Module) diff --git a/Tests/FindPython/DifferentComponents/subdir/CMakeLists.txt b/Tests/FindPython/DifferentComponents/subdir/CMakeLists.txt new file mode 100644 index 0000000..98fcd5f --- /dev/null +++ b/Tests/FindPython/DifferentComponents/subdir/CMakeLists.txt @@ -0,0 +1,2 @@ + +find_package(Python3 REQUIRED COMPONENTS Development) |
