From 062ed22ec43809068526706d2600297095412911 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 10 Oct 2015 15:21:41 +0200 Subject: cmState: Add cache file manipulation wrappers. --- Source/cmState.cxx | 18 ++++++++++++++++++ Source/cmState.h | 8 ++++++++ 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& excludes, + std::set& 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 cmState::GetCacheEntryKeys() const { std::vector 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& excludes, + std::set& includes); + + bool SaveCache(const std::string& path) ; + + bool DeleteCache(const std::string& path); + std::vector 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& excludes, std::set& 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) -- cgit v0.12