summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 1d2f741..e2225ff 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&,