diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-07-27 15:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-07-27 14:58:39 (GMT) |
commit | 825b04c67ac7ff3f759fd474e9a16b3b6076d591 (patch) | |
tree | 5b212042a645c3dba30c725b91137ebd870ce59c /Source/CTest/cmCTestBuildCommand.cxx | |
parent | 7788494257e0a1a22468b5542f9d8c5cb8c3dfed (diff) | |
download | CMake-825b04c67ac7ff3f759fd474e9a16b3b6076d591.zip CMake-825b04c67ac7ff3f759fd474e9a16b3b6076d591.tar.gz CMake-825b04c67ac7ff3f759fd474e9a16b3b6076d591.tar.bz2 |
cmCTest: Members accept std::string parameters
Diffstat (limited to 'Source/CTest/cmCTestBuildCommand.cxx')
-rw-r--r-- | Source/CTest/cmCTestBuildCommand.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx index 44fdc29..f33bdc4 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); |