summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestBuildCommand.cxx
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-03-18 21:25:50 (GMT)
committerBrad King <brad.king@kitware.com>2019-03-20 15:39:14 (GMT)
commitb172a81d5512a2f0973dae6d5545b159e5b1ec2b (patch)
treeb035bb75e4ac6c2ad13663a2b8ba514cecc4ea5e /Source/CTest/cmCTestBuildCommand.cxx
parent46090c2337f9d867b8662247f0033f002742d42b (diff)
downloadCMake-b172a81d5512a2f0973dae6d5545b159e5b1ec2b.zip
CMake-b172a81d5512a2f0973dae6d5545b159e5b1ec2b.tar.gz
CMake-b172a81d5512a2f0973dae6d5545b159e5b1ec2b.tar.bz2
cmCTest: Use concrete accessor functions for TestingHandlers
Diffstat (limited to 'Source/CTest/cmCTestBuildCommand.cxx')
-rw-r--r--Source/CTest/cmCTestBuildCommand.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index 32f7496..2eacaf1 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -4,7 +4,6 @@
#include "cmCTest.h"
#include "cmCTestBuildHandler.h"
-#include "cmCTestGenericHandler.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
@@ -39,12 +38,10 @@ cmCTestBuildCommand::~cmCTestBuildCommand()
cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
{
- cmCTestGenericHandler* handler = this->CTest->GetInitializedHandler("build");
- if (!handler) {
- this->SetError("internal CTest error. Cannot instantiate build handler");
- return nullptr;
- }
- this->Handler = static_cast<cmCTestBuildHandler*>(handler);
+ cmCTestBuildHandler* handler = this->CTest->GetBuildHandler();
+ handler->Initialize();
+
+ this->Handler = handler;
const char* ctestBuildCommand =
this->Makefile->GetDefinition("CTEST_BUILD_COMMAND");