summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 306c00b..49fc0f1 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2853,7 +2853,14 @@ void cmMakefile::RaiseScope(const char *var)
// multiple scopes in this directory?
if (this->DefinitionStack.size() > 1)
{
- this->DefinitionStack[this->DefinitionStack.size()-2][var] = varDef;
+ if(varDef)
+ {
+ this->DefinitionStack[this->DefinitionStack.size()-2][var] = varDef;
+ }
+ else
+ {
+ this->DefinitionStack[this->DefinitionStack.size()-2].erase(var);
+ }
}
// otherwise do the parent
else
@@ -2861,7 +2868,14 @@ void cmMakefile::RaiseScope(const char *var)
cmMakefile *parent = this->LocalGenerator->GetParent()->GetMakefile();
if (parent)
{
- parent->AddDefinition(var,varDef);
+ if(varDef)
+ {
+ parent->AddDefinition(var,varDef);
+ }
+ else
+ {
+ parent->RemoveDefinition(var);
+ }
}
}
}