diff options
author | Brad King <brad.king@kitware.com> | 2019-05-23 12:52:47 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-05-23 12:59:25 (GMT) |
commit | 5222400d9f574b5f953a2fe1d2c95a9754c683f3 (patch) | |
tree | f771c47eef6ff4d8bbea456bd686ca30119d83f9 /Tests | |
parent | cbd1c5b4ab16fa3e1086417f010e7bbad42cc50d (diff) | |
parent | 8517b549f44eb41c93eb1c448de176ad4172f083 (diff) | |
download | CMake-5222400d9f574b5f953a2fe1d2c95a9754c683f3.zip CMake-5222400d9f574b5f953a2fe1d2c95a9754c683f3.tar.gz CMake-5222400d9f574b5f953a2fe1d2c95a9754c683f3.tar.bz2 |
Merge topic 'FindPython-find_strategy'
8517b549f4 FindPython: Add policy to manage lookup stratgey default.
9f205acefe FindPython: Implement lookup strategies.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3354
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/FindPython/CMakeLists.txt | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/Tests/FindPython/CMakeLists.txt b/Tests/FindPython/CMakeLists.txt index 8dfcf40..4be2f22 100644 --- a/Tests/FindPython/CMakeLists.txt +++ b/Tests/FindPython/CMakeLists.txt @@ -1,12 +1,22 @@ if(CMake_TEST_FindPython) - add_test(NAME FindPython.Python2 COMMAND + add_test(NAME FindPython.Python2.LOCATION COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> --build-and-test "${CMake_SOURCE_DIR}/Tests/FindPython/Python2" - "${CMake_BINARY_DIR}/Tests/FindPython/Python2" + "${CMake_BINARY_DIR}/Tests/FindPython/Python2.LOCATION" ${build_generator_args} --build-project TestPython2 - --build-options ${build_options} + --build-options ${build_options} -DPython2_FIND_STRATEGY=LOCATION + --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> + ) + add_test(NAME FindPython.Python2.VERSION COMMAND + ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/Python2" + "${CMake_BINARY_DIR}/Tests/FindPython/Python2.VERSION" + ${build_generator_args} + --build-project TestPython2 + --build-options ${build_options} -DPython2_FIND_STRATEGY=VERSION --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> ) @@ -23,14 +33,24 @@ if(CMake_TEST_FindPython) set_tests_properties(FindPython.Python2Fail PROPERTIES PASS_REGULAR_EXPRESSION "Could NOT find Python2 \\(missing: foobar\\)") - add_test(NAME FindPython.Python3 COMMAND + add_test(NAME FindPython.Python3.LOCATION COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> --build-and-test "${CMake_SOURCE_DIR}/Tests/FindPython/Python3" - "${CMake_BINARY_DIR}/Tests/FindPython/Python3" + "${CMake_BINARY_DIR}/Tests/FindPython/Python3.LOCATION" ${build_generator_args} --build-project TestPython3 - --build-options ${build_options} + --build-options ${build_options} -DPython3_FIND_STRATEGY=LOCATION + --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> + ) + add_test(NAME FindPython.Python3.VERSION COMMAND + ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindPython/Python3" + "${CMake_BINARY_DIR}/Tests/FindPython/Python3.VERSION" + ${build_generator_args} + --build-project TestPython3 + --build-options ${build_options} -DPython3_FIND_STRATEGY=VERSION --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> ) |