From b1f87a50b3aee129d420b8d789ebec55068e4ec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C4=81vis=20Mos=C4=81ns?= Date: Fri, 8 Jul 2016 00:54:05 +0300 Subject: Use better KWSys SystemTools::GetEnv and HasEnv signatures --- Source/cmCTest.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Source/cmCTest.cxx') 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& 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); } } -- cgit v1.2.1