Commit 8fc53c3c authored by Stephen Kelly's avatar Stephen Kelly
Browse files

cmGetDirectoryPropertyCommand: Extract StoreResult method.

parent d17aa606
......@@ -89,12 +89,18 @@ bool cmGetDirectoryPropertyCommand
{
prop = dir->GetProperty(*i);
}
this->StoreResult(variable, prop);
return true;
}
void cmGetDirectoryPropertyCommand::StoreResult(std::string const& variable,
const char* prop)
{
if (prop)
{
this->Makefile->AddDefinition(variable, prop);
return true;
return;
}
this->Makefile->AddDefinition(variable, "");
return true;
}
......@@ -40,8 +40,9 @@ public:
virtual std::string GetName() const { return "get_directory_property";}
cmTypeMacro(cmGetDirectoryPropertyCommand, cmCommand);
};
private:
void StoreResult(const std::string& variable, const char* prop);
};
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment