diff options
author | Brad King <brad.king@kitware.com> | 2023-05-18 17:38:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-18 17:41:31 (GMT) |
commit | 21df34b25526225d04f9f5e6351c13e68425e195 (patch) | |
tree | d7f5812b168ced0c19ce220672fd31b450ffa5f6 /Tests | |
parent | 4d5c32fa2cd0170617d1ab489b17ec7fee87b89d (diff) | |
download | CMake-21df34b25526225d04f9f5e6351c13e68425e195.zip CMake-21df34b25526225d04f9f5e6351c13e68425e195.tar.gz CMake-21df34b25526225d04f9f5e6351c13e68425e195.tar.bz2 |
Tests: Modernize name of option to control existence of BootstrapTest
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 2fa962e..af4ac55 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3310,18 +3310,20 @@ if(BUILD_TESTING) endif() endif() - if(CMake_TEST_EXTERNAL_CMAKE) - set(CMAKE_SKIP_BOOTSTRAP_TEST 1) - endif() - if("${CMAKE_GENERATOR}" MATCHES Xcode) - set(CMAKE_SKIP_BOOTSTRAP_TEST 1) - endif() - if(EXISTS "${CMake_BINARY_DIR}/CMakeLists.txt") - # If there is CMakeLists.txt in the binary tree, assume in-source build - set(CMAKE_SKIP_BOOTSTRAP_TEST 1) + if(NOT DEFINED CMake_TEST_BOOTSTRAP) + if(CMAKE_RUN_LONG_TESTS + AND NOT CMAKE_SKIP_BOOTSTRAP_TEST + AND NOT CMake_TEST_EXTERNAL_CMAKE + AND NOT CMAKE_GENERATOR MATCHES "Xcode" + AND NOT EXISTS "${CMake_BINARY_DIR}/CMakeLists.txt" + ) + set(CMake_TEST_BOOTSTRAP 1) + else() + set(CMake_TEST_BOOTSTRAP 0) + endif() endif() set(bootstrap "") - if(CMAKE_RUN_LONG_TESTS AND NOT CMAKE_SKIP_BOOTSTRAP_TEST) + if(CMake_TEST_BOOTSTRAP) if(UNIX) set(bootstrap ${CMake_SOURCE_DIR}/bootstrap) elseif(MSYS) |