summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-11-06 23:34:58 (GMT)
committerBrad King <brad.king@kitware.com>2023-11-07 14:13:25 (GMT)
commit85627a93c92afb628e2eb22f380966b9a0f45a8f (patch)
treecedda7359ade798b4d097a25d05143f16c43f846
parent641c02a3ce5bb693ca6a9bd125dbefe4906fd9e5 (diff)
downloadCMake-85627a93c92afb628e2eb22f380966b9a0f45a8f.zip
CMake-85627a93c92afb628e2eb22f380966b9a0f45a8f.tar.gz
CMake-85627a93c92afb628e2eb22f380966b9a0f45a8f.tar.bz2
cmCTestBuildCommand: Avoid requiring complete cmGlobalGenerator type publicly
-rw-r--r--Source/CTest/cmCTestBuildCommand.cxx10
-rw-r--r--Source/CTest/cmCTestBuildCommand.h11
2 files changed, 12 insertions, 9 deletions
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index 50d69df..d8ef195 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -3,11 +3,13 @@
#include "cmCTestBuildCommand.h"
#include <sstream>
+#include <utility>
#include <cmext/string_view>
#include "cmCTest.h"
#include "cmCTestBuildHandler.h"
+#include "cmCommand.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
@@ -18,6 +20,14 @@
class cmExecutionStatus;
+std::unique_ptr<cmCommand> cmCTestBuildCommand::Clone()
+{
+ auto ni = cm::make_unique<cmCTestBuildCommand>();
+ ni->CTest = this->CTest;
+ ni->CTestScriptHandler = this->CTestScriptHandler;
+ return std::unique_ptr<cmCommand>(std::move(ni));
+}
+
void cmCTestBuildCommand::BindArguments()
{
this->cmCTestHandlerCommand::BindArguments();
diff --git a/Source/CTest/cmCTestBuildCommand.h b/Source/CTest/cmCTestBuildCommand.h
index 1254dad..3b7f4f9 100644
--- a/Source/CTest/cmCTestBuildCommand.h
+++ b/Source/CTest/cmCTestBuildCommand.h
@@ -5,14 +5,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
#include <string>
-#include <utility>
#include <vector>
#include <cm/memory>
#include "cmCTestHandlerCommand.h"
-#include "cmCommand.h"
+class cmCommand;
class cmCTestBuildHandler;
class cmCTestGenericHandler;
class cmExecutionStatus;
@@ -31,13 +30,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
- std::unique_ptr<cmCommand> Clone() override
- {
- auto ni = cm::make_unique<cmCTestBuildCommand>();
- ni->CTest = this->CTest;
- ni->CTestScriptHandler = this->CTestScriptHandler;
- return std::unique_ptr<cmCommand>(std::move(ni));
- }
+ std::unique_ptr<cmCommand> Clone() override;
/**
* The name of the command as specified in CMakeList.txt.