mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 21:59:54 -06:00
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:
committed by
Brad King
parent
20afbd5e03
commit
bc280f1c81
@@ -122,15 +122,8 @@ bool cmSetCommand
|
||||
|
||||
if (parentScope)
|
||||
{
|
||||
if (value.empty())
|
||||
{
|
||||
this->Makefile->RaiseScope(variable, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->Makefile->RaiseScope(variable, value.c_str());
|
||||
}
|
||||
return true;
|
||||
this->Makefile->RaiseScope(variable, value.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user