diff options
author | Brad King <brad.king@kitware.com> | 2008-01-24 07:37:08 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-24 07:37:08 -0500 |
commit | 7213408287971b395bee21f9aeb59d1e393dc6a9 (patch) | |
tree | 883bb5b4ead553de734507e629eedf897bc99799 /Source/cmCacheManager.h | |
parent | f5d86035f285816f174de6d0b14833f5b48d048b (diff) | |
download | cmake-7213408287971b395bee21f9aeb59d1e393dc6a9.tar.gz |
ENH: Added cmMakefile::NeedCacheCompatibility method and support for it in cmCacheManager. This will allow commands to modify their behavior when running with a cache loaded from an earlier CMake version.
Diffstat (limited to 'Source/cmCacheManager.h')
-rw-r--r-- | Source/cmCacheManager.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index 83178b6cda..4fa6ed0956 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -142,6 +142,11 @@ public: ///! Get a value from the cache given a key const char* GetCacheValue(const char* key) const; + /** Get the version of CMake that wrote the cache. */ + unsigned int GetCacheMajorVersion() { return this->CacheMajorVersion; } + unsigned int GetCacheMinorVersion() { return this->CacheMinorVersion; } + bool NeedCacheCompatibility(int major, int minor); + protected: ///! Add an entry into the cache void AddCacheEntry(const char* key, const char* value, @@ -154,7 +159,10 @@ protected: CacheEntry *GetCacheEntry(const char *key); ///! Clean out the CMakeFiles directory if no CMakeCache.txt void CleanCMakeFiles(const char* path); - + + // Cache version info + unsigned int CacheMajorVersion; + unsigned int CacheMinorVersion; private: typedef std::map<cmStdString, CacheEntry> CacheEntryMap; static void OutputHelpString(std::ofstream& fout, |