diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-02-23 00:24:43 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-02-23 00:24:43 (GMT) |
commit | 0b0d1b1d436c6e59ed9ea5c25e1f454fc0ae7827 (patch) | |
tree | ed4c5e1e8bc331799cba8c2a797de8228f9f1f97 /Source/cmSystemTools.h | |
parent | 5d903c6b0f5622a149e0aeda1053ce82b39d2807 (diff) | |
download | CMake-0b0d1b1d436c6e59ed9ea5c25e1f454fc0ae7827.zip CMake-0b0d1b1d436c6e59ed9ea5c25e1f454fc0ae7827.tar.gz CMake-0b0d1b1d436c6e59ed9ea5c25e1f454fc0ae7827.tar.bz2 |
ENH: add CMakeCache.txt support
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r-- | Source/cmSystemTools.h | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index bdcac7a..6175623 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -47,9 +47,7 @@ public: */ static void ConvertToUnixSlashes(std::string& path); - /** - * Return true if a file exists in the current directory. - */ + ///! Return true if a file exists in the current directory. static bool FileExists(const char* filename); /** @@ -91,7 +89,36 @@ public: * Display an error message. */ static void Error(const char* m, const char* m2=0 ); + + ///! Return true if there was an error at any point. + static bool GetErrorOccuredFlag() + { + return cmSystemTools::s_ErrorOccured; + } + + /** + * Copy the source file to the destination file only + * if the two files differ. + */ + static void CopyFileIfDifferent(const char* source, + const char* destination); + ///! Compare the contents of two files. Return true if different. + static bool FilesDiffer(const char* source, + const char* destination); + ///! Copy a file. + static void cmCopyFile(const char* source, + const char* destination); + + ///! Remove a file. + static void RemoveFile(const char* source); + + + static long int ModifiedTime(const char* filename); + + +private: + static bool s_ErrorOccured; }; |