diff options
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 930ced9..24e3dc8 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -44,6 +44,7 @@ #include <stdlib.h> #include <string.h> #include <time.h> +#include <utility> class cmConnection; @@ -270,9 +271,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; |