diff options
author | Brad King <brad.king@kitware.com> | 2023-11-08 15:31:41 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-11-08 15:32:03 (GMT) |
commit | 56544c1874f449d76da5da66379b5f3af966482a (patch) | |
tree | 7f5dc98a750e49df82851fa4f45f0dc70911850a /Source | |
parent | 4f26c238a68619d2603f970375096a1eb64eae85 (diff) | |
parent | a0fabc47691a0bc76038c8fdf5f0e0a23ed954d0 (diff) | |
download | CMake-56544c1874f449d76da5da66379b5f3af966482a.zip CMake-56544c1874f449d76da5da66379b5f3af966482a.tar.gz CMake-56544c1874f449d76da5da66379b5f3af966482a.tar.bz2 |
Merge topic 'cxx23' into release-3.28
a0fabc4769 cmGlobalGeneratorFactory: Provide complete cmGlobalGenerator to deleter
85627a93c9 cmCTestBuildCommand: Avoid requiring complete cmGlobalGenerator type publicly
641c02a3ce cmList: Avoid using operator-> on input iterator
e4483b8871 Tests: Avoid compiling call to dap::optional<dap::string>(nullptr)
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8950
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestBuildCommand.cxx | 10 | ||||
-rw-r--r-- | Source/CTest/cmCTestBuildCommand.h | 11 | ||||
-rw-r--r-- | Source/cmGlobalGeneratorFactory.h | 2 | ||||
-rw-r--r-- | Source/cmList.h | 2 |
4 files changed, 14 insertions, 11 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. diff --git a/Source/cmGlobalGeneratorFactory.h b/Source/cmGlobalGeneratorFactory.h index a935079..b06da42 100644 --- a/Source/cmGlobalGeneratorFactory.h +++ b/Source/cmGlobalGeneratorFactory.h @@ -5,6 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include "cmDocumentationEntry.h" // IWYU pragma: export +#include "cmGlobalGenerator.h" // IWYU pragma: keep // TODO The following headers are parts of the `cmGlobalGeneratorFactory` // public API, so could be defined as export to IWYU @@ -13,7 +14,6 @@ #include <cm/memory> -class cmGlobalGenerator; class cmake; /** \class cmGlobalGeneratorFactory diff --git a/Source/cmList.h b/Source/cmList.h index 1b94c2f..c29aae7 100644 --- a/Source/cmList.h +++ b/Source/cmList.h @@ -1192,7 +1192,7 @@ private: } } else { for (; first != last; ++first) { - if (!first->empty() || emptyElements == EmptyElements::Yes) { + if (!(*first).empty() || emptyElements == EmptyElements::Yes) { insertPos = container.insert(insertPos, *first); ++insertPos; } |