diff options
author | Brad King <brad.king@kitware.com> | 2019-01-14 14:14:09 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-14 14:14:17 (GMT) |
commit | e91f1616d92120bd364437fc915634d48d653512 (patch) | |
tree | b94c3ea2d821c49e8cf1f46cb5ea00a0f4ce0096 /Source | |
parent | 3e763d506cda64d76c40d327371925e9df7cbca8 (diff) | |
parent | c834c47dfc8006fbdf95a22ea4241b53d7235915 (diff) | |
download | CMake-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.cxx | 9 |
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; |