summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestMultiProcessHandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestMultiProcessHandler.cxx')
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index ae97d32..a4e0b95 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -261,12 +261,14 @@ void cmCTestMultiProcessHandler::StartNextTests()
allTestsFailedTestLoadCheck = true;
// Check for a fake load average value used in testing.
- if (const char* fake_load_value =
- cmSystemTools::GetEnv("__CTEST_FAKE_LOAD_AVERAGE_FOR_TESTING")) {
+ std::string fake_load_value;
+ if (cmSystemTools::GetEnv("__CTEST_FAKE_LOAD_AVERAGE_FOR_TESTING",
+ fake_load_value)) {
usedFakeLoadForTesting = true;
- if (!cmSystemTools::StringToULong(fake_load_value, &systemLoad)) {
+ if (!cmSystemTools::StringToULong(fake_load_value.c_str(),
+ &systemLoad)) {
cmSystemTools::Error("Failed to parse fake load value: ",
- fake_load_value);
+ fake_load_value.c_str());
}
}
// If it's not set, look up the true load average.