Comment ExpandRuleVariables calls not preceded by launcher insertion

Call sites of `ExpandRuleVariables` are now responsible for inserting
the `RULE_LAUNCH_{COMPILE,LINK,CUSTOM}` values in rule command lines.
Audit all call sites and add a comment to each one that does not insert
a launcher to explain why.
This commit is contained in:
Brad King 2016-12-09 08:54:10 -05:00
parent c58a5198e5
commit b7771078ad
2 changed files with 4 additions and 0 deletions

View File

@ -606,6 +606,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
lang_can_export_cmds && compileCommands.size() == 1) {
std::string compileCommand = compileCommands[0];
// no launcher for CMAKE_EXPORT_COMPILE_COMMANDS
rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator,
compileCommand, vars);
std::string workingDirectory = cmSystemTools::CollapseFullPath(
@ -741,6 +742,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
// Expand placeholders in the commands.
for (std::vector<std::string>::iterator i = preprocessCommands.begin();
i != preprocessCommands.end(); ++i) {
// no launcher for preprocessor commands
rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator,
*i, vars);
}
@ -789,6 +791,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
// Expand placeholders in the commands.
for (std::vector<std::string>::iterator i = assemblyCommands.begin();
i != assemblyCommands.end(); ++i) {
// no launcher for assembly commands
rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator,
*i, vars);
}

View File

@ -1015,6 +1015,7 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand(
for (std::vector<std::string>::iterator i = compileCmds.begin();
i != compileCmds.end(); ++i) {
// no launcher for CMAKE_EXPORT_COMPILE_COMMANDS
rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), *i,
compileObjectVars);
}