summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-24 12:37:08 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-24 12:37:08 (GMT)
commit7213408287971b395bee21f9aeb59d1e393dc6a9 (patch)
tree883bb5b4ead553de734507e629eedf897bc99799 /Source/cmCacheManager.h
parentf5d86035f285816f174de6d0b14833f5b48d048b (diff)
downloadCMake-7213408287971b395bee21f9aeb59d1e393dc6a9.zip
CMake-7213408287971b395bee21f9aeb59d1e393dc6a9.tar.gz
CMake-7213408287971b395bee21f9aeb59d1e393dc6a9.tar.bz2
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.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h
index 83178b6..4fa6ed0 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,