summaryrefslogtreecommitdiffstats
path: root/Tests/MakeClean/CMakeLists.txt
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:47:32 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:19:16 (GMT)
commit77543bde41b0e52c3959016698b529835945d62d (patch)
treeff63e5fbec326c4a5d821e7496c6d2cb52f75b92 /Tests/MakeClean/CMakeLists.txt
parent7bbaa4283de26864b2e55e819db0884771585467 (diff)
downloadCMake-77543bde41b0e52c3959016698b529835945d62d.zip
CMake-77543bde41b0e52c3959016698b529835945d62d.tar.gz
CMake-77543bde41b0e52c3959016698b529835945d62d.tar.bz2
Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
Diffstat (limited to 'Tests/MakeClean/CMakeLists.txt')
-rw-r--r--Tests/MakeClean/CMakeLists.txt42
1 files changed, 21 insertions, 21 deletions
diff --git a/Tests/MakeClean/CMakeLists.txt b/Tests/MakeClean/CMakeLists.txt
index 97d3554..7400754 100644
--- a/Tests/MakeClean/CMakeLists.txt
+++ b/Tests/MakeClean/CMakeLists.txt
@@ -1,47 +1,47 @@
cmake_minimum_required (VERSION 2.6)
-PROJECT(MakeClean)
+project(MakeClean)
# Build the to-clean project.
-TRY_COMPILE(TOCLEAN_BUILT
+try_compile(TOCLEAN_BUILT
${MakeClean_BINARY_DIR}/ToClean
${MakeClean_SOURCE_DIR}/ToClean
ToClean
OUTPUT_VARIABLE OUTPUT
)
-IF(TOCLEAN_BUILT)
- MESSAGE(
+if(TOCLEAN_BUILT)
+ message(
"Building ToClean succeeded with the following output:\n"
"[${OUTPUT}]"
)
-ELSE(TOCLEAN_BUILT)
- MESSAGE(FATAL_ERROR
+else(TOCLEAN_BUILT)
+ message(FATAL_ERROR
"Building ToClean failed with the following output:\n"
"[${OUTPUT}]"
)
-ENDIF(TOCLEAN_BUILT)
+endif(TOCLEAN_BUILT)
# Get the set of files to check from the ToClean project.
-INCLUDE(${MakeClean_BINARY_DIR}/ToClean/ToCleanFiles.cmake)
+include(${MakeClean_BINARY_DIR}/ToClean/ToCleanFiles.cmake)
# Check for the existence of the files.
-FOREACH(f ${TOCLEAN_FILES})
- IF(EXISTS "${f}")
- ELSE(EXISTS "${f}")
- MESSAGE(FATAL_ERROR "File \"${f}\" does not exist!")
- ENDIF(EXISTS "${f}")
-ENDFOREACH(f)
+foreach(f ${TOCLEAN_FILES})
+ if(EXISTS "${f}")
+ else(EXISTS "${f}")
+ message(FATAL_ERROR "File \"${f}\" does not exist!")
+ endif(EXISTS "${f}")
+endforeach(f)
# 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)
-CONFIGURE_FILE(${MakeClean_SOURCE_DIR}/check_clean.c.in
+set(CHECK_FILES)
+foreach(f ${TOCLEAN_FILES})
+ set(CHECK_FILES "${CHECK_FILES} \"${f}\",\n")
+endforeach(f)
+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)
+add_executable(check_clean ${MakeClean_BINARY_DIR}/check_clean.c)
# After the executable builds, clean the files.
-ADD_CUSTOM_COMMAND(
+add_custom_command(
TARGET check_clean
POST_BUILD
COMMAND ${CMAKE_CTEST_COMMAND}