diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-10 12:26:56 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-10 13:36:58 (GMT) |
commit | 435a2f3ccb51acf119cfa1671f1c5b344a7d47a0 (patch) | |
tree | 1ed8f4254834e76abddd8e52d5f0aaa0c5e2a186 /Source/cmake.cxx | |
parent | 062ed22ec43809068526706d2600297095412911 (diff) | |
download | CMake-435a2f3ccb51acf119cfa1671f1c5b344a7d47a0.zip CMake-435a2f3ccb51acf119cfa1671f1c5b344a7d47a0.tar.gz CMake-435a2f3ccb51acf119cfa1671f1c5b344a7d47a0.tar.bz2 |
cmCacheManager: Port away from cmake instance.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 4fc48d5..69a3f03 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -151,7 +151,7 @@ cmake::cmake() #endif this->Verbose = false; - this->CacheManager = new cmCacheManager(this); + this->CacheManager = new cmCacheManager; this->GlobalGenerator = 0; this->ProgressCallback = 0; this->ProgressCallbackClientData = 0; @@ -1760,12 +1760,30 @@ bool cmake::LoadCache(const std::string& path, bool internal, std::set<std::string>& excludes, std::set<std::string>& includes) { - return this->State->LoadCache(path, internal, excludes, includes); + bool result = this->State->LoadCache(path, internal, excludes, includes); + static const char* entries[] = {"CMAKE_CACHE_MAJOR_VERSION", + "CMAKE_CACHE_MINOR_VERSION"}; + for (const char* const* nameIt = cmArrayBegin(entries); + nameIt != cmArrayEnd(entries); ++nameIt) + { + this->UnwatchUnusedCli(*nameIt); + } + return result; } bool cmake::SaveCache(const std::string& path) { - return this->State->SaveCache(path); + bool result = this->State->SaveCache(path); + static const char* entries[] = {"CMAKE_CACHE_MAJOR_VERSION", + "CMAKE_CACHE_MINOR_VERSION", + "CMAKE_CACHE_PATCH_VERSION", + "CMAKE_CACHEFILE_DIR"}; + for (const char* const* nameIt = cmArrayBegin(entries); + nameIt != cmArrayEnd(entries); ++nameIt) + { + this->UnwatchUnusedCli(*nameIt); + } + return result; } bool cmake::DeleteCache(const std::string& path) |