When using the API, check for Add vs. Remove
This commit is contained in:
parent
dee19760a7
commit
5e41ba8e4a
@ -3483,8 +3483,15 @@ void cmMakefile::RaiseScope(const char *var, const char *varDef)
|
|||||||
// directory's scope was initialized by the closure of the parent
|
// directory's scope was initialized by the closure of the parent
|
||||||
// scope, so we do not need to localize the definition first.
|
// scope, so we do not need to localize the definition first.
|
||||||
cmMakefile* parent = plg->GetMakefile();
|
cmMakefile* parent = plg->GetMakefile();
|
||||||
|
if (varDef)
|
||||||
|
{
|
||||||
parent->AddDefinition(var, varDef);
|
parent->AddDefinition(var, varDef);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
parent->RemoveDefinition(var);
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmOStringStream m;
|
cmOStringStream m;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user