summaryrefslogtreecommitdiff
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorDāvis Mosāns <davispuh@gmail.com>2016-07-08 00:54:05 +0300
committerBrad King <brad.king@kitware.com>2016-07-18 09:51:01 -0400
commitb1f87a50b3aee129d420b8d789ebec55068e4ec5 (patch)
treee9223617c45d01c60a4c89c5d60dc0121a75a989 /Source/cmCTest.cxx
parent03407040d4d7d89fbb45e941a9dfb4257003a8a8 (diff)
downloadcmake-b1f87a50b3aee129d420b8d789ebec55068e4ec5.tar.gz
Use better KWSys SystemTools::GetEnv and HasEnv signatures
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 3bb997aa8e..01010497bf 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -298,9 +298,10 @@ cmCTest::cmCTest()
this->ComputedCompressMemCheckOutput = false;
this->RepeatTests = 1; // default to run each test once
this->RepeatUntilFail = false;
- if (const char* outOnFail =
- cmSystemTools::GetEnv("CTEST_OUTPUT_ON_FAILURE")) {
- this->OutputTestOutputOnTestFailure = !cmSystemTools::IsOff(outOnFail);
+ std::string outOnFail;
+ if (cmSystemTools::GetEnv("CTEST_OUTPUT_ON_FAILURE", outOnFail)) {
+ this->OutputTestOutputOnTestFailure =
+ !cmSystemTools::IsOff(outOnFail.c_str());
}
this->InitStreams();
@@ -2091,8 +2092,9 @@ int cmCTest::Run(std::vector<std::string>& args, std::string* output)
// handle CTEST_PARALLEL_LEVEL environment variable
if (!this->ParallelLevelSetInCli) {
- if (const char* parallel = cmSystemTools::GetEnv("CTEST_PARALLEL_LEVEL")) {
- int plevel = atoi(parallel);
+ std::string parallel;
+ if (cmSystemTools::GetEnv("CTEST_PARALLEL_LEVEL", parallel)) {
+ int plevel = atoi(parallel.c_str());
this->SetParallelLevel(plevel);
}
}