set: Fix handling of empty value with PARENT_SCOPE
Just as set(VAR "") sets VAR to an empty string in the current scope, the code set(VAR "" PARENT_SCOPE) is documented to set the variable to an empty string in the parent scope. Fix the implementation to make it so.
This commit is contained in:
parent
20afbd5e03
commit
bc280f1c81
|
@ -121,15 +121,8 @@ bool cmSetCommand
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parentScope)
|
if (parentScope)
|
||||||
{
|
|
||||||
if (value.empty())
|
|
||||||
{
|
|
||||||
this->Makefile->RaiseScope(variable, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
this->Makefile->RaiseScope(variable, value.c_str());
|
this->Makefile->RaiseScope(variable, value.c_str());
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue