summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-08-27 11:44:54 (GMT)
committerStephen Kelly <steveire@gmail.com>2016-08-27 13:21:24 (GMT)
commitba4ba7c39de82b805652efbb7dc5e1659c53f36b (patch)
tree43a7450ba59b7f6c0fe83e211d33936a62e88898 /Source/cmLocalUnixMakefileGenerator3.cxx
parente804d410cd4e391cd81ff3d8981cfba1fae28742 (diff)
downloadCMake-ba4ba7c39de82b805652efbb7dc5e1659c53f36b.zip
CMake-ba4ba7c39de82b805652efbb7dc5e1659c53f36b.tar.gz
CMake-ba4ba7c39de82b805652efbb7dc5e1659c53f36b.tar.bz2
Makefiles: Simplify MakeLauncher return value
Bonus NRVO.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 47b891f..53c2ff6 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1031,6 +1031,7 @@ std::string cmLocalUnixMakefileGenerator3::MakeLauncher(
cmCustomCommandGenerator const& ccg, cmGeneratorTarget* target,
cmOutputConverter::RelativeRoot relative)
{
+ std::string launcher;
// Short-circuit if there is no launcher.
const char* prop = "RULE_LAUNCH_CUSTOM";
const char* val = this->GetRuleLauncher(target, prop);
@@ -1047,14 +1048,12 @@ std::string cmLocalUnixMakefileGenerator3::MakeLauncher(
}
vars.Output = output.c_str();
- std::string launcher;
this->ExpandRuleVariables(launcher, vars);
if (!launcher.empty()) {
launcher += " ";
}
- return launcher;
}
- return "";
+ return launcher;
}
void cmLocalUnixMakefileGenerator3::AppendCleanCommand(