diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-10-09 08:34:47 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-10-15 09:25:12 (GMT) |
commit | 425cd1670fdd40b752af71e5f28952ae4fcec4ac (patch) | |
tree | 5b5538f305e6636f94fa24000b8fb0874b35df43 /Source/cmLocalNinjaGenerator.cxx | |
parent | 0d818632978a450f1afaf687c867e62e885457f7 (diff) | |
download | CMake-425cd1670fdd40b752af71e5f28952ae4fcec4ac.zip CMake-425cd1670fdd40b752af71e5f28952ae4fcec4ac.tar.gz CMake-425cd1670fdd40b752af71e5f28952ae4fcec4ac.tar.bz2 |
cmLocalGenerator: Remove the launcher from RuleVariables
This one is not like the others as it doesn't participate in
substitutions. Keep ExpandRuleVariables doing only one thing and make
callers responsible for inserting a launcher prefix, simplifying the
code all-around.
Remove now-obsolete InsertRuleLauncher method.
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index e25eb0f..ea711c0 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -468,8 +468,8 @@ void cmLocalNinjaGenerator::WriteCustomCommandBuildStatements() std::string cmLocalNinjaGenerator::MakeCustomLauncher( cmCustomCommandGenerator const& ccg) { - const char* property = "RULE_LAUNCH_CUSTOM"; - const char* property_value = this->Makefile->GetProperty(property); + const char* property_value = + this->Makefile->GetProperty("RULE_LAUNCH_CUSTOM"); if (!property_value || !*property_value) { return std::string(); @@ -478,7 +478,7 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( // Expand rules in the empty string. It may insert the launcher and // perform replacements. RuleVariables vars; - vars.RuleLauncher = property; + std::string output; const std::vector<std::string>& outputs = ccg.GetOutputs(); if (!outputs.empty()) { @@ -491,7 +491,9 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( } vars.Output = output.c_str(); - std::string launcher; + std::string launcher = property_value; + launcher += " "; + this->ExpandRuleVariables(launcher, vars); if (!launcher.empty()) { launcher += " "; |