This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via ceb8b8371ad2426dec35210e0de96fda69bc6c9a (commit) via 63c0e92c9395083a61fe31cd89bee7e3814f10e8 (commit) via 6eee24634bc1791a64f8146c0f79c769eb9dfb83 (commit) via 120899c6980fcd81aa2a0d7b733ae15332a7a133 (commit) via 7066218e792927cb6494ce73e834b8ddb3d275e6 (commit) from 88ae1dea8b44cbd456e07ad372d8f0ee14b5d8a3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ceb8b8371ad2426dec35210e0de96fda69bc6c9a commit ceb8b8371ad2426dec35210e0de96fda69bc6c9a Merge: 88ae1de 63c0e92 Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Jun 10 09:34:54 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Jun 10 09:34:54 2016 -0400 Merge topic 'expose-cache-properties' into next 63c0e92c cmState: Expose list of properties of values in the cache 6eee2463 cmCacheEntry: Retrieve all properties of cache entries 120899c6 cmPropertyList: Add a way to retrieve all properties 7066218e cmake: Kill cmake::CacheManager and its getter https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63c0e92c9395083a61fe31cd89bee7e3814f10e8 commit 63c0e92c9395083a61fe31cd89bee7e3814f10e8 Author: Tobias Hunger <tobias.hun...@qt.io> AuthorDate: Fri Jun 10 10:10:07 2016 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Jun 10 09:33:41 2016 -0400 cmState: Expose list of properties of values in the cache diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 04f07ce..d2cfaba 100644 --- a/Source/cmState.cxx +++ b/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) { diff --git a/Source/cmState.h b/Source/cmState.h index 18c45b8..935faec 100644 --- a/Source/cmState.h +++ b/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, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6eee24634bc1791a64f8146c0f79c769eb9dfb83 commit 6eee24634bc1791a64f8146c0f79c769eb9dfb83 Author: Tobias Hunger <tobias.hun...@qt.io> AuthorDate: Fri Jun 10 09:34:49 2016 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Jun 10 09:33:41 2016 -0400 cmCacheEntry: Retrieve all properties of cache entries diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 676e84a..233d9ca 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -539,6 +539,11 @@ void cmCacheManager::CacheIterator::Next() } } +std::vector<std::string> cmCacheManager::CacheIterator::GetPropertyList() const +{ + return this->GetEntry().GetPropertyList(); +} + void cmCacheManager::CacheIterator::SetValue(const char* value) { if (this->IsAtEnd()) { @@ -558,6 +563,11 @@ bool cmCacheManager::CacheIterator::GetValueAsBool() const return cmSystemTools::IsOn(this->GetEntry().Value.c_str()); } +std::vector<std::string> cmCacheManager::CacheEntry::GetPropertyList() const +{ + return this->Properties.GetPropertyList(); +} + const char* cmCacheManager::CacheEntry::GetProperty( const std::string& prop) const { diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index e9b80cb..153e957 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -38,6 +38,7 @@ private: std::string Value; cmState::CacheEntryType Type; cmPropertyMap Properties; + std::vector<std::string> GetPropertyList() const; const char* GetProperty(const std::string&) const; void SetProperty(const std::string& property, const char* value); void AppendProperty(const std::string& property, const char* value, @@ -60,6 +61,7 @@ public: bool IsAtEnd() const; void Next(); std::string GetName() const { return this->Position->first; } + std::vector<std::string> GetPropertyList() const; const char* GetProperty(const std::string&) const; bool GetPropertyAsBool(const std::string&) const; bool PropertyExists(const std::string&) const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=120899c6980fcd81aa2a0d7b733ae15332a7a133 commit 120899c6980fcd81aa2a0d7b733ae15332a7a133 Author: Tobias Hunger <tobias.hun...@qt.io> AuthorDate: Fri Jun 10 09:34:14 2016 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Jun 10 09:33:02 2016 -0400 cmPropertyList: Add a way to retrieve all properties diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx index 74e04da..de1281e 100644 --- a/Source/cmPropertyMap.cxx +++ b/Source/cmPropertyMap.cxx @@ -15,6 +15,7 @@ #include "cmSystemTools.h" #include "cmake.h" +#include <algorithm> #include <assert.h> cmProperty* cmPropertyMap::GetOrCreateProperty(const std::string& name) @@ -29,6 +30,17 @@ cmProperty* cmPropertyMap::GetOrCreateProperty(const std::string& name) return prop; } +std::vector<std::string> cmPropertyMap::GetPropertyList() const +{ + std::vector<std::string> keyList; + for (cmPropertyMap::const_iterator i = this->begin(), e = this->end(); + i != e; ++i) { + keyList.push_back(i->first); + } + std::sort(keyList.begin(), keyList.end()); + return keyList; +} + void cmPropertyMap::SetProperty(const std::string& name, const char* value) { if (!value) { diff --git a/Source/cmPropertyMap.h b/Source/cmPropertyMap.h index 4e98750..6dc7bfb 100644 --- a/Source/cmPropertyMap.h +++ b/Source/cmPropertyMap.h @@ -19,6 +19,8 @@ class cmPropertyMap : public std::map<std::string, cmProperty> public: cmProperty* GetOrCreateProperty(const std::string& name); + std::vector<std::string> GetPropertyList() const; + void SetProperty(const std::string& name, const char* value); void AppendProperty(const std::string& name, const char* value, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7066218e792927cb6494ce73e834b8ddb3d275e6 commit 7066218e792927cb6494ce73e834b8ddb3d275e6 Author: Tobias Hunger <tobias.hun...@qt.io> AuthorDate: Fri Jun 10 09:54:07 2016 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Jun 10 09:27:59 2016 -0400 cmake: Kill cmake::CacheManager and its getter This member variable is never initialized and has apparently moved to cmState. diff --git a/Source/cmake.h b/Source/cmake.h index 4958a05..23726a2 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -209,9 +209,6 @@ public: return this->GeneratorToolset; } - ///! get the cmCachemManager used by this invocation of cmake - cmCacheManager* GetCacheManager() { return this->CacheManager; } - const std::vector<std::string>& GetSourceExtensions() const { return this->SourceFileExtensions; @@ -421,7 +418,6 @@ protected: CreateExtraGeneratorFunctionType newFunction); cmGlobalGenerator* GlobalGenerator; - cmCacheManager* CacheManager; std::map<std::string, DiagLevel> DiagLevels; std::string GeneratorPlatform; std::string GeneratorToolset; ----------------------------------------------------------------------- Summary of changes: Source/cmCacheManager.cxx | 10 ++++++++++ Source/cmCacheManager.h | 2 ++ Source/cmPropertyMap.cxx | 12 ++++++++++++ Source/cmPropertyMap.h | 2 ++ Source/cmState.cxx | 8 ++++++++ Source/cmState.h | 1 + Source/cmake.h | 4 ---- 7 files changed, 35 insertions(+), 4 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits