From b7771078ad1ade95a4ae310815be7971017e10e1 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 9 Dec 2016 08:54:10 -0500 Subject: 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. --- Source/cmMakefileTargetGenerator.cxx | 3 +++ Source/cmNinjaTargetGenerator.cxx | 1 + 2 files changed, 4 insertions(+) diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index e3cde5e..06bf2f5 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -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::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::iterator i = assemblyCommands.begin(); i != assemblyCommands.end(); ++i) { + // no launcher for assembly commands rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i, vars); } diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 1ac6cd4..489f120 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -1015,6 +1015,7 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand( for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) { + // no launcher for CMAKE_EXPORT_COMPILE_COMMANDS rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), *i, compileObjectVars); } -- cgit v0.12