Browse Source

When using the API, check for Add vs. Remove

Ben Boeckel 15 years ago
parent
commit
5e41ba8e4a
1 changed files with 8 additions and 1 deletions
  1. 8 1
      Source/cmMakefile.cxx

+ 8 - 1
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
     {