summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-12-12 19:21:20 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-12-12 19:21:20 (GMT)
commitce71bd9505a46d7350c0e256f2d8f4f183d1c9fa (patch)
tree5c617f636a6949928afefb1cc9cfde59bfde8623
parent3874843f0f5be9d53001517b3697e0d092f0e845 (diff)
parentdb61cd5d72f78aaf720f60f8e3a573fc36599bf9 (diff)
downloadCMake-ce71bd9505a46d7350c0e256f2d8f4f183d1c9fa.zip
CMake-ce71bd9505a46d7350c0e256f2d8f4f183d1c9fa.tar.gz
CMake-ce71bd9505a46d7350c0e256f2d8f4f183d1c9fa.tar.bz2
Merge topic 'fix-ctest-launchers'
db61cd5d cmRulePlaceholderExpander: Remove unused member RuleLauncher b7771078 Comment ExpandRuleVariables calls not preceded by launcher insertion c58a5198 Makefile: Restore RULE_LAUNCH_COMPILE generation on compilation rules
-rw-r--r--Source/cmMakefileTargetGenerator.cxx15
-rw-r--r--Source/cmNinjaTargetGenerator.cxx1
-rw-r--r--Source/cmRulePlaceholderExpander.h1
3 files changed, 15 insertions, 2 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 6906a90..4218930 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -553,7 +553,6 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
}
}
cmRulePlaceholderExpander::RuleVariables vars;
- vars.RuleLauncher = "RULE_LAUNCH_COMPILE";
vars.CMTargetName = this->GeneratorTarget->GetName().c_str();
vars.CMTargetType =
cmState::GetTargetTypeName(this->GeneratorTarget->GetType());
@@ -624,6 +623,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(
@@ -681,9 +681,20 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
}
}
+ std::string launcher;
+ {
+ const char* val = this->LocalGenerator->GetRuleLauncher(
+ this->GeneratorTarget, "RULE_LAUNCH_COMPILE");
+ if (val && *val) {
+ launcher = val;
+ launcher += " ";
+ }
+ }
+
// Expand placeholders in the commands.
for (std::vector<std::string>::iterator i = compileCommands.begin();
i != compileCommands.end(); ++i) {
+ *i = launcher + *i;
rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i,
vars);
}
@@ -748,6 +759,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);
}
@@ -796,6 +808,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);
}
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 8090542..b5aeb54 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -1046,6 +1046,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);
}
diff --git a/Source/cmRulePlaceholderExpander.h b/Source/cmRulePlaceholderExpander.h
index 5223ae9..8329166 100644
--- a/Source/cmRulePlaceholderExpander.h
+++ b/Source/cmRulePlaceholderExpander.h
@@ -56,7 +56,6 @@ public:
const char* LanguageCompileFlags;
const char* Defines;
const char* Includes;
- const char* RuleLauncher;
const char* DependencyFile;
const char* FilterPrefix;
};