summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-12-05 13:14:30 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-12-05 13:14:39 (GMT)
commit0236e5080229e5ce05c43077a56dc5b58fc644fd (patch)
treee897d7041fe96ec66e17a67545a2d3fac202cbd4
parent0b7822f49aef20ad758c637abe813463652cf9b0 (diff)
parentbfcc20343c966ee031426e04c5eab504a0af8e27 (diff)
downloadCMake-0236e5080229e5ce05c43077a56dc5b58fc644fd.zip
CMake-0236e5080229e5ce05c43077a56dc5b58fc644fd.tar.gz
CMake-0236e5080229e5ce05c43077a56dc5b58fc644fd.tar.bz2
Merge topic 'update-cpplint'
bfcc2034 Update cpplint support to return 0 and mark warnings for CDash. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1544
-rw-r--r--Source/cmcmd.cxx6
-rw-r--r--Tests/RunCMake/Cpplint/C-error-Build-result.txt2
-rw-r--r--Tests/RunCMake/Cpplint/C-error-launch-Build-result.txt2
-rw-r--r--Tests/RunCMake/Cpplint/CXX-error-Build-result.txt2
-rw-r--r--Tests/RunCMake/Cpplint/CXX-error-launch-Build-result.txt2
5 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 3d9f65a..b78fbe6 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -270,10 +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;
- return ret;
+ // always return 0 so the build can continue as cpplint returns non-zero
+ // for any warning
+ return 0;
}
static int HandleCppCheck(const std::string& runCmd,
diff --git a/Tests/RunCMake/Cpplint/C-error-Build-result.txt b/Tests/RunCMake/Cpplint/C-error-Build-result.txt
index d197c91..573541a 100644
--- a/Tests/RunCMake/Cpplint/C-error-Build-result.txt
+++ b/Tests/RunCMake/Cpplint/C-error-Build-result.txt
@@ -1 +1 @@
-[^0]
+0
diff --git a/Tests/RunCMake/Cpplint/C-error-launch-Build-result.txt b/Tests/RunCMake/Cpplint/C-error-launch-Build-result.txt
index d197c91..573541a 100644
--- a/Tests/RunCMake/Cpplint/C-error-launch-Build-result.txt
+++ b/Tests/RunCMake/Cpplint/C-error-launch-Build-result.txt
@@ -1 +1 @@
-[^0]
+0
diff --git a/Tests/RunCMake/Cpplint/CXX-error-Build-result.txt b/Tests/RunCMake/Cpplint/CXX-error-Build-result.txt
index d197c91..573541a 100644
--- a/Tests/RunCMake/Cpplint/CXX-error-Build-result.txt
+++ b/Tests/RunCMake/Cpplint/CXX-error-Build-result.txt
@@ -1 +1 @@
-[^0]
+0
diff --git a/Tests/RunCMake/Cpplint/CXX-error-launch-Build-result.txt b/Tests/RunCMake/Cpplint/CXX-error-launch-Build-result.txt
index d197c91..573541a 100644
--- a/Tests/RunCMake/Cpplint/CXX-error-launch-Build-result.txt
+++ b/Tests/RunCMake/Cpplint/CXX-error-launch-Build-result.txt
@@ -1 +1 @@
-[^0]
+0