summaryrefslogtreecommitdiffstats
path: root/Tests/MakeClean/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/MakeClean/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/MakeClean/CMakeLists.txt')
-rw-r--r--Tests/MakeClean/CMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/Tests/MakeClean/CMakeLists.txt b/Tests/MakeClean/CMakeLists.txt
index 7400754..13348a2 100644
--- a/Tests/MakeClean/CMakeLists.txt
+++ b/Tests/MakeClean/CMakeLists.txt
@@ -13,12 +13,12 @@ if(TOCLEAN_BUILT)
"Building ToClean succeeded with the following output:\n"
"[${OUTPUT}]"
)
-else(TOCLEAN_BUILT)
+else()
message(FATAL_ERROR
"Building ToClean failed with the following output:\n"
"[${OUTPUT}]"
)
-endif(TOCLEAN_BUILT)
+endif()
# Get the set of files to check from the ToClean project.
include(${MakeClean_BINARY_DIR}/ToClean/ToCleanFiles.cmake)
@@ -26,16 +26,16 @@ include(${MakeClean_BINARY_DIR}/ToClean/ToCleanFiles.cmake)
# Check for the existence of the files.
foreach(f ${TOCLEAN_FILES})
if(EXISTS "${f}")
- else(EXISTS "${f}")
+ else()
message(FATAL_ERROR "File \"${f}\" does not exist!")
- endif(EXISTS "${f}")
-endforeach(f)
+ endif()
+endforeach()
# Configure an executable to check that all the files are missing.
set(CHECK_FILES)
foreach(f ${TOCLEAN_FILES})
set(CHECK_FILES "${CHECK_FILES} \"${f}\",\n")
-endforeach(f)
+endforeach()
configure_file(${MakeClean_SOURCE_DIR}/check_clean.c.in
${MakeClean_BINARY_DIR}/check_clean.c @ONLY IMMEDIATE)
add_executable(check_clean ${MakeClean_BINARY_DIR}/check_clean.c)