Makefiles: Simplify MakeLauncher return value
Bonus NRVO.
This commit is contained in:
parent
e804d410cd
commit
ba4ba7c39d
@ -1031,6 +1031,7 @@ std::string cmLocalUnixMakefileGenerator3::MakeLauncher(
|
|||||||
cmCustomCommandGenerator const& ccg, cmGeneratorTarget* target,
|
cmCustomCommandGenerator const& ccg, cmGeneratorTarget* target,
|
||||||
cmOutputConverter::RelativeRoot relative)
|
cmOutputConverter::RelativeRoot relative)
|
||||||
{
|
{
|
||||||
|
std::string launcher;
|
||||||
// Short-circuit if there is no launcher.
|
// Short-circuit if there is no launcher.
|
||||||
const char* prop = "RULE_LAUNCH_CUSTOM";
|
const char* prop = "RULE_LAUNCH_CUSTOM";
|
||||||
const char* val = this->GetRuleLauncher(target, prop);
|
const char* val = this->GetRuleLauncher(target, prop);
|
||||||
@ -1047,14 +1048,12 @@ std::string cmLocalUnixMakefileGenerator3::MakeLauncher(
|
|||||||
}
|
}
|
||||||
vars.Output = output.c_str();
|
vars.Output = output.c_str();
|
||||||
|
|
||||||
std::string launcher;
|
|
||||||
this->ExpandRuleVariables(launcher, vars);
|
this->ExpandRuleVariables(launcher, vars);
|
||||||
if (!launcher.empty()) {
|
if (!launcher.empty()) {
|
||||||
launcher += " ";
|
launcher += " ";
|
||||||
}
|
}
|
||||||
return launcher;
|
|
||||||
}
|
}
|
||||||
return "";
|
return launcher;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmLocalUnixMakefileGenerator3::AppendCleanCommand(
|
void cmLocalUnixMakefileGenerator3::AppendCleanCommand(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user