summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-02 22:49:16 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-02 22:49:16 (GMT)
commitdcd9a1b59f58031a1eb94841a9c1cb58d5f9eff1 (patch)
treec7183188ebefa130dccc2d4e67ba9bd405094549 /Source/cmMakefile.cxx
parentec05369d04f155fc9d1456bfb6c535d7cce58279 (diff)
downloadCMake-dcd9a1b59f58031a1eb94841a9c1cb58d5f9eff1.zip
CMake-dcd9a1b59f58031a1eb94841a9c1cb58d5f9eff1.tar.gz
CMake-dcd9a1b59f58031a1eb94841a9c1cb58d5f9eff1.tar.bz2
BUG: Make RAISE_SCOPE function work when variable is not defined.
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);
+ }
}
}
}