summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-08-21 02:26:22 +0400
committerBrad King <brad.king@kitware.com>2022-09-22 09:24:46 -0400
commitdd28d76203aa3c4745b518a8b9bae7e7bb70b70d (patch)
tree1e5a5c6ca5d4670cfd60eacfe51e455f84efb8ef
parenta509602699eb83fbbea67244051c8a18f708a6ae (diff)
downloadcmake-dd28d76203aa3c4745b518a8b9bae7e7bb70b70d.tar.gz
CMakeLists: Remove redundant spaces around CMake command calls
-rw-r--r--CMakeLists.txt25
-rw-r--r--Source/CMakeLists.txt12
-rw-r--r--Source/QtDialog/CMakeLists.txt20
-rw-r--r--Tests/CMakeLists.txt112
4 files changed, 85 insertions, 84 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3d26ba9196..00e0052ddc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,7 +81,7 @@ if(NOT DEFINED CMAKE_C_STANDARD AND NOT CMake_NO_C_STANDARD)
endif()
endif()
if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD)
- if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.14)
+ if(CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.14)
set(CMAKE_CXX_STANDARD 98)
else()
if(NOT CMAKE_VERSION VERSION_LESS 3.8)
@@ -143,7 +143,7 @@ option(CMake_BUILD_DEVELOPER_REFERENCE
mark_as_advanced(CMake_BUILD_DEVELOPER_REFERENCE)
# option to build using interprocedural optimizations (IPO/LTO)
-if (NOT CMAKE_VERSION VERSION_LESS 3.12.2)
+if(NOT CMAKE_VERSION VERSION_LESS 3.12.2)
option(CMake_BUILD_LTO "Compile CMake with link-time optimization if supported" OFF)
if(CMake_BUILD_LTO)
include(CheckIPOSupported)
@@ -344,7 +344,7 @@ endmacro()
# a macro to build the utilities used by CMake
# Simply to improve readability of the main script.
#-----------------------------------------------------------------------
-macro (CMAKE_BUILD_UTILITIES)
+macro(CMAKE_BUILD_UTILITIES)
find_package(Threads)
# Suppress unnecessary checks in third-party code.
@@ -400,7 +400,7 @@ macro (CMAKE_BUILD_UTILITIES)
# Setup third-party libraries.
# Everything in the tree should be able to include files from the
# Utilities directory.
- if ((CMAKE_SYSTEM_NAME STREQUAL "AIX" OR CMAKE_SYSTEM_NAME STREQUAL "OS400") AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ if((CMAKE_SYSTEM_NAME STREQUAL "AIX" OR CMAKE_SYSTEM_NAME STREQUAL "OS400") AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# using -isystem option generate error "template with C linkage"
include_directories("${CMake_SOURCE_DIR}/Utilities/std")
else()
@@ -408,7 +408,7 @@ macro (CMAKE_BUILD_UTILITIES)
endif()
include_directories("${CMake_BINARY_DIR}/Utilities")
- if ((CMAKE_SYSTEM_NAME STREQUAL "AIX" OR CMAKE_SYSTEM_NAME STREQUAL "OS400") AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ if((CMAKE_SYSTEM_NAME STREQUAL "AIX" OR CMAKE_SYSTEM_NAME STREQUAL "OS400") AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# using -isystem option generate error "template with C linkage"
include_directories("${CMake_SOURCE_DIR}/Utilities")
else()
@@ -686,14 +686,14 @@ macro (CMAKE_BUILD_UTILITIES)
#---------------------------------------------------------------------
# Use curses?
if(NOT DEFINED BUILD_CursesDialog)
- if (UNIX)
+ if(UNIX)
include(${CMake_SOURCE_DIR}/Source/Checks/Curses.cmake)
set(BUILD_CursesDialog_DEFAULT "${CMakeCheckCurses_COMPILED}")
elseif(WIN32)
set(BUILD_CursesDialog_DEFAULT "OFF")
endif()
option(BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" "${BUILD_CursesDialog_DEFAULT}")
- endif ()
+ endif()
if(BUILD_CursesDialog)
if(UNIX)
set(CURSES_NEED_NCURSES TRUE)
@@ -718,10 +718,10 @@ macro (CMAKE_BUILD_UTILITIES)
if(NOT CMAKE_USE_SYSTEM_FORM)
add_subdirectory(Source/CursesDialog/form)
elseif(NOT CURSES_FORM_LIBRARY)
- message( FATAL_ERROR "CMAKE_USE_SYSTEM_FORM in ON but CURSES_FORM_LIBRARY is not set!" )
+ message(FATAL_ERROR "CMAKE_USE_SYSTEM_FORM in ON but CURSES_FORM_LIBRARY is not set!")
endif()
endif()
-endmacro ()
+endmacro()
#-----------------------------------------------------------------------
if(NOT CMake_TEST_EXTERNAL_CMAKE)
@@ -749,7 +749,7 @@ include(Source/CMakeVersion.cmake)
# Include the standard Dart testing module
enable_testing()
-include (${CMAKE_ROOT}/Modules/Dart.cmake)
+include(${CMAKE_ROOT}/Modules/Dart.cmake)
# Set up test-time configuration.
set_directory_properties(PROPERTIES
@@ -836,7 +836,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
add_custom_target(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
- include (CMakeCPack.cmake)
+ include(CMakeCPack.cmake)
endif()
@@ -891,7 +891,8 @@ endif()
if(BUILD_TESTING)
add_test(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
- --system-information -G "${CMAKE_GENERATOR}" )
+ --system-information -G "${CMAKE_GENERATOR}"
+ )
endif()
if(NOT CMake_TEST_EXTERNAL_CMAKE)
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 8f4750e466..b1a79af090 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -4,7 +4,7 @@
# To ensure maximum portability across various compilers and platforms
# deactivate any compiler extensions. Skip this for QNX, where additional
# work is needed to build without compiler extensions.
-if (NOT CMAKE_SYSTEM_NAME STREQUAL "QNX")
+if(NOT CMAKE_SYSTEM_NAME STREQUAL "QNX")
set(CMAKE_C_EXTENSIONS FALSE)
set(CMAKE_CXX_EXTENSIONS FALSE)
endif()
@@ -760,7 +760,7 @@ if(APPLE)
endif()
-if (WIN32)
+if(WIN32)
set(SRCS ${SRCS}
cmCallVisualStudioMacro.cxx
cmCallVisualStudioMacro.h
@@ -824,7 +824,7 @@ if (WIN32)
# GetVersion to work properly on Windows 8 and above.
set(MANIFEST_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cmake.version.manifest)
endif()
-endif ()
+endif()
# Watcom support
if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
@@ -1084,7 +1084,7 @@ if(UNIX)
endif()
endif()
- if (NOT FREEBSD_PKG_INCLUDE_DIRS OR NOT FREEBSD_PKG_LIBRARIES)
+ if(NOT FREEBSD_PKG_INCLUDE_DIRS OR NOT FREEBSD_PKG_LIBRARIES)
message(FATAL_ERROR "CPack needs libpkg(3) to produce FreeBSD packages natively.")
endif()
else()
@@ -1188,8 +1188,8 @@ if(BUILD_QtDialog)
add_subdirectory(QtDialog)
endif()
-include (${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
-include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
+include(${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
+include(${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
if(WIN32)
# Compute the binary version that appears in the RC file. Version
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index 9b6007c645..95962d84f9 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -3,7 +3,7 @@
project(QtDialog)
CMake_OPTIONAL_COMPONENT(cmake-gui)
-set (QT_COMPONENTS
+set(QT_COMPONENTS
Core
Widgets
Gui
@@ -41,7 +41,7 @@ set(CMake_QT_EXTRA_LIBRARIES)
# Try to find the package WinExtras for the task bar progress
if(WIN32)
find_package(Qt${INSTALLED_QT_VERSION}WinExtras QUIET)
- if (Qt${INSTALLED_QT_VERSION}WinExtras_FOUND)
+ if(Qt${INSTALLED_QT_VERSION}WinExtras_FOUND)
add_definitions(-DQT_WINEXTRAS)
list(APPEND CMake_QT_EXTRA_LIBRARIES Qt${INSTALLED_QT_VERSION}::WinExtras)
list(APPEND QT_COMPONENTS WinExtras)
@@ -101,13 +101,13 @@ if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
endmacro()
macro(install_qt_plugins _comps _plugins_var)
foreach(_qt_comp IN LISTS ${_comps})
- if (INSTALLED_QT_VERSION VERSION_LESS 6)
+ if(INSTALLED_QT_VERSION VERSION_LESS 6)
set(_qt_module_plugins ${Qt${INSTALLED_QT_VERSION}${_qt_comp}_PLUGINS})
else()
get_target_property(_qt_module_plugins Qt${INSTALLED_QT_VERSION}::${_qt_comp} QT_PLUGINS)
endif()
foreach(_qt_plugin IN LISTS _qt_module_plugins)
- if (INSTALLED_QT_VERSION VERSION_GREATER_EQUAL 6)
+ if(INSTALLED_QT_VERSION VERSION_GREATER_EQUAL 6)
# Qt6 provides the plugins as individual packages that need to be found.
find_package(Qt${INSTALLED_QT_VERSION}${_qt_plugin} QUIET
PATHS ${Qt${INSTALLED_QT_VERSION}${_qt_comp}_DIR})
@@ -117,7 +117,7 @@ if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
endforeach()
endmacro()
if(APPLE)
- if (INSTALLED_QT_VERSION VERSION_EQUAL 5)
+ if(INSTALLED_QT_VERSION VERSION_EQUAL 5)
install_qt_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS)
if(TARGET Qt5::QMacStylePlugin)
install_qt_plugin("Qt5::QMacStylePlugin" QT_PLUGINS)
@@ -132,7 +132,7 @@ if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources"
${COMPONENT})
elseif(WIN32 AND NOT CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES)
- if (INSTALLED_QT_VERSION VERSION_EQUAL 5)
+ if(INSTALLED_QT_VERSION VERSION_EQUAL 5)
install_qt_plugin("Qt5::QWindowsIntegrationPlugin" QT_PLUGINS)
else()
# FIXME: Minimize plugins for Qt6.
@@ -204,7 +204,7 @@ set(MOC_SRCS
)
set(QRC_SRCS CMakeSetup.qrc)
-if (INSTALLED_QT_VERSION VERSION_LESS 6)
+if(INSTALLED_QT_VERSION VERSION_LESS 6)
qt5_wrap_ui(UI_BUILT_SRCS ${UI_SRCS})
qt5_wrap_cpp(MOC_BUILT_SRCS ${MOC_SRCS})
qt5_add_resources(QRC_BUILT_SRCS ${QRC_SRCS})
@@ -215,15 +215,15 @@ else()
endif()
add_library(CMakeGUIQRCLib OBJECT ${QRC_BUILT_SRCS})
-if (FALSE) # CMake's bootstrap binary does not support automoc
+if(FALSE) # CMake's bootstrap binary does not support automoc
set(CMAKE_AUTOMOC 1)
set(CMAKE_AUTORCC 1)
set(CMAKE_AUTOUIC 1)
-else ()
+else()
list(APPEND SRCS
${UI_BUILT_SRCS}
${MOC_BUILT_SRCS})
-endif ()
+endif()
if(USE_LGPL)
install(FILES ${CMake_SOURCE_DIR}/Licenses/LGPLv${USE_LGPL}.txt
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 24a7c882d3..d9b3c03224 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