[cmake-commits] king committed cmMakefile.cxx 1.420 1.421
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Jan 2 17:49:18 EST 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv29573/Source
Modified Files:
cmMakefile.cxx
Log Message:
BUG: Make RAISE_SCOPE function work when variable is not defined.
Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.420
retrieving revision 1.421
diff -u -d -r1.420 -r1.421
--- cmMakefile.cxx 1 Jan 2008 20:13:41 -0000 1.420
+++ cmMakefile.cxx 2 Jan 2008 22:49:16 -0000 1.421
@@ -2853,7 +2853,14 @@
// 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 @@
cmMakefile *parent = this->LocalGenerator->GetParent()->GetMakefile();
if (parent)
{
- parent->AddDefinition(var,varDef);
+ if(varDef)
+ {
+ parent->AddDefinition(var,varDef);
+ }
+ else
+ {
+ parent->RemoveDefinition(var);
+ }
}
}
}
More information about the Cmake-commits
mailing list