Browse Source

cmState: Expose list of properties of values in the cache

Tobias Hunger 9 years ago
parent
commit
63c0e92c93
2 changed files with 9 additions and 0 deletions
  1. 8 0
      Source/cmState.cxx
  2. 1 0
      Source/cmState.h

+ 8 - 0
Source/cmState.cxx

@@ -246,6 +246,14 @@ void cmState::SetCacheEntryBoolProperty(std::string const& key,
   it.SetProperty(propertyName, value);
 }
 
+std::vector<std::string> cmState::GetCacheEntryPropertyList(
+  const std::string& key)
+{
+  cmCacheManager::CacheIterator it =
+    this->CacheManager->GetCacheIterator(key.c_str());
+  return it.GetPropertyList();
+}
+
 const char* cmState::GetCacheEntryProperty(std::string const& key,
                                            std::string const& propertyName)
 {

+ 1 - 0
Source/cmState.h

@@ -247,6 +247,7 @@ public:
                              std::string const& value);
   void SetCacheEntryBoolProperty(std::string const& key,
                                  std::string const& propertyName, bool value);
+  std::vector<std::string> GetCacheEntryPropertyList(std::string const& key);
   const char* GetCacheEntryProperty(std::string const& key,
                                     std::string const& propertyName);
   bool GetCacheEntryPropertyAsBool(std::string const& key,