summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-25 14:36:48 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-29 20:48:56 (GMT)
commit5067ae41b03442a7dba9210595e782678835a3ff (patch)
tree521e7cee3dedb979ffd1101f731d5edc8468f924 /Source/cmMakefile.cxx
parent60200ca5088058c70282500994727f2017276df8 (diff)
downloadCMake-5067ae41b03442a7dba9210595e782678835a3ff.zip
CMake-5067ae41b03442a7dba9210595e782678835a3ff.tar.gz
CMake-5067ae41b03442a7dba9210595e782678835a3ff.tar.bz2
cmDefinitions: Externalize the Set logic.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d71b815..8754427 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -78,7 +78,15 @@ public:
void RemoveDefinition(std::string const& name)
{
- this->VarStack.top().Set(name, 0);
+ if (this->VarStack.size() > 1)
+ {
+ // In lower scopes we store keys, defined or not.
+ this->VarStack.top().Set(name, 0);
+ }
+ else
+ {
+ this->VarStack.top().Erase(name);
+ }
}
std::set<std::string> LocalKeys() const