summaryrefslogtreecommitdiffstats
path: root/Tests/StringFileTest
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/StringFileTest')
-rw-r--r--Tests/StringFileTest/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt
index 044f271..3376a38 100644
--- a/Tests/StringFileTest/CMakeLists.txt
+++ b/Tests/StringFileTest/CMakeLists.txt
@@ -75,10 +75,16 @@ FOREACH(var
FILE(APPEND "${file}" "#define ${var} \"${${var}}\"\n")
ENDFOREACH(var)
+# Verify that the file was created recently.
+IF(NOT FILE_IS_NEWER "${file}" "${CMAKE_CURRENT_SOURCE_DIR}/InputFile.h.in")
+ MESSAGE(FATAL_ERROR "IF(FILE_IS_NEWER) does not seem to work.")
+ENDIF(NOT FILE_IS_NEWER "${file}" "${CMAKE_CURRENT_SOURCE_DIR}/InputFile.h.in")
+
# Test configuration of the string
SET(TEST_DEFINED 123)
SET(TEST_NOT_DEFINED)
-STRING(CONFIGURE "${infile}" infile @ONLY)
+STRING(CONFIGURE "${infile}" infile+-/out @ONLY)
+SET(infile "${infile+-/out}")
# Write include file to a file
STRING(REGEX REPLACE "includefile" "${file}" outfile "${infile}")