diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-10 13:21:41 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-10 13:36:58 (GMT) |
commit | 062ed22ec43809068526706d2600297095412911 (patch) | |
tree | 92cb142a8d16457b6d1bce47c07289cd899aa59d | |
parent | a02e53eb947b61dd25ecd139a213d4062fbc5b62 (diff) | |
download | CMake-062ed22ec43809068526706d2600297095412911.zip CMake-062ed22ec43809068526706d2600297095412911.tar.gz CMake-062ed22ec43809068526706d2600297095412911.tar.bz2 |
cmState: Add cache file manipulation wrappers.
-rw-r--r-- | Source/cmState.cxx | 18 | ||||
-rw-r--r-- | Source/cmState.h | 8 | ||||
-rw-r--r-- | Source/cmake.cxx | 6 |
3 files changed, 29 insertions, 3 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx index db7519b..9628265 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -147,6 +147,24 @@ bool cmState::IsCacheEntryType(std::string const& key) return false; } +bool cmState::LoadCache(const std::string& path, bool internal, + std::set<std::string>& excludes, + std::set<std::string>& includes) +{ + return this->CMakeInstance->GetCacheManager()->LoadCache(path, internal, + excludes, includes); +} + +bool cmState::SaveCache(const std::string& path) +{ + return this->CMakeInstance->GetCacheManager()->SaveCache(path); +} + +bool cmState::DeleteCache(const std::string& path) +{ + return this->CMakeInstance->GetCacheManager()->DeleteCache(path); +} + std::vector<std::string> cmState::GetCacheEntryKeys() const { std::vector<std::string> definitions; diff --git a/Source/cmState.h b/Source/cmState.h index 1ffc4bf..3f0ac77 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -208,6 +208,14 @@ public: static const char* CacheEntryTypeToString(CacheEntryType); static bool IsCacheEntryType(std::string const& key); + bool LoadCache(const std::string& path, bool internal, + std::set<std::string>& excludes, + std::set<std::string>& includes); + + bool SaveCache(const std::string& path) ; + + bool DeleteCache(const std::string& path); + std::vector<std::string> GetCacheEntryKeys() const; const char* GetCacheEntryValue(std::string const& key) const; const char* GetInitializedCacheValue(std::string const& key) const; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index ad5f6b7..4fc48d5 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1760,17 +1760,17 @@ bool cmake::LoadCache(const std::string& path, bool internal, std::set<std::string>& excludes, std::set<std::string>& includes) { - return this->CacheManager->LoadCache(path, internal, excludes, includes); + return this->State->LoadCache(path, internal, excludes, includes); } bool cmake::SaveCache(const std::string& path) { - return this->CacheManager->SaveCache(path); + return this->State->SaveCache(path); } bool cmake::DeleteCache(const std::string& path) { - return this->CacheManager->DeleteCache(path); + return this->State->DeleteCache(path); } void cmake::SetProgressCallback(ProgressCallbackType f, void *cd) |