summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-14 14:14:09 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-01-14 14:14:17 (GMT)
commite91f1616d92120bd364437fc915634d48d653512 (patch)
treeb94c3ea2d821c49e8cf1f46cb5ea00a0f4ce0096 /Source
parent3e763d506cda64d76c40d327371925e9df7cbca8 (diff)
parentc834c47dfc8006fbdf95a22ea4241b53d7235915 (diff)
downloadCMake-e91f1616d92120bd364437fc915634d48d653512.zip
CMake-e91f1616d92120bd364437fc915634d48d653512.tar.gz
CMake-e91f1616d92120bd364437fc915634d48d653512.tar.bz2
Merge topic 'cpplint-no-output-no-warning'
c834c47dfc cpplint: only print diagnostics to console if there are errors Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2788
Diffstat (limited to 'Source')
-rw-r--r--Source/cmcmd.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 930ced9..7287594 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -270,9 +270,12 @@ static int HandleCppLint(const std::string& runCmd,
<< "\n";
return 1;
}
- std::cerr << "Warning: cpplint diagnostics:\n";
- // Output the output from cpplint to stderr
- std::cerr << stdOut;
+ if (!stdOut.empty()) {
+ std::cerr << "Warning: cpplint diagnostics:\n";
+ // Output the output from cpplint to stderr
+ std::cerr << stdOut;
+ }
+
// always return 0 so the build can continue as cpplint returns non-zero
// for any warning
return 0;