mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 04:40:18 -05:00
cmGetDirectoryPropertyCommand: Extract StoreResult method.
This commit is contained in:
@@ -89,12 +89,18 @@ bool cmGetDirectoryPropertyCommand
|
||||
{
|
||||
prop = dir->GetProperty(*i);
|
||||
}
|
||||
if (prop)
|
||||
{
|
||||
this->Makefile->AddDefinition(variable, prop);
|
||||
return true;
|
||||
}
|
||||
this->Makefile->AddDefinition(variable, "");
|
||||
this->StoreResult(variable, prop);
|
||||
return true;
|
||||
}
|
||||
|
||||
void cmGetDirectoryPropertyCommand::StoreResult(std::string const& variable,
|
||||
const char* prop)
|
||||
{
|
||||
if (prop)
|
||||
{
|
||||
this->Makefile->AddDefinition(variable, prop);
|
||||
return;
|
||||
}
|
||||
this->Makefile->AddDefinition(variable, "");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user