diff options
Diffstat (limited to 'Source/CTest/cmCTestUpdateCommand.cxx')
-rw-r--r-- | Source/CTest/cmCTestUpdateCommand.cxx | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/Source/CTest/cmCTestUpdateCommand.cxx b/Source/CTest/cmCTestUpdateCommand.cxx index 8c037545f..673eb9ac1 100644 --- a/Source/CTest/cmCTestUpdateCommand.cxx +++ b/Source/CTest/cmCTestUpdateCommand.cxx @@ -3,18 +3,15 @@ #include "cmCTestUpdateCommand.h" #include "cmCTest.h" -#include "cmCTestGenericHandler.h" +#include "cmCTestUpdateHandler.h" #include "cmMakefile.h" #include "cmSystemTools.h" -#include <vector> - cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler() { - if (this->Values[ct_SOURCE]) { + if (!this->Source.empty()) { this->CTest->SetCTestConfiguration( - "SourceDirectory", - cmSystemTools::CollapseFullPath(this->Values[ct_SOURCE]).c_str(), + "SourceDirectory", cmSystemTools::CollapseFullPath(this->Source).c_str(), this->Quiet); } else { this->CTest->SetCTestConfiguration( @@ -62,6 +59,9 @@ cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler() this->Makefile, "UpdateVersionOnly", "CTEST_UPDATE_VERSION_ONLY", this->Quiet); this->CTest->SetCTestConfigurationFromCMakeVariable( + this->Makefile, "UpdateVersionOverride", "CTEST_UPDATE_VERSION_OVERRIDE", + this->Quiet); + this->CTest->SetCTestConfigurationFromCMakeVariable( this->Makefile, "HGCommand", "CTEST_HG_COMMAND", this->Quiet); this->CTest->SetCTestConfigurationFromCMakeVariable( this->Makefile, "HGUpdateOptions", "CTEST_HG_UPDATE_OPTIONS", this->Quiet); @@ -74,16 +74,12 @@ cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler() this->CTest->SetCTestConfigurationFromCMakeVariable( this->Makefile, "P4Options", "CTEST_P4_OPTIONS", this->Quiet); - cmCTestGenericHandler* handler = - this->CTest->GetInitializedHandler("update"); - if (!handler) { - this->SetError("internal CTest error. Cannot instantiate update handler"); - return CM_NULLPTR; - } + cmCTestUpdateHandler* handler = this->CTest->GetUpdateHandler(); + handler->Initialize(); handler->SetCommand(this); if (source_dir.empty()) { this->SetError("source directory not specified. Please use SOURCE tag"); - return CM_NULLPTR; + return nullptr; } handler->SetOption("SourceDirectory", source_dir.c_str()); handler->SetQuiet(this->Quiet); |