[Cmake-commits] CMake branch, next, updated. v3.7.0-1260-g723b9b3
Brad King
brad.king at kitware.com
Fri Nov 18 09:32:01 EST 2016
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 723b9b35bf191161abb4179c7a10c65dedecfb46 (commit)
via d85e8a9b2e012a0339d0c0e9cd55bb146b81a9ce (commit)
via ceb6a9f243c54ce3772188ea971d5fd6c66ff6fb (commit)
from 4545da9029b0882f36722197ea80a81f32f8c219 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=723b9b35bf191161abb4179c7a10c65dedecfb46
commit 723b9b35bf191161abb4179c7a10c65dedecfb46
Merge: 4545da9 d85e8a9
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 18 09:31:56 2016 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Nov 18 09:31:56 2016 -0500
Merge topic 'capture-clang-tidy-errors' into next
d85e8a9b fixup! cmake: Report if the <LANG>_CLANG_TIDY tool exits with non-zero
ceb6a9f2 fixup! cmake: Comment why we ignore the include-what-you-use return code
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d85e8a9b2e012a0339d0c0e9cd55bb146b81a9ce
commit d85e8a9b2e012a0339d0c0e9cd55bb146b81a9ce
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 18 09:26:51 2016 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 18 09:30:01 2016 -0500
fixup! cmake: Report if the <LANG>_CLANG_TIDY tool exits with non-zero
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 8431945..ff25427 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -361,13 +361,17 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
std::string stdErr;
if (!cmSystemTools::RunSingleCommand(tidy_cmd, &stdOut, &stdErr, &ret,
CM_NULLPTR,
- cmSystemTools::OUTPUT_NONE) ||
- ret != 0) {
+ cmSystemTools::OUTPUT_NONE)) {
std::cerr << "Error running '" << tidy_cmd[0] << "':\n" << stdErr;
- return ret != 0 ? ret : 1;
+ return 1;
}
// Output the stdout from clang-tidy to stderr
std::cerr << stdOut;
+ // If clang-tidy exited with an error do the same.
+ if (ret != 0) {
+ std::cerr << stdErr;
+ return ret;
+ }
}
if (!lwyu.empty()) {
// Construct the ldd -r -u (link what you use lwyu) command line
diff --git a/Tests/RunCMake/ClangTidy/C-bad-Build-stdout.txt b/Tests/RunCMake/ClangTidy/C-bad-Build-stdout.txt
index ef0afe5..94b967f 100644
--- a/Tests/RunCMake/ClangTidy/C-bad-Build-stdout.txt
+++ b/Tests/RunCMake/ClangTidy/C-bad-Build-stdout.txt
@@ -1,2 +1 @@
-Error running '[^']*Tests/RunCMake/pseudo_tidy[^']*':
bad command line arg '-bad'
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ceb6a9f243c54ce3772188ea971d5fd6c66ff6fb
commit ceb6a9f243c54ce3772188ea971d5fd6c66ff6fb
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 18 09:07:54 2016 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 18 09:07:54 2016 -0500
fixup! cmake: Comment why we ignore the include-what-you-use return code
diff --git a/Tests/RunCMake/pseudo_iwyu.c b/Tests/RunCMake/pseudo_iwyu.c
index 1e25de7..c761741 100644
--- a/Tests/RunCMake/pseudo_iwyu.c
+++ b/Tests/RunCMake/pseudo_iwyu.c
@@ -3,5 +3,6 @@
int main(void)
{
fprintf(stderr, "should add these lines:\n#include <...>\n");
- return 0;
+ /* include-what-you-use always returns failure */
+ return 1;
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmcmd.cxx | 10 +++++++---
Tests/RunCMake/ClangTidy/C-bad-Build-stdout.txt | 1 -
Tests/RunCMake/pseudo_iwyu.c | 3 ++-
3 files changed, 9 insertions(+), 5 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list