summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestUploadCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2016-07-28 19:12:43 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-20 17:14:20 (GMT)
commitd328dc6853e211dc05c4abcf62cc64b9c91235a2 (patch)
tree188238fc8ae3c7a85dc3edf1eae3a70b85b6197f /Source/CTest/cmCTestUploadCommand.cxx
parent9ac2e189607433b45b252a1e2261ccfaf11e492b (diff)
downloadCMake-d328dc6853e211dc05c4abcf62cc64b9c91235a2.zip
CMake-d328dc6853e211dc05c4abcf62cc64b9c91235a2.tar.gz
CMake-d328dc6853e211dc05c4abcf62cc64b9c91235a2.tar.bz2
CTest: Add CAPTURE_CMAKE_ERROR val to `ctest_*` commands
If a `ctest_*` command has CAPTURE_CMAKE_ERROR then any errors generated by cmake during that command will cause the value to be assigned `-1`. This will prevent a `ctest -S` script from returning non-zero unless the script explicitly calls `message(FATAL_ERROR)`.
Diffstat (limited to 'Source/CTest/cmCTestUploadCommand.cxx')
-rw-r--r--Source/CTest/cmCTestUploadCommand.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestUploadCommand.cxx b/Source/CTest/cmCTestUploadCommand.cxx
index 5ea637e..c4458dd 100644
--- a/Source/CTest/cmCTestUploadCommand.cxx
+++ b/Source/CTest/cmCTestUploadCommand.cxx
@@ -45,11 +45,19 @@ bool cmCTestUploadCommand::CheckArgumentKeyword(std::string const& arg)
this->Quiet = true;
return true;
}
+ if (arg == "CAPTURE_CMAKE_ERROR") {
+ this->ArgumentDoing = ArgumentDoingCaptureCMakeError;
+ return true;
+ }
return false;
}
bool cmCTestUploadCommand::CheckArgumentValue(std::string const& arg)
{
+ if (this->ArgumentDoing == ArgumentDoingCaptureCMakeError) {
+ this->Values[ct_CAPTURE_CMAKE_ERROR] = arg.c_str();
+ return true;
+ }
if (this->ArgumentDoing == ArgumentDoingFiles) {
if (cmSystemTools::FileExists(arg.c_str())) {
this->Files.insert(arg);