summaryrefslogtreecommitdiff
path: root/Source/cmDefinitions.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2010-08-24 14:40:51 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2010-09-01 13:08:14 -0400
commit52f9637174242752721dfb322908adb40c8244c2 (patch)
tree7b309c7e53d8790c3d270a12b523eb6e11187487 /Source/cmDefinitions.cxx
parentf794d589a44918c905911eb7688d69350922c6b3 (diff)
downloadcmake-52f9637174242752721dfb322908adb40c8244c2.tar.gz
Add method to get the local scope variables
Diffstat (limited to 'Source/cmDefinitions.cxx')
-rw-r--r--Source/cmDefinitions.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index 2d407189b3..34ca68d4a7 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -85,6 +85,19 @@ const char* cmDefinitions::Set(const char* key, const char* value)
}
//----------------------------------------------------------------------------
+std::set<cmStdString> cmDefinitions::LocalKeys() const
+{
+ std::set<cmStdString> keys;
+ // Consider local definitions.
+ for(MapType::const_iterator mi = this->Map.begin();
+ mi != this->Map.end(); ++mi)
+ {
+ keys.insert(mi->first);
+ }
+ return keys;
+}
+
+//----------------------------------------------------------------------------
cmDefinitions cmDefinitions::Closure() const
{
return cmDefinitions(ClosureTag(), this);