1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-21 23:00:50 +08:00

When using the API, check for Add vs. Remove

This commit is contained in:
Ben Boeckel
2010-09-17 10:13:19 -04:00
parent dee19760a7
commit 5e41ba8e4a

View File

@@ -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
{