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 9f1618b..8a140e8 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -323,11 +323,15 @@ static int HandleCppCheck(const std::string& runCmd, stdErr.find("(performance)") != std::string::npos || stdErr.find("(portability)") != std::string::npos || stdErr.find("(information)") != std::string::npos) { - std::cerr << "Warning: cppcheck reported diagnostics:\n"; + if (ret == 0) { + std::cerr << "Warning: cppcheck reported diagnostics:\n"; + } else { + std::cerr << "Error: cppcheck reported failure:\n"; + } } std::cerr << stdErr; - // ignore errors so build continues - return 0; + + return ret; } typedef int (*CoCompileHandler)(const std::string&, const std::string&, |