summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeOnly
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
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')
-rw-r--r--Tests/CMakeOnly/AllFindModules/CMakeLists.txt14
-rw-r--r--Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt14
-rw-r--r--Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt10
3 files changed, 19 insertions, 19 deletions
diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
index 551cee3..fb0bd15 100644
--- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
+++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
@@ -13,7 +13,7 @@ file(GLOB FIND_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../Modules/Find*.cmake
macro(do_find MODULE_NAME)
message(STATUS " Checking Find${MODULE_NAME}")
find_package(${MODULE_NAME})
-endmacro(do_find)
+endmacro()
# It is only possible to use either Qt3 or Qt4 in one project.
# Since FindQt will complain if both are found we explicitly request Qt4 here
@@ -35,15 +35,15 @@ foreach(FIND_MODULE ${FIND_MODULES})
do_find(${MODULE_NAME})
endif ()
-endforeach(FIND_MODULE)
+endforeach()
# Qt4 is not present, so we can check Qt3
if (NOT QT4_FOUND)
set(DESIRED_QT_VERSION 3)
foreach(FIND_MODULE ${NO_QT4_MODULES} "Qt")
do_find(${FIND_MODULE})
- endforeach(FIND_MODULE)
-endif (NOT QT4_FOUND)
+ endforeach()
+endif ()
macro(check_version_string MODULE_NAME VERSION_VAR)
if (${MODULE_NAME}_FOUND)
@@ -65,7 +65,7 @@ macro(check_version_string MODULE_NAME VERSION_VAR)
message(SEND_ERROR "${MODULE_NAME}_FOUND is set but version number variable ${VERSION_VAR} is NOT DEFINED")
endif()
endif ()
-endmacro(check_version_string)
+endmacro()
# If any of these modules reported that it was found a version number should have been
# reported.
@@ -73,12 +73,12 @@ endmacro(check_version_string)
foreach(VTEST ALSA ARMADILLO BZIP2 CUPS CURL EXPAT FREETYPE GETTEXT GIT HSPELL
JASPER LIBLZMA LIBXML2 LIBXSLT PERL PKG_CONFIG PostgreSQL TIFF ZLIB)
check_version_string(${VTEST} ${VTEST}_VERSION_STRING)
-endforeach(VTEST)
+endforeach()
foreach(VTEST BISON Boost CUDA DOXYGEN FLEX GIF GTK2 LibArchive OPENSCENEGRAPH
RUBY SWIG)
check_version_string(${VTEST} ${VTEST}_VERSION)
-endforeach(VTEST)
+endforeach()
check_version_string(PYTHONINTERP PYTHON_VERSION_STRING)
check_version_string(SUBVERSION Subversion_VERSION_SVN)
diff --git a/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt b/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt
index 70c186c..9528aa3 100644
--- a/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt
@@ -23,7 +23,7 @@ foreach(_config_type Release RelWithDebInfo MinSizeRel Debug)
if (CSE_RESULT_${_config_type})
message(SEND_ERROR "CheckCXXSymbolExists 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})
@@ -42,12 +42,12 @@ if (NOT CSE_RESULT_ERRNO_CERRNO)
if (NOT CSE_RESULT_ERRNO_ERRNOH)
message(SEND_ERROR "CheckCXXSymbolExists did not find errno in <cerrno> and <errno.h>")
- else (NOT CSE_RESULT_ERRNO_ERRNOH)
+ else ()
message(STATUS "errno found in <errno.h>")
- endif (NOT CSE_RESULT_ERRNO_ERRNOH)
-else (NOT CSE_RESULT_ERRNO_CERRNO)
+ endif ()
+else ()
message(STATUS "errno found in <cerrno>")
-endif (NOT CSE_RESULT_ERRNO_CERRNO)
+endif ()
if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
@@ -58,5 +58,5 @@ if (CMAKE_COMPILER_IS_GNUCXX)
if (CSE_RESULT_O3)
message(SEND_ERROR "CheckCXXSymbolExists reported a nonexistent symbol as existing with optimization -O3")
- endif (CSE_RESULT_O3)
-endif (CMAKE_COMPILER_IS_GNUCXX)
+ endif ()
+endif ()
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 ()