summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
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 /Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
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 'Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt')
-rw-r--r--Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt b/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
index acf0d2d..7656577 100644
--- a/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
@@ -24,7 +24,7 @@ foreach(_config_type Release RelWithDebInfo MinSizeRel Debug)
if (CSE_RESULT_${_config_type})
message(SEND_ERROR "CheckSymbolExists reported a nonexistent symbol as existing in configuration ${_config_type}")
- endif (CSE_RESULT_${_config_type})
+ endif ()
endforeach()
set(CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE})
@@ -34,9 +34,9 @@ check_symbol_exists(errno "errno.h" CSE_RESULT_ERRNO)
if (NOT CSE_RESULT_ERRNO)
message(SEND_ERROR "CheckSymbolExists did not find errno in <errno.h>")
-else (NOT CSE_RESULT_ERRNO)
+else ()
message(STATUS "errno found as expected")
-endif (NOT CSE_RESULT_ERRNO)
+endif ()
if (CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
@@ -47,5 +47,5 @@ if (CMAKE_COMPILER_IS_GNUCC)
if (CSE_RESULT_O3)
message(SEND_ERROR "CheckSymbolExists reported a nonexistent symbol as existing with optimization -O3")
- endif (CSE_RESULT_O3)
-endif (CMAKE_COMPILER_IS_GNUCC)
+ endif ()
+endif ()