summaryrefslogtreecommitdiffstats
path: root/Source/cmake.h
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-04-18 18:41:46 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-04-18 18:41:46 (GMT)
commit55a71ba572c54dbb3485a76e9615c1c8bf688fd4 (patch)
treeac692b4ef198284cf7c0e9b65ab854f93e7f865a /Source/cmake.h
parentaf61b685839fae6af72ba4c4d42ebf39a7d1a324 (diff)
downloadCMake-55a71ba572c54dbb3485a76e9615c1c8bf688fd4.zip
CMake-55a71ba572c54dbb3485a76e9615c1c8bf688fd4.tar.gz
CMake-55a71ba572c54dbb3485a76e9615c1c8bf688fd4.tar.bz2
ENH: Add check for infinite loops. Make sure that files written using WRITE_FILE and FILE WRITE are not used as input files. Fixes Bug #678 - WRITE_FILE and FILE(WRITE...) lead to infinite loops
Diffstat (limited to 'Source/cmake.h')
-rw-r--r--Source/cmake.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmake.h b/Source/cmake.h
index 833b454..dc79604 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -257,7 +257,11 @@ class cmake
///! Debug the try compile stuff by not delelting the files
bool GetDebugTryCompile(){return m_DebugTryCompile;}
void DebugTryCompileOn(){m_DebugTryCompile = true;}
-
+
+ ///! Get the list of files written by CMake using FILE(WRITE / WRITE_FILE
+ void AddWrittenFile(const char* file);
+ bool HasWrittenFile(const char* file);
+
protected:
typedef cmGlobalGenerator* (*CreateGeneratorFunctionType)();
typedef std::map<cmStdString, CreateGeneratorFunctionType> RegisteredGeneratorsMap;
@@ -273,6 +277,8 @@ protected:
std::string m_cmStartDirectory;
std::string m_StartOutputDirectory;
+ std::set<cmStdString> m_WrittenFiles;
+
///! return true if the same cmake was used to make the cache.
bool CacheVersionMatches();
///! read in a cmake list file to initialize the cache