[Cmake-commits] CMake branch, next, updated. v3.5.2-1094-g690bc37
Brad King
brad.king at kitware.com
Wed Apr 27 09:10:08 EDT 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 690bc37cd987b3e05078cd3c40a38eb79225b2a4 (commit)
via 04d74a7f891dc01b2a9c6b1388f303af9404c49b (commit)
from 5a9723862ce1e27f750000d4f6fb0ae91aab1b8a (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=690bc37cd987b3e05078cd3c40a38eb79225b2a4
commit 690bc37cd987b3e05078cd3c40a38eb79225b2a4
Merge: 5a97238 04d74a7
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 27 09:10:07 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Apr 27 09:10:07 2016 -0400
Merge topic 'clang-tidy-output-cleanup' into next
04d74a7f Clang-Tidy: copy stdout to sterr; ignore original stderr
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=04d74a7f891dc01b2a9c6b1388f303af9404c49b
commit 04d74a7f891dc01b2a9c6b1388f303af9404c49b
Author: Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Tue Apr 26 22:50:54 2016 +0200
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 27 09:06:47 2016 -0400
Clang-Tidy: copy stdout to sterr; ignore original stderr
Clang-Tidy writes the number of warnings, the number of suppressed
warnings, and instructions on how to suppress warnings to stderr. Since
each source file is checked individually, this repetitive information is
disturbing and should be suppressed.
The actual warning messages are written to stdout. Some IDEs (eg.
QtCreator) analyze only stderr for issues. Redirecting Clang-Tidy's
stdout to stderr makes sure the warnings are correctly displayed.
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 3c28c35..0b9518c 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -389,13 +389,17 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
tidy_cmd.push_back("--");
tidy_cmd.insert(tidy_cmd.end(), orig_cmd.begin()+1, orig_cmd.end());
- // Run the tidy command line.
- if(!cmSystemTools::RunSingleCommand(tidy_cmd, 0, 0, &ret, 0,
- cmSystemTools::OUTPUT_PASSTHROUGH))
+ // Run the tidy command line. Capture its stdout and hide its stderr.
+ std::string stdOut;
+ if(!cmSystemTools::RunSingleCommand(tidy_cmd, &stdOut, 0, &ret, 0,
+ cmSystemTools::OUTPUT_NONE))
{
std::cerr << "Error running '" << tidy_cmd[0] << "'\n";
return 1;
}
+
+ // Output the stdout from clang-tidy to stderr
+ std::cerr << stdOut;
}
// Now run the real compiler command and return its result value.
-----------------------------------------------------------------------
Summary of changes:
Source/cmcmd.cxx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list