diff options
author | Brad King <brad.king@kitware.com> | 2006-10-23 21:14:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-10-23 21:14:20 (GMT) |
commit | b25629efc405b979a4f3d03aadf92d34a486e261 (patch) | |
tree | f5a2b4275f5b16ff16445840ede6b56d3d788552 | |
parent | 74c70d4078dfbd0a6a1c9810f045534402fbcbc4 (diff) | |
download | CMake-b25629efc405b979a4f3d03aadf92d34a486e261.zip CMake-b25629efc405b979a4f3d03aadf92d34a486e261.tar.gz CMake-b25629efc405b979a4f3d03aadf92d34a486e261.tar.bz2 |
ENH: Remove old IF(FILE_IS_NEWER) syntax. It was never in a release anyway.
-rw-r--r-- | Source/cmIfCommand.cxx | 23 | ||||
-rw-r--r-- | Source/cmIfCommand.h | 1 | ||||
-rw-r--r-- | Tests/StringFileTest/CMakeLists.txt | 3 |
3 files changed, 0 insertions, 27 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index 1553171..d8956db 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -289,29 +289,6 @@ bool cmIfCommand::IsTrue(const std::vector<std::string> &args, IncrementArguments(newArgs,argP1,argP2); reducible = 1; } - // is file A newer than file B - if (*arg == "FILE_IS_NEWER" && - argP1 != newArgs.end() && argP2 != newArgs.end()) - { - int fileIsNewer=0; - bool success=cmSystemTools::FileTimeCompare((argP1)->c_str(), - (argP2)->c_str(), - &fileIsNewer); - if(success==false || fileIsNewer==1 || fileIsNewer==0) - { - *arg = "1"; - } - else - { - *arg = "0"; - } - - newArgs.erase(argP2); - newArgs.erase(argP1); - argP1 = arg; - IncrementArguments(newArgs,argP1,argP2); - reducible = 1; - } // does a command exist if (*arg == "COMMAND" && argP1 != newArgs.end()) { diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h index c7044a3..757377c 100644 --- a/Source/cmIfCommand.h +++ b/Source/cmIfCommand.h @@ -129,7 +129,6 @@ public: " IF(EXISTS directory-name)\n" "True if the named file or directory exists. " "Behavior is well-defined only for full paths.\n" - " IF(FILE_IS_NEWER file1 file2)\n" " IF(file1 IS_NEWER_THAN file2)\n" "True if file1 is newer than file2 or if one of the two files " "doesn't exist. " diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt index e6288db..a682076 100644 --- a/Tests/StringFileTest/CMakeLists.txt +++ b/Tests/StringFileTest/CMakeLists.txt @@ -76,9 +76,6 @@ FOREACH(var 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") IF(NOT "${file}" IS_NEWER_THAN "${CMAKE_CURRENT_SOURCE_DIR}/InputFile.h.in") MESSAGE(FATAL_ERROR "IF(FILE_IS_NEWER) does not seem to work.") ENDIF(NOT "${file}" IS_NEWER_THAN "${CMAKE_CURRENT_SOURCE_DIR}/InputFile.h.in") |