mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 20:19:53 +00:00
BUG: Fix get_property result for bad property
When a property does not exist we are supposed to return an empty value. Previously if a property did not exist we just left the value of the output variable unchanged. This teaches CMake to remove the definition of the output variable in this case.
This commit is contained in:
parent
1d96c943e0
commit
21fc04efaf
@ -205,7 +205,14 @@ bool cmGetPropertyCommand::StoreResult(const char* value)
|
||||
}
|
||||
else // if(this->InfoType == OutValue)
|
||||
{
|
||||
this->Makefile->AddDefinition(this->Variable.c_str(), value);
|
||||
if(value)
|
||||
{
|
||||
this->Makefile->AddDefinition(this->Variable.c_str(), value);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->Makefile->RemoveDefinition(this->Variable.c_str());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user