From 21df34b25526225d04f9f5e6351c13e68425e195 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 18 May 2023 13:38:02 -0400 Subject: Tests: Modernize name of option to control existence of BootstrapTest --- .gitlab/ci/configure_common.cmake | 2 +- .gitlab/ci/configure_extdeps_common.cmake | 2 +- .gitlab/ci/configure_macos_package_common.cmake | 2 +- .gitlab/ci/configure_windows_package_common.cmake | 2 +- Tests/CMakeLists.txt | 22 ++++++++++++---------- Utilities/Release/linux/aarch64/cache.txt | 2 +- Utilities/Release/linux/x86_64/cache.txt | 2 +- 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.gitlab/ci/configure_common.cmake b/.gitlab/ci/configure_common.cmake index ed3d18d..c207a74 100644 --- a/.gitlab/ci/configure_common.cmake +++ b/.gitlab/ci/configure_common.cmake @@ -2,7 +2,7 @@ if("$ENV{CMAKE_CI_BOOTSTRAP}") # Launchers do not work during bootstrap: no ctest available. set(CTEST_USE_LAUNCHERS "OFF" CACHE BOOL "") # We configure by bootstrapping, so skip the BootstrapTest. - set(CMAKE_SKIP_BOOTSTRAP_TEST ON CACHE BOOL "") + set(CMake_TEST_BOOTSTRAP OFF CACHE BOOL "") else() set(CTEST_USE_LAUNCHERS "ON" CACHE BOOL "") endif() diff --git a/.gitlab/ci/configure_extdeps_common.cmake b/.gitlab/ci/configure_extdeps_common.cmake index 2c7d328..c06592c 100644 --- a/.gitlab/ci/configure_extdeps_common.cmake +++ b/.gitlab/ci/configure_extdeps_common.cmake @@ -1,5 +1,5 @@ set(CMAKE_USE_SYSTEM_LIBRARIES ON CACHE BOOL "") -set(CMAKE_SKIP_BOOTSTRAP_TEST ON CACHE BOOL "") +set(CMake_TEST_BOOTSTRAP OFF CACHE BOOL "") set(CMake_TEST_Qt6 OFF CACHE BOOL "") include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_macos_package_common.cmake b/.gitlab/ci/configure_macos_package_common.cmake index 3aa8ae2..8aab41b 100644 --- a/.gitlab/ci/configure_macos_package_common.cmake +++ b/.gitlab/ci/configure_macos_package_common.cmake @@ -10,12 +10,12 @@ set(CMAKE_CXX_FLAGS "-stdlib=libc++" CACHE STRING "") set(CMAKE_C_STANDARD "11" CACHE STRING "") set(CMAKE_CXX_STANDARD "14" CACHE STRING "") set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "") -set(CMAKE_SKIP_BOOTSTRAP_TEST "TRUE" CACHE STRING "") set(BUILD_CursesDialog "ON" CACHE BOOL "") set(BUILD_QtDialog "TRUE" CACHE BOOL "") set(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL "3" CACHE STRING "") set(CMake_INSTALL_DEPENDENCIES "ON" CACHE BOOL "") set(CMAKE_SKIP_RPATH "TRUE" CACHE BOOL "") +set(CMake_TEST_BOOTSTRAP OFF CACHE BOOL "") set(CMake_TEST_NO_FindPackageModeMakefileTest "TRUE" CACHE BOOL "") # XXX(sccache): restore sccache when it works for multiple architectures: diff --git a/.gitlab/ci/configure_windows_package_common.cmake b/.gitlab/ci/configure_windows_package_common.cmake index b3929a4..541a541 100644 --- a/.gitlab/ci/configure_windows_package_common.cmake +++ b/.gitlab/ci/configure_windows_package_common.cmake @@ -13,7 +13,7 @@ set(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL "3" CACHE STRING "") # Disable ccmake. set(BUILD_CursesDialog "OFF" CACHE BOOL "") -set(CMAKE_SKIP_BOOTSTRAP_TEST "TRUE" CACHE STRING "") +set(CMake_TEST_BOOTSTRAP OFF CACHE BOOL "") set(CMake_TEST_Java OFF CACHE BOOL "") set(CMake_TEST_Qt5 OFF CACHE BOOL "") set(CMake_TEST_Qt6 OFF CACHE BOOL "") 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) diff --git a/Utilities/Release/linux/aarch64/cache.txt b/Utilities/Release/linux/aarch64/cache.txt index 87851d5..70739d4 100644 --- a/Utilities/Release/linux/aarch64/cache.txt +++ b/Utilities/Release/linux/aarch64/cache.txt @@ -32,7 +32,7 @@ SPHINX_QTHELP:BOOL=ON QHELPGENERATOR_EXECUTABLE:PATH=/opt/qt/bin/qhelpgenerator # We bootstrap as part of the build so skip its test. -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE +CMake_TEST_BOOTSTRAP:BOOL=FALSE # Skip Qt5 tests because our Qt is static. CMake_TEST_Qt5:BOOL=FALSE diff --git a/Utilities/Release/linux/x86_64/cache.txt b/Utilities/Release/linux/x86_64/cache.txt index d32c3dd..0b9696b 100644 --- a/Utilities/Release/linux/x86_64/cache.txt +++ b/Utilities/Release/linux/x86_64/cache.txt @@ -32,7 +32,7 @@ SPHINX_QTHELP:BOOL=ON QHELPGENERATOR_EXECUTABLE:PATH=/opt/qt/bin/qhelpgenerator # We bootstrap as part of the build so skip its test. -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE +CMake_TEST_BOOTSTRAP:BOOL=FALSE # Skip Qt5 tests because our Qt is static. CMake_TEST_Qt5:BOOL=FALSE -- cgit v0.12