summaryrefslogtreecommitdiffstats
path: root/Source/cmPropertyMap.cxx
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2016-06-10 07:34:14 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-10 13:33:02 (GMT)
commit120899c6980fcd81aa2a0d7b733ae15332a7a133 (patch)
treedd7876776937bb8d61fadff3d7c3844178b0f979 /Source/cmPropertyMap.cxx
parent7066218e792927cb6494ce73e834b8ddb3d275e6 (diff)
downloadCMake-120899c6980fcd81aa2a0d7b733ae15332a7a133.zip
CMake-120899c6980fcd81aa2a0d7b733ae15332a7a133.tar.gz
CMake-120899c6980fcd81aa2a0d7b733ae15332a7a133.tar.bz2
cmPropertyList: Add a way to retrieve all properties
Diffstat (limited to 'Source/cmPropertyMap.cxx')
-rw-r--r--Source/cmPropertyMap.cxx12
1 files changed, 12 insertions, 0 deletions
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) {