diff options
author | Brad King <brad.king@kitware.com> | 2008-01-02 22:49:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-02 22:49:16 (GMT) |
commit | dcd9a1b59f58031a1eb94841a9c1cb58d5f9eff1 (patch) | |
tree | c7183188ebefa130dccc2d4e67ba9bd405094549 /Source/cmMakefile.cxx | |
parent | ec05369d04f155fc9d1456bfb6c535d7cce58279 (diff) | |
download | CMake-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.cxx | 18 |
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); + } } } } |