summaryrefslogtreecommitdiffstats
path: root/Tests/MakeClean/CMakeLists.txt
diff options
context:
space:
mode:
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}