summaryrefslogtreecommitdiffstats
path: root/Modules/CTest.cmake
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:50:14 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:19:16 (GMT)
commit9db3116226cb99fcf54e936c833953abcde9b729 (patch)
treebd755ed9e616bbf1482a894bc7946980d81b7703 /Modules/CTest.cmake
parent77543bde41b0e52c3959016698b529835945d62d (diff)
downloadCMake-9db3116226cb99fcf54e936c833953abcde9b729.zip
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.gz
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.bz2
Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
Diffstat (limited to 'Modules/CTest.cmake')
-rw-r--r--Modules/CTest.cmake58
1 files changed, 29 insertions, 29 deletions
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake
index 4e861a9..1e2dd5c 100644
--- a/Modules/CTest.cmake
+++ b/Modules/CTest.cmake
@@ -67,31 +67,31 @@ function(GET_VS_VERSION_STRING generator var)
NUMBER "${generator}")
if("${generator}" MATCHES "Visual Studio 7 .NET 2003")
set(ver_string "vs71")
- else("${generator}" MATCHES "Visual Studio 7 .NET 2003")
+ else()
set(ver_string "vs${NUMBER}")
- endif("${generator}" MATCHES "Visual Studio 7 .NET 2003")
+ endif()
set(${var} ${ver_string} PARENT_SCOPE)
-endfunction(GET_VS_VERSION_STRING)
+endfunction()
if(BUILD_TESTING)
# Setup some auxilary macros
macro(SET_IF_NOT_SET var val)
if(NOT DEFINED "${var}")
set("${var}" "${val}")
- endif(NOT DEFINED "${var}")
- endmacro(SET_IF_NOT_SET)
+ endif()
+ endmacro()
macro(SET_IF_SET var val)
if(NOT "${val}" MATCHES "^$")
set("${var}" "${val}")
- endif(NOT "${val}" MATCHES "^$")
- endmacro(SET_IF_SET)
+ endif()
+ endmacro()
macro(SET_IF_SET_AND_NOT_SET var val)
if(NOT "${val}" MATCHES "^$")
SET_IF_NOT_SET("${var}" "${val}")
- endif(NOT "${val}" MATCHES "^$")
- endmacro(SET_IF_SET_AND_NOT_SET)
+ endif()
+ endmacro()
# Make sure testing is enabled
enable_testing()
@@ -107,18 +107,18 @@ if(BUILD_TESTING)
SET_IF_SET_AND_NOT_SET(DROP_LOCATION "${CTEST_DROP_LOCATION}")
SET_IF_SET_AND_NOT_SET(TRIGGER_SITE "${CTEST_TRIGGER_SITE}")
SET_IF_SET_AND_NOT_SET(UPDATE_TYPE "${CTEST_UPDATE_TYPE}")
- endif(EXISTS "${PROJECT_SOURCE_DIR}/CTestConfig.cmake")
+ endif()
# the project can have a DartConfig.cmake file
if(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake")
include("${PROJECT_SOURCE_DIR}/DartConfig.cmake")
- else(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake")
+ else()
# Dashboard is opened for submissions for a 24 hour period starting at
# the specified NIGHTLY_START_TIME. Time is specified in 24 hour format.
SET_IF_NOT_SET (NIGHTLY_START_TIME "00:00:00 EDT")
SET_IF_NOT_SET(DROP_METHOD "http")
SET_IF_NOT_SET (COMPRESS_SUBMISSION ON)
- endif(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake")
+ endif()
SET_IF_NOT_SET (NIGHTLY_START_TIME "00:00:00 EDT")
find_program(CVSCOMMAND cvs )
@@ -141,7 +141,7 @@ if(BUILD_TESTING)
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
set(UPDATE_TYPE git)
endif()
- endif(NOT UPDATE_TYPE)
+ endif()
string(TOLOWER "${UPDATE_TYPE}" _update_type)
if("${_update_type}" STREQUAL "cvs")
@@ -199,36 +199,36 @@ if(BUILD_TESTING)
set(DART_COMPILER "${CMAKE_CXX_COMPILER}")
if(NOT DART_COMPILER)
set(DART_COMPILER "${CMAKE_C_COMPILER}")
- endif(NOT DART_COMPILER)
+ endif()
if(NOT DART_COMPILER)
set(DART_COMPILER "unknown")
- endif(NOT DART_COMPILER)
+ endif()
if(WIN32)
set(DART_NAME_COMPONENT "NAME_WE")
- else(WIN32)
+ else()
set(DART_NAME_COMPONENT "NAME")
- endif(WIN32)
+ endif()
if(NOT BUILD_NAME_SYSTEM_NAME)
set(BUILD_NAME_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
- endif(NOT BUILD_NAME_SYSTEM_NAME)
+ endif()
if(WIN32)
set(BUILD_NAME_SYSTEM_NAME "Win32")
- endif(WIN32)
+ endif()
if(UNIX OR BORLAND)
get_filename_component(DART_CXX_NAME
"${CMAKE_CXX_COMPILER}" ${DART_NAME_COMPONENT})
- else(UNIX OR BORLAND)
+ else()
get_filename_component(DART_CXX_NAME
"${CMAKE_BUILD_TOOL}" ${DART_NAME_COMPONENT})
- endif(UNIX OR BORLAND)
+ endif()
if(DART_CXX_NAME MATCHES "msdev")
set(DART_CXX_NAME "vs60")
- endif(DART_CXX_NAME MATCHES "msdev")
+ endif()
if(DART_CXX_NAME MATCHES "devenv")
GET_VS_VERSION_STRING("${CMAKE_GENERATOR}" DART_CXX_NAME)
- endif(DART_CXX_NAME MATCHES "devenv")
+ endif()
set(BUILDNAME "${BUILD_NAME_SYSTEM_NAME}-${DART_CXX_NAME}")
- endif(NOT BUILDNAME)
+ endif()
# the build command
build_command(MAKECOMMAND_DEFAULT_VALUE
@@ -241,11 +241,11 @@ if(BUILD_TESTING)
set(DEFAULT_CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
if(DEFAULT_CTEST_CONFIGURATION_TYPE STREQUAL "")
set(DEFAULT_CTEST_CONFIGURATION_TYPE "Release")
- endif(DEFAULT_CTEST_CONFIGURATION_TYPE STREQUAL "")
+ endif()
if(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
set(CTEST_USE_LAUNCHERS 0)
- endif(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
+ endif()
if(CTEST_USE_LAUNCHERS)
set(CTEST_LAUNCH_COMPILE "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OBJECT> --source <SOURCE> --language <LANGUAGE> --")
set(CTEST_LAUNCH_LINK "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <TARGET> --target-type <TARGET_TYPE> --language <LANGUAGE> --")
@@ -253,7 +253,7 @@ if(BUILD_TESTING)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CTEST_LAUNCH_COMPILE}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CTEST_LAUNCH_LINK}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_CUSTOM "${CTEST_LAUNCH_CUSTOM}")
- endif(CTEST_USE_LAUNCHERS)
+ endif()
mark_as_advanced(
BZRCOMMAND
@@ -282,5 +282,5 @@ if(BUILD_TESTING)
set(RUN_FROM_CTEST_OR_DART 1)
include(CTestTargets)
set(RUN_FROM_CTEST_OR_DART)
- endif(NOT RUN_FROM_DART)
-endif(BUILD_TESTING)
+ endif()
+endif()