summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2010-09-17 14:13:19 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2010-09-17 14:13:19 (GMT)
commit5e41ba8e4a25bec2b5d7c175f80a1ace0999a8ff (patch)
tree6f746ed1ae907cbb04427857cb14f00fbafbf6d8 /Source/cmMakefile.cxx
parentdee19760a701408411d6b20cc623ccb53ce54732 (diff)
downloadCMake-5e41ba8e4a25bec2b5d7c175f80a1ace0999a8ff.zip
CMake-5e41ba8e4a25bec2b5d7c175f80a1ace0999a8ff.tar.gz
CMake-5e41ba8e4a25bec2b5d7c175f80a1ace0999a8ff.tar.bz2
When using the API, check for Add vs. Remove
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 2908fa3..a9faa6b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3483,7 +3483,14 @@ void cmMakefile::RaiseScope(const char *var, const char *varDef)
// directory's scope was initialized by the closure of the parent
// scope, so we do not need to localize the definition first.
cmMakefile* parent = plg->GetMakefile();
- parent->AddDefinition(var, varDef);
+ if (varDef)
+ {
+ parent->AddDefinition(var, varDef);
+ }
+ else
+ {
+ parent->RemoveDefinition(var);
+ }
}
else
{