summaryrefslogtreecommitdiff
path: root/Source/CTest/cmCTestBuildCommand.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-07-27 11:00:00 -0400
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-07-27 10:58:39 -0400
commit825b04c67ac7ff3f759fd474e9a16b3b6076d591 (patch)
tree5b212042a645c3dba30c725b91137ebd870ce59c /Source/CTest/cmCTestBuildCommand.cxx
parent7788494257e0a1a22468b5542f9d8c5cb8c3dfed (diff)
downloadcmake-825b04c67ac7ff3f759fd474e9a16b3b6076d591.tar.gz
cmCTest: Members accept std::string parameters
Diffstat (limited to 'Source/CTest/cmCTestBuildCommand.cxx')
-rw-r--r--Source/CTest/cmCTestBuildCommand.cxx21
1 files changed, 10 insertions, 11 deletions
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index 44fdc29452..f33bdc45ae 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -12,6 +12,7 @@
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
+#include "cmProperty.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmake.h"
@@ -38,10 +39,9 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
this->Handler = handler;
- const char* ctestBuildCommand =
- this->Makefile->GetDefinition("CTEST_BUILD_COMMAND");
- if (ctestBuildCommand && *ctestBuildCommand) {
- this->CTest->SetCTestConfiguration("MakeCommand", ctestBuildCommand,
+ cmProp ctestBuildCommand = this->Makefile->GetDef("CTEST_BUILD_COMMAND");
+ if (cmNonempty(ctestBuildCommand)) {
+ this->CTest->SetCTestConfiguration("MakeCommand", *ctestBuildCommand,
this->Quiet);
} else {
const char* cmakeGeneratorName =
@@ -108,7 +108,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"SetMakeCommand:" << buildCommand << "\n",
this->Quiet);
- this->CTest->SetCTestConfiguration("MakeCommand", buildCommand.c_str(),
+ this->CTest->SetCTestConfiguration("MakeCommand", buildCommand,
this->Quiet);
} else {
std::ostringstream ostr;
@@ -123,16 +123,15 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
}
}
- if (const char* useLaunchers =
- this->Makefile->GetDefinition("CTEST_USE_LAUNCHERS")) {
- this->CTest->SetCTestConfiguration("UseLaunchers", useLaunchers,
+ if (cmProp useLaunchers = this->Makefile->GetDef("CTEST_USE_LAUNCHERS")) {
+ this->CTest->SetCTestConfiguration("UseLaunchers", *useLaunchers,
this->Quiet);
}
- if (const char* labelsForSubprojects =
- this->Makefile->GetDefinition("CTEST_LABELS_FOR_SUBPROJECTS")) {
+ if (cmProp labelsForSubprojects =
+ this->Makefile->GetDef("CTEST_LABELS_FOR_SUBPROJECTS")) {
this->CTest->SetCTestConfiguration("LabelsForSubprojects",
- labelsForSubprojects, this->Quiet);
+ *labelsForSubprojects, this->Quiet);
}
handler->SetQuiet(this->Quiet);