diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2022-08-20 22:26:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-22 13:24:46 (GMT) |
commit | dd28d76203aa3c4745b518a8b9bae7e7bb70b70d (patch) | |
tree | 1e5a5c6ca5d4670cfd60eacfe51e455f84efb8ef /Tests/CMakeLists.txt | |
parent | a509602699eb83fbbea67244051c8a18f708a6ae (diff) | |
download | CMake-dd28d76203aa3c4745b518a8b9bae7e7bb70b70d.zip CMake-dd28d76203aa3c4745b518a8b9bae7e7bb70b70d.tar.gz CMake-dd28d76203aa3c4745b518a8b9bae7e7bb70b70d.tar.bz2 |
CMakeLists: Remove redundant spaces around CMake command calls
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 24a7c88..d9b3c03 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -89,7 +89,7 @@ if(BUILD_TESTING) endif() endif() - set(MAKE_IS_GNU ) + set(MAKE_IS_GNU) if(CMAKE_MAKE_PROGRAM MATCHES make) execute_process(COMMAND ${CMAKE_MAKE_PROGRAM} no_such_target --version RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_VARIABLE out) @@ -101,7 +101,7 @@ if(BUILD_TESTING) endif() # some old versions of make simply cannot handle spaces in paths - if (MAKE_IS_GNU OR + if(MAKE_IS_GNU OR CMAKE_MAKE_PROGRAM MATCHES "nmake|gmake|wmake" OR CMAKE_GENERATOR MATCHES "Visual Studio|Xcode|Borland|Ninja") set(MAKE_SUPPORTS_SPACES 1) @@ -181,7 +181,7 @@ if(BUILD_TESTING) ERROR_VARIABLE my_err) string(REGEX REPLACE "HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Wow6432Node\\\\Microsoft\\\\Windows CE Tools\\\\SDKs\\\\" ";" sdk_list "${sdk_reg}") list(LENGTH sdk_list sdk_list_len) - if (${sdk_list_len} GREATER 1) + if(${sdk_list_len} GREATER 1) list(GET sdk_list 1 _sdk) # The first entry is always empty due to the regex replace above string(STRIP ${_sdk} _sdk) # Make sure there is no newline in the SDK name endif() @@ -287,12 +287,12 @@ if(BUILD_TESTING) "Should the long tests be run (such as Bootstrap)." ON) mark_as_advanced(CMAKE_RUN_LONG_TESTS) - if (CMAKE_RUN_LONG_TESTS) + if(CMAKE_RUN_LONG_TESTS) option(CTEST_TEST_CTEST "Should the tests that run a full sub ctest process be run?" OFF) mark_as_advanced(CTEST_TEST_CTEST) - endif () + endif() option(CTEST_TEST_CPACK "Should the tests that use '--build-target package' be run?" @@ -367,9 +367,9 @@ if(BUILD_TESTING) if(CMake_TEST_RESOURCES) ADD_TEST_MACRO(VSResource VSResource) - if (CMAKE_GENERATOR MATCHES "Ninja") + if(CMAKE_GENERATOR MATCHES "Ninja") add_test_macro(VSResourceNinjaForceRSP VSResourceNinjaForceRSP) - endif () + endif() endif() if(_isMultiConfig) set(MSManifest_CTEST_OPTIONS -C $<CONFIGURATION>) @@ -499,7 +499,7 @@ if(BUILD_TESTING) endif() ADD_TEST_MACRO(SourcesProperty SourcesProperty) ADD_TEST_MACRO(SourceFileProperty SourceFileProperty) - if (NOT CMAKE_GENERATOR STREQUAL "Xcode") + if(NOT CMAKE_GENERATOR STREQUAL "Xcode") ADD_TEST_MACRO(SourceFileIncludeDirProperty SourceFileIncludeDirProperty) endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "LCC" OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" @@ -646,11 +646,11 @@ if(BUILD_TESTING) ADD_TEST_MACRO(Module.WriteCompilerDetectionHeader WriteCompilerDetectionHeader) - if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "LCC") + if(APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "LCC") include(CheckCXXCompilerFlag) check_cxx_compiler_flag(-fPIE run_pic_test) else() - if (CMAKE_CXX_COMPILER_ID MATCHES "PGI" + if(CMAKE_CXX_COMPILER_ID MATCHES "PGI" OR CMAKE_CXX_COMPILER_ID MATCHES "PathScale" OR CMAKE_CXX_COMPILER_ID MATCHES "Intel") set(run_pic_test 0) @@ -659,7 +659,7 @@ if(BUILD_TESTING) endif() endif() - if (run_pic_test) + if(run_pic_test) ADD_TEST_MACRO(PositionIndependentTargets PositionIndependentTargets) endif() @@ -793,7 +793,7 @@ if(BUILD_TESTING) --build-exe-dir "${CMake_BINARY_DIR}/Tests/SubProject/foo" --test-command foo ) - set_tests_properties ( SubProject-Stage2 PROPERTIES DEPENDS SubProject) + set_tests_properties(SubProject-Stage2 PROPERTIES DEPENDS SubProject) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SubProject") endif() @@ -1352,7 +1352,7 @@ if(BUILD_TESTING) --test-command complex) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ComplexOneConfig") # because of the registry write these tests depend on each other - set_tests_properties ( complex PROPERTIES DEPENDS complexOneConfig) + set_tests_properties(complex PROPERTIES DEPENDS complexOneConfig) add_test(Environment ${CMAKE_CTEST_COMMAND} --build-and-test @@ -1540,7 +1540,7 @@ if(BUILD_TESTING) # CMake_TEST_FindMatlab_MCR_ROOT_DIR: indicates an optional root directory for the MCR, required on Linux if(CMake_TEST_FindMatlab OR CMake_TEST_FindMatlab_ROOT_DIR OR CMake_TEST_FindMatlab_MCR OR CMake_TEST_FindMatlab_MCR_ROOT_DIR) - set(FindMatlab_additional_test_options ) + set(FindMatlab_additional_test_options) if(CMake_TEST_FindMatlab_MCR OR CMake_TEST_FindMatlab_MCR_ROOT_DIR) set(FindMatlab_additional_test_options -DIS_MCR=TRUE) endif() @@ -1673,7 +1673,8 @@ if(BUILD_TESTING) RUN_SERIAL 1 TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT} WORKING_DIRECTORY ${CMake_SOURCE_DIR}/Tests/ExternalProjectUpdate - DEPENDS ExternalProjectUpdateSetup ) + DEPENDS ExternalProjectUpdateSetup + ) execute_process( COMMAND ${CMAKE_COMMAND} @@ -1728,7 +1729,7 @@ if(BUILD_TESTING) function(add_tutorial_test step_name use_mymath tutorial_arg pass_regex) set(tutorial_test_name Tutorial${step_name}) set(tutorial_build_dir "${CMake_BINARY_DIR}/Tests/Tutorial/${step_name}") - if (use_mymath) + if(use_mymath) set(tutorial_build_options "") else() set(tutorial_test_name ${tutorial_test_name}_MYMATH) @@ -1752,7 +1753,7 @@ if(BUILD_TESTING) if(NOT CMake_TEST_EXTERNAL_CMAKE) foreach(STP RANGE 2 12) - if (STP EQUAL 8) + if(STP EQUAL 8) set(pass_regex ".*using log and exp") else() set(pass_regex "The square root of 25 is 5") @@ -2011,11 +2012,11 @@ if(BUILD_TESTING) --test-command Exec2 ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/LinkLineOrder") - set_tests_properties ( qtwrapping PROPERTIES DEPENDS wrapping) - set_tests_properties ( testdriver1 PROPERTIES DEPENDS qtwrapping) - set_tests_properties ( testdriver2 PROPERTIES DEPENDS testdriver1) - set_tests_properties ( testdriver3 PROPERTIES DEPENDS testdriver2) - set_tests_properties ( linkorder2 PROPERTIES DEPENDS linkorder1) + set_tests_properties(qtwrapping PROPERTIES DEPENDS wrapping) + set_tests_properties(testdriver1 PROPERTIES DEPENDS qtwrapping) + set_tests_properties(testdriver2 PROPERTIES DEPENDS testdriver1) + set_tests_properties(testdriver3 PROPERTIES DEPENDS testdriver2) + set_tests_properties(linkorder2 PROPERTIES DEPENDS linkorder1) # Test static linking on toolchains known to support it. if((CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "LCC") @@ -2047,9 +2048,9 @@ if(BUILD_TESTING) "${CMake_BINARY_DIR}/Tests/SubDirSpaces/testfromsubdir.obj" ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SubDirSpaces") - endif () + endif() - if (WIN32) + if(WIN32) add_test(SubDir ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/SubDir" @@ -2061,7 +2062,7 @@ if(BUILD_TESTING) "${CMake_BINARY_DIR}/Tests/SubDir/ShouldBeHere" "${CMake_BINARY_DIR}/Tests/SubDir/testfromsubdir.obj" ) - else () + else() add_test(SubDir ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/SubDir" @@ -2073,7 +2074,7 @@ if(BUILD_TESTING) "${CMake_BINARY_DIR}/Tests/SubDir/ShouldBeHere" "${CMake_BINARY_DIR}/Tests/SubDir/testfromsubdir.o" ) - endif () + endif() list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SubDir") if(MSVC OR (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_SIMULATE_ID STREQUAL "MSVC")) @@ -2106,7 +2107,7 @@ if(BUILD_TESTING) ADD_TEST_MACRO(ModuleDefinition example_exe) endif() - if (CMAKE_C_COMPILER_ID MATCHES "Watcom" AND WIN32) + if(CMAKE_C_COMPILER_ID MATCHES "Watcom" AND WIN32) ADD_TEST_MACRO(WatcomRuntimeLibrary) endif() @@ -2321,7 +2322,7 @@ if(BUILD_TESTING) ADD_TEST_MACRO(VSNASM VSNASM) endif() - if (CMake_TEST_GreenHillsMULTI) + if(CMake_TEST_GreenHillsMULTI) macro(add_test_GhsMulti test_name test_dir bin_sub_dir build_opts) separate_arguments(_ghs_build_opts UNIX_COMMAND ${build_opts}) separate_arguments(_ghs_toolset_extra UNIX_COMMAND ${ghs_toolset_extra}) @@ -2382,7 +2383,7 @@ if(BUILD_TESTING) set(ghs_config_name "__default__") endif() # test integrity build - if (NOT ghs_skip_integrity AND (NOT ghs_target_platform OR ghs_target_platform MATCHES "integrity")) + if(NOT ghs_skip_integrity AND (NOT ghs_target_platform OR ghs_target_platform MATCHES "integrity")) add_test_GhsMulti(integrityDDInt GhsMultiIntegrity/GhsMultiIntegrityDDInt "" "") add_test_GhsMulti(integrityMonolith GhsMultiIntegrity/GhsMultiIntegrityMonolith "" "") add_test_GhsMulti(integrityDD GhsMultiIntegrity/GhsMultiIntegrityDD "" "") @@ -2464,8 +2465,8 @@ if(BUILD_TESTING) add_test_VSAndroid(vs17 "Visual Studio 17 2022" "ARM") endif() - if (APPLE) - if (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + if(APPLE) + if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") set(BundleTestInstallDir "${CMake_BINARY_DIR}/Tests/BundleTest/InstallDirectory") add_test(BundleTest ${CMAKE_CTEST_COMMAND} @@ -2501,8 +2502,8 @@ if(BUILD_TESTING) add_subdirectory(ObjC) add_subdirectory(ObjCXX) - endif () - endif () + endif() + endif() if(APPLE AND CTEST_TEST_CPACK) add_test(BundleGeneratorTest ${CMAKE_CTEST_COMMAND} @@ -3223,24 +3224,24 @@ if(BUILD_TESTING) --output-log "${CMake_BINARY_DIR}/Tests/CTestTestFdSetSize/testOutput.log" ) - if (CMAKE_TESTS_CDASH_SERVER) + if(CMAKE_TESTS_CDASH_SERVER) set(regex "^([^:]+)://([^/]+)(.*)$") - if ("${CMAKE_TESTS_CDASH_SERVER}" MATCHES "${regex}") + if("${CMAKE_TESTS_CDASH_SERVER}" MATCHES "${regex}") set(protocol "${CMAKE_MATCH_1}") set(server "${CMAKE_MATCH_2}") set(path "${CMAKE_MATCH_3}") - else () + else() set(protocol "http") set(server "open.cdash.org") set(path "") message("warning: CMAKE_TESTS_CDASH_SERVER does not match expected regex...") message(" ...using default url='${protocol}://${server}${path}' for CTestTest[23]") - endif () - endif () + endif() + endif() - if (CTEST_TEST_CTEST AND CMAKE_RUN_LONG_TESTS AND CMAKE_TESTS_CDASH_SERVER) + if(CTEST_TEST_CTEST AND CMAKE_RUN_LONG_TESTS AND CMAKE_TESTS_CDASH_SERVER) configure_file("${CMake_SOURCE_DIR}/Tests/CTestTest/test.cmake.in" "${CMake_BINARY_DIR}/Tests/CTestTest/test.cmake" @ONLY ESCAPE_QUOTES) add_test(CTestTest ${CMAKE_CTEST_COMMAND} @@ -3282,19 +3283,19 @@ if(BUILD_TESTING) # these tests take a long time, make sure they have it # if timeouts have not already been set get_test_property(CTestTest TIMEOUT PREVIOUS_TIMEOUT) - if ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) - set_tests_properties ( CTestTest + if("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) + set_tests_properties(CTestTest PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) - endif () + endif() if(NOT CMake_TEST_EXTERNAL_CMAKE) get_test_property(CTestTest2 TIMEOUT PREVIOUS_TIMEOUT) if("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) - set_tests_properties ( CTestTest2 + set_tests_properties(CTestTest2 PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) endif() endif() - endif () + endif() if(CMake_TEST_EXTERNAL_CMAKE) set(CMAKE_SKIP_BOOTSTRAP_TEST 1) @@ -3330,10 +3331,9 @@ if(BUILD_TESTING) # provide more time for the bootstrap test get_test_property(BootstrapTest TIMEOUT PREVIOUS_TIMEOUT) - if ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) - set_tests_properties ( BootstrapTest - PROPERTIES TIMEOUT 5400) - endif () + if("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND) + set_tests_properties(BootstrapTest PROPERTIES TIMEOUT 5400) + endif() endif() if(CMAKE_Fortran_COMPILER) @@ -3412,7 +3412,7 @@ if(BUILD_TESTING) ) # E2K has broken Java RVM before 3.5.2 - if (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "e2k" AND _result EQUAL 0) + if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "e2k" AND _result EQUAL 0) string(REGEX MATCH "RVM ([0-9.]+)" RVMVER "${_version}") # Consider empty match a broken version too if("${CMAKE_MATCH_1}" VERSION_LESS "3.5.2") @@ -3435,7 +3435,7 @@ if(BUILD_TESTING) math(EXPR _object_mode "${CMAKE_SIZEOF_VOID_P} * 8") if(_result EQUAL 0 AND _version MATCHES "${_object_mode}-Bit") ## next test is valid only if Java version is less than 1.10 - if ("${Java_VERSION}" VERSION_LESS 1.10) + if("${Java_VERSION}" VERSION_LESS 1.10) add_test(NAME Java.Javah COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIG> --build-and-test "${CMake_SOURCE_DIR}/Tests/JavaJavah" @@ -3447,7 +3447,7 @@ if(BUILD_TESTING) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/JavaJavah") endif() ## next test is valid only if Java is, at least, version 1.8 - if (NOT "${Java_VERSION}" VERSION_LESS 1.8) + if(NOT "${Java_VERSION}" VERSION_LESS 1.8) add_test(NAME Java.NativeHeaders COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIG> --build-and-test "${CMake_SOURCE_DIR}/Tests/JavaNativeHeaders" @@ -3522,18 +3522,18 @@ if(BUILD_TESTING) endif() if(CMAKE_TEST_PLPLOT_DIR) - add_test(plplot ${CMAKE_CTEST_COMMAND} -V -S ${CMAKE_TEST_PLPLOT_DIR}/../../EasyDashboardScripts/plplot.cmake ) + add_test(plplot ${CMAKE_CTEST_COMMAND} -V -S ${CMAKE_TEST_PLPLOT_DIR}/../../EasyDashboardScripts/plplot.cmake) set_tests_properties ( plplot PROPERTIES TIMEOUT 5400) endif() if(CMAKE_TEST_CHICKEN_DIR) - add_test(Chicken ${CMAKE_CTEST_COMMAND} -V -S ${CMAKE_TEST_CHICKEN_DIR}/../../EasyDashboardScripts/Chicken.cmake ) - set_tests_properties ( Chicken PROPERTIES TIMEOUT 5400) + add_test(Chicken ${CMAKE_CTEST_COMMAND} -V -S ${CMAKE_TEST_CHICKEN_DIR}/../../EasyDashboardScripts/Chicken.cmake) + set_tests_properties(Chicken PROPERTIES TIMEOUT 5400) endif() if(CMAKE_TEST_KDELIBS_ALPHA_1_DIR) - add_test(KDELibsAlpha1 ${CMAKE_CTEST_COMMAND} -V -S ${CMAKE_TEST_KDELIBS_ALPHA_1_DIR}/../../EasyDashboardScripts/kdelibs.cmake ) - set_tests_properties ( KDELibsAlpha1 PROPERTIES TIMEOUT 5400) + add_test(KDELibsAlpha1 ${CMAKE_CTEST_COMMAND} -V -S ${CMAKE_TEST_KDELIBS_ALPHA_1_DIR}/../../EasyDashboardScripts/kdelibs.cmake) + set_tests_properties(KDELibsAlpha1 PROPERTIES TIMEOUT 5400) endif() # Define a set of "contract" tests, each activated by a cache entry |