summaryrefslogtreecommitdiff
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-05-21 15:35:45 -0400
committerBrad King <brad.king@kitware.com>2015-05-22 08:44:46 -0400
commitb3475ba57bc839125440fe8d21f611198041434e (patch)
treee11dd2e8a36bcbc4881d372a6ad4ba70e9b05604 /Source/cmMakefileTargetGenerator.cxx
parentada5ffce7bad40c56e5d0dd76b9a7b30c96a9e92 (diff)
downloadcmake-b3475ba57bc839125440fe8d21f611198041434e.tar.gz
Makefile: Fix <LANG>_INCLUDE_WHAT_YOU_USE with CTEST_USE_LAUNCHERS
The 'ctest --launch' command must be placed before the IWYU launcher on the compiler command line. Extend the RunCMake.IncludeWhatYouUse test to cover this case. The Ninja generator already does it correctly.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 893b70d0d0..b28a701abd 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -761,13 +761,6 @@ cmMakefileTargetGenerator
source.GetFullPath(), workingDirectory, compileCommand);
}
- // Expand placeholders in the commands.
- for(std::vector<std::string>::iterator i = compileCommands.begin();
- i != compileCommands.end(); ++i)
- {
- this->LocalGenerator->ExpandRuleVariables(*i, vars);
- }
-
// Maybe insert an include-what-you-use runner.
if (!compileCommands.empty() && (lang == "C" || lang == "CXX"))
{
@@ -782,6 +775,13 @@ cmMakefileTargetGenerator
}
}
+ // Expand placeholders in the commands.
+ for(std::vector<std::string>::iterator i = compileCommands.begin();
+ i != compileCommands.end(); ++i)
+ {
+ this->LocalGenerator->ExpandRuleVariables(*i, vars);
+ }
+
// Change the command working directory to the local build tree.
this->LocalGenerator->CreateCDCommand
(compileCommands,