diff options
author | Brad King <brad.king@kitware.com> | 2006-08-25 20:31:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-08-25 20:31:07 (GMT) |
commit | 6449089436d16406f35f1ee9aef33c07ca89785e (patch) | |
tree | 8886177e6b9e0e1fab6cde440fe97a1eb7064986 /Tests/StringFileTest | |
parent | ebf532b106fed4bb4c2993be43e3ec2a42573f6b (diff) | |
download | CMake-6449089436d16406f35f1ee9aef33c07ca89785e.zip CMake-6449089436d16406f35f1ee9aef33c07ca89785e.tar.gz CMake-6449089436d16406f35f1ee9aef33c07ca89785e.tar.bz2 |
ENH: Patch from Alex for adding IF(FILE_IS_NEWER). I also added a test.
Diffstat (limited to 'Tests/StringFileTest')
-rw-r--r-- | Tests/StringFileTest/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt index 044f271..c43bd07 100644 --- a/Tests/StringFileTest/CMakeLists.txt +++ b/Tests/StringFileTest/CMakeLists.txt @@ -75,6 +75,11 @@ 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) |