[Cmake-commits] CMake branch, next, updated. v3.2.2-3068-gd4cac21
Brad King
brad.king at kitware.com
Fri May 22 08:48:05 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via d4cac214dac01aa5dde668b592d8b800b168c246 (commit)
via b3475ba57bc839125440fe8d21f611198041434e (commit)
from d2a981afa7e038dfb44e2643e263f089bfd12541 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4cac214dac01aa5dde668b592d8b800b168c246
commit d4cac214dac01aa5dde668b592d8b800b168c246
Merge: d2a981a b3475ba
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri May 22 08:48:04 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri May 22 08:48:04 2015 -0400
Merge topic 'run-include-what-you-use' into next
b3475ba5 Makefile: Fix <LANG>_INCLUDE_WHAT_YOU_USE with CTEST_USE_LAUNCHERS
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b3475ba57bc839125440fe8d21f611198041434e
commit b3475ba57bc839125440fe8d21f611198041434e
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu May 21 15:35:45 2015 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri May 22 08:44:46 2015 -0400
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.
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 893b70d..b28a701 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,
diff --git a/Tests/RunCMake/IncludeWhatYouUse/C-launch-Build-stdout.txt b/Tests/RunCMake/IncludeWhatYouUse/C-launch-Build-stdout.txt
new file mode 100644
index 0000000..cb74677
--- /dev/null
+++ b/Tests/RunCMake/IncludeWhatYouUse/C-launch-Build-stdout.txt
@@ -0,0 +1,4 @@
+Warning: include-what-you-use reported diagnostics:
+should add these lines:
+*
+#include <\.\.\.>
diff --git a/Tests/RunCMake/IncludeWhatYouUse/C-launch.cmake b/Tests/RunCMake/IncludeWhatYouUse/C-launch.cmake
new file mode 100644
index 0000000..e66ca20
--- /dev/null
+++ b/Tests/RunCMake/IncludeWhatYouUse/C-launch.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(C.cmake)
diff --git a/Tests/RunCMake/IncludeWhatYouUse/CXX-launch-Build-stdout.txt b/Tests/RunCMake/IncludeWhatYouUse/CXX-launch-Build-stdout.txt
new file mode 100644
index 0000000..cb74677
--- /dev/null
+++ b/Tests/RunCMake/IncludeWhatYouUse/CXX-launch-Build-stdout.txt
@@ -0,0 +1,4 @@
+Warning: include-what-you-use reported diagnostics:
+should add these lines:
+*
+#include <\.\.\.>
diff --git a/Tests/RunCMake/IncludeWhatYouUse/CXX-launch.cmake b/Tests/RunCMake/IncludeWhatYouUse/CXX-launch.cmake
new file mode 100644
index 0000000..3002c9d
--- /dev/null
+++ b/Tests/RunCMake/IncludeWhatYouUse/CXX-launch.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(CXX.cmake)
diff --git a/Tests/RunCMake/IncludeWhatYouUse/RunCMakeTest.cmake b/Tests/RunCMake/IncludeWhatYouUse/RunCMakeTest.cmake
index 68c6bd7..8f99eb1 100644
--- a/Tests/RunCMake/IncludeWhatYouUse/RunCMakeTest.cmake
+++ b/Tests/RunCMake/IncludeWhatYouUse/RunCMakeTest.cmake
@@ -16,3 +16,7 @@ endfunction()
run_iwyu(C)
run_iwyu(CXX)
+if (NOT RunCMake_GENERATOR STREQUAL "Watcom WMake")
+ run_iwyu(C-launch)
+ run_iwyu(CXX-launch)
+endif()
-----------------------------------------------------------------------
Summary of changes:
Source/cmMakefileTargetGenerator.cxx | 14 +++++++-------
.../{C-Build-stdout.txt => C-launch-Build-stdout.txt} | 0
Tests/RunCMake/IncludeWhatYouUse/C-launch.cmake | 3 +++
.../{C-Build-stdout.txt => CXX-launch-Build-stdout.txt} | 0
Tests/RunCMake/IncludeWhatYouUse/CXX-launch.cmake | 3 +++
Tests/RunCMake/IncludeWhatYouUse/RunCMakeTest.cmake | 4 ++++
6 files changed, 17 insertions(+), 7 deletions(-)
copy Tests/RunCMake/IncludeWhatYouUse/{C-Build-stdout.txt => C-launch-Build-stdout.txt} (100%)
create mode 100644 Tests/RunCMake/IncludeWhatYouUse/C-launch.cmake
copy Tests/RunCMake/IncludeWhatYouUse/{C-Build-stdout.txt => CXX-launch-Build-stdout.txt} (100%)
create mode 100644 Tests/RunCMake/IncludeWhatYouUse/CXX-launch.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list