diff options
author | Brad King <brad.king@kitware.com> | 2014-10-27 12:32:26 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-10-27 12:32:26 (GMT) |
commit | 8eb64831bec333914aab3af54e2d1deded02eb90 (patch) | |
tree | fa90031d682546d1b491be67c481a394edf18861 /Source/cmDefinitions.h | |
parent | 21cf9364f092004a027f11b5bf574804cc8cfded (diff) | |
parent | d1b62185d6b66b27a3ef31b79d4cff1c5126793e (diff) | |
download | CMake-8eb64831bec333914aab3af54e2d1deded02eb90.zip CMake-8eb64831bec333914aab3af54e2d1deded02eb90.tar.gz CMake-8eb64831bec333914aab3af54e2d1deded02eb90.tar.bz2 |
Merge topic 'revert-definition-map-lookup'
d1b62185 Merge branch 'parent-scope-tests' into variable-pull-failure
5f414cef Revert "cmDefinitions: Don't store parent lookups"
e0c0b1ac test: add a test for PARENT_SCOPE with multiple scopes
064c415d test: add test for PARENT_SCOPE behavior
Diffstat (limited to 'Source/cmDefinitions.h')
-rw-r--r-- | Source/cmDefinitions.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index 5209a8b..a2f053f 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -36,11 +36,9 @@ public: /** Returns the parent scope, if any. */ cmDefinitions* GetParent() const { return this->Up; } - /** Get the value associated with a key; null if none. */ - const char* Get(const std::string& key) const; - - /** Pull a variable from the parent. */ - void Pull(const std::string& key); + /** Get the value associated with a key; null if none. + Store the result locally if it came from a parent. */ + const char* Get(const std::string& key); /** Set (or unset if null) a value associated with a key. */ const char* Set(const std::string& key, const char* value); @@ -82,7 +80,7 @@ private: MapType Map; // Internal query and update methods. - Def const& GetInternal(const std::string& key) const; + Def const& GetInternal(const std::string& key); Def const& SetInternal(const std::string& key, Def const& def); // Implementation of Closure() method. |