diff --git a/Source/CPack/cmCPackExternalGenerator.cxx b/Source/CPack/cmCPackExternalGenerator.cxx index 9dc9853318..b4c7a5afd1 100644 --- a/Source/CPack/cmCPackExternalGenerator.cxx +++ b/Source/CPack/cmCPackExternalGenerator.cxx @@ -2,7 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackExternalGenerator.h" -#include "cmAlgorithms.h" #include "cmCPackComponentGroup.h" #include "cmCPackLog.h" #include "cmMakefile.h" @@ -17,6 +16,8 @@ #include #include +#include "cm_memory.hxx" + int cmCPackExternalGenerator::InitializeInternal() { this->SetOption("CPACK_EXTERNAL_KNOWN_VERSIONS", "1.0"); diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index b865cabe21..f9ac1eb499 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -11,7 +11,6 @@ #include "cmsys/RegularExpression.hxx" #include -#include #include #include #include @@ -20,6 +19,8 @@ #include #include +#include "cm_memory.hxx" + cmCTestRunTest::cmCTestRunTest(cmCTestMultiProcessHandler& multiHandler) : MultiTestHandler(multiHandler) { diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx index fb97e9b3f4..d80b5a5a06 100644 --- a/Source/CTest/cmCTestUpdateHandler.cxx +++ b/Source/CTest/cmCTestUpdateHandler.cxx @@ -2,7 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestUpdateHandler.h" -#include "cmAlgorithms.h" #include "cmCLocaleEnvironmentScope.h" #include "cmCTest.h" #include "cmCTestBZR.h" @@ -18,9 +17,10 @@ #include "cmXMLWriter.h" #include -#include #include +#include "cm_memory.hxx" + static const char* cmCTestUpdateHandlerUpdateStrings[] = { "Unknown", "CVS", "SVN", "BZR", "GIT", "HG", "P4" }; diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index d1e32b0d4d..d1530769f9 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -340,20 +339,6 @@ inline void cmStripSuffixIfExists(std::string& str, const std::string& suffix) namespace cm { -#if defined(CMake_HAVE_CXX_MAKE_UNIQUE) - -using std::make_unique; - -#else - -template -std::unique_ptr make_unique(Args&&... args) -{ - return std::unique_ptr(new T(std::forward(args)...)); -} - -#endif - #if __cplusplus >= 201703L || defined(_MSVC_LANG) && _MSVC_LANG >= 201703L using std::size; diff --git a/Source/cmBinUtilsLinuxELFLinker.cxx b/Source/cmBinUtilsLinuxELFLinker.cxx index 4fb15f2f9f..86846cbb44 100644 --- a/Source/cmBinUtilsLinuxELFLinker.cxx +++ b/Source/cmBinUtilsLinuxELFLinker.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmBinUtilsLinuxELFLinker.h" -#include "cmAlgorithms.h" + #include "cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.h" #include "cmLDConfigLDConfigTool.h" #include "cmMakefile.h" @@ -12,9 +12,10 @@ #include -#include #include +#include "cm_memory.hxx" + static std::string ReplaceOrigin(const std::string& rpath, const std::string& origin) { diff --git a/Source/cmBinUtilsMacOSMachOLinker.cxx b/Source/cmBinUtilsMacOSMachOLinker.cxx index e219847518..ac93155356 100644 --- a/Source/cmBinUtilsMacOSMachOLinker.cxx +++ b/Source/cmBinUtilsMacOSMachOLinker.cxx @@ -12,6 +12,8 @@ #include #include +#include "cm_memory.hxx" + cmBinUtilsMacOSMachOLinker::cmBinUtilsMacOSMachOLinker( cmRuntimeDependencyArchive* archive) : cmBinUtilsLinker(archive) diff --git a/Source/cmBinUtilsWindowsPELinker.cxx b/Source/cmBinUtilsWindowsPELinker.cxx index 796e9ed457..31602c4873 100644 --- a/Source/cmBinUtilsWindowsPELinker.cxx +++ b/Source/cmBinUtilsWindowsPELinker.cxx @@ -2,16 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmBinUtilsWindowsPELinker.h" -#include "cmAlgorithms.h" + #include "cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.h" #include "cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.h" #include "cmRuntimeDependencyArchive.h" #include "cmSystemTools.h" -#include #include #include +#include "cm_memory.hxx" + #ifdef _WIN32 # include #endif diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index afdc039ff4..83e3eff9a8 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -30,6 +29,8 @@ # include // IWYU pragma: keep #endif +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmCTestBuildAndTestHandler.h" #include "cmCTestBuildHandler.h" diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index a7618c7c77..54fc54cbac 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -23,6 +23,8 @@ #include #include +#include "cm_memory.hxx" + /* This file computes an ordered list of link items to use when linking a diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx index 4310eed340..5e919afe9e 100644 --- a/Source/cmCryptoHash.cxx +++ b/Source/cmCryptoHash.cxx @@ -2,13 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCryptoHash.h" -#include "cmAlgorithms.h" #include "cm_kwiml.h" #include "cm_rhash.h" #include "cmsys/FStream.hxx" + #include -#include +#include "cm_memory.hxx" static unsigned int const cmCryptoHashAlgoToId[] = { /* clang-format needs this comment to break after the opening brace */ diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index e1c098d76b..29afc9f6ee 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -20,11 +20,12 @@ #include "cmsys/FStream.hxx" #include -#include #include #include #include +#include "cm_memory.hxx" + static std::string cmExportFileGeneratorEscape(std::string const& str) { // Escape a property value for writing into a .cmake file. diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index 2e86533541..87ef2a97c4 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -4,10 +4,10 @@ #include "cmsys/FStream.hxx" #include -#include #include -#include "cmAlgorithms.h" +#include "cm_memory.hxx" + #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index dfba910ee3..9871f496d4 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -21,6 +20,8 @@ #include #include +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmArgumentParser.h" #include "cmCryptoHash.h" diff --git a/Source/cmFileTimes.cxx b/Source/cmFileTimes.cxx index fd4f6797fe..3824e9b023 100644 --- a/Source/cmFileTimes.cxx +++ b/Source/cmFileTimes.cxx @@ -2,11 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFileTimes.h" -#include "cmAlgorithms.h" #include "cm_sys_stat.h" #include +#include "cm_memory.hxx" + #if defined(_WIN32) # include "cmSystemTools.h" # include diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 783b5f64d5..85546bff4c 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -13,12 +13,13 @@ #include #include #include -#include #include #include #include #include +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmMakefile.h" #include "cmMessageType.h" diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 7f189d69f5..94c1b1abfe 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -2,12 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmForEachCommand.h" -#include #include #include #include -#include "cmAlgorithms.h" +#include "cm_memory.hxx" + #include "cmExecutionStatus.h" #include "cmMakefile.h" #include "cmMessageType.h" diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 98e8339186..69a7da927d 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -9,10 +9,11 @@ #include #include #include -#include #include #include +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmDocumentationEntry.h" #include "cmFortranParser.h" diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 93f54821f6..35af0e103e 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -4,10 +4,11 @@ #include #include -#include #include #include +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 78e8f3067d..d99a9063e5 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -5,11 +5,12 @@ #include "cmsys/RegularExpression.hxx" #include #include -#include #include #include #include +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmComputeLinkInformation.h" #include "cmCustomCommand.h" diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index e9a4a6f517..a2e665fa18 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -16,6 +15,8 @@ #include #include +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmGeneratorExpression.h" #include "cmMakefile.h" diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 1b4f428189..1ec1fd9b8b 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -5,11 +5,12 @@ #include "cmsys/FStream.hxx" #include "cmsys/Terminal.h" #include -#include #include #include #include +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmCustomCommand.h" // IWYU pragma: keep #include "cmCustomCommandGenerator.h" diff --git a/Source/cmMachO.cxx b/Source/cmMachO.cxx index ac6dce9a4f..bec3ad839c 100644 --- a/Source/cmMachO.cxx +++ b/Source/cmMachO.cxx @@ -4,10 +4,13 @@ #include "cmAlgorithms.h" #include "cmsys/FStream.hxx" + #include #include #include +#include "cm_memory.hxx" + // Include the Mach-O format information system header. #include #include diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 2001c1f29b..dcee47ebdf 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -2,13 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileExecutableTargetGenerator.h" -#include #include #include #include #include #include +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index e5aed01368..bdde4b88f0 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -2,13 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileLibraryTargetGenerator.h" -#include #include #include #include #include #include +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index 70d9fca529..8ed6be5b56 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -2,13 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileUtilityTargetGenerator.h" -#include #include #include #include #include -#include "cmAlgorithms.h" +#include "cm_memory.hxx" + #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalUnixMakefileGenerator3.h" diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index d1af9e6716..88040f8ea1 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -6,11 +6,12 @@ #include #include #include -#include #include #include #include +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmCustomCommand.h" // IWYU pragma: keep #include "cmCustomCommandGenerator.h" diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 57e500ea5f..de79817081 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -8,10 +8,11 @@ #include #include #include -#include #include #include +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmComputeLinkInformation.h" #include "cmCustomCommandGenerator.h" diff --git a/Source/cmQtAutoGenGlobalInitializer.cxx b/Source/cmQtAutoGenGlobalInitializer.cxx index ef8a56b3bc..f172b77a33 100644 --- a/Source/cmQtAutoGenGlobalInitializer.cxx +++ b/Source/cmQtAutoGenGlobalInitializer.cxx @@ -4,7 +4,6 @@ #include "cmQtAutoGen.h" #include "cmQtAutoGenInitializer.h" -#include "cmAlgorithms.h" #include "cmCustomCommandLines.h" #include "cmDuration.h" #include "cmGeneratorTarget.h" @@ -17,9 +16,10 @@ #include "cmSystemTools.h" #include "cmTarget.h" -#include #include +#include "cm_memory.hxx" + cmQtAutoGenGlobalInitializer::Keywords::Keywords() : AUTOMOC("AUTOMOC") , AUTOUIC("AUTOUIC") diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index 83a1bc40c0..4b12419fbf 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -38,6 +38,8 @@ #include #include +#include "cm_memory.hxx" + static std::size_t GetParallelCPUCount() { static std::size_t count = 0; diff --git a/Source/cmQtAutoGenerator.cxx b/Source/cmQtAutoGenerator.cxx index 3a3162daf0..2516d84a61 100644 --- a/Source/cmQtAutoGenerator.cxx +++ b/Source/cmQtAutoGenerator.cxx @@ -5,7 +5,8 @@ #include "cmsys/FStream.hxx" -#include "cmAlgorithms.h" +#include "cm_memory.hxx" + #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmState.h" @@ -14,8 +15,6 @@ #include "cmSystemTools.h" #include "cmake.h" -#include - cmQtAutoGenerator::Logger::Logger() { // Initialize logger diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index 889f47db1b..44d2db0d91 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/Source/cmQtAutoMocUic.cxx @@ -5,11 +5,12 @@ #include #include #include -#include #include #include #include +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmCryptoHash.h" #include "cmGeneratedFileStream.h" diff --git a/Source/cmRuntimeDependencyArchive.cxx b/Source/cmRuntimeDependencyArchive.cxx index a1d1f95c3e..45aff694a6 100644 --- a/Source/cmRuntimeDependencyArchive.cxx +++ b/Source/cmRuntimeDependencyArchive.cxx @@ -3,7 +3,6 @@ #include "cmRuntimeDependencyArchive.h" -#include "cmAlgorithms.h" #include "cmBinUtilsLinuxELFLinker.h" #include "cmBinUtilsMacOSMachOLinker.h" #include "cmBinUtilsWindowsPELinker.h" @@ -27,6 +26,8 @@ #include #include +#include "cm_memory.hxx" + #if defined(_WIN32) static void AddVisualStudioPath(std::vector& paths, const std::string& prefix, diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx index 1903fd917d..9df1883cc6 100644 --- a/Source/cmServer.cxx +++ b/Source/cmServer.cxx @@ -2,7 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmServer.h" -#include "cmAlgorithms.h" #include "cmConnection.h" #include "cmFileMonitor.h" #include "cmJsonObjectDictionary.h" @@ -18,10 +17,11 @@ #include #include #include -#include #include #include +#include "cm_memory.hxx" + void on_signal(uv_signal_t* signal, int signum) { auto conn = static_cast(signal->data); diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 558391f308..c5de7428d4 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -2,7 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmServerProtocol.h" -#include "cmAlgorithms.h" #include "cmExternalMakefileProjectGenerator.h" #include "cmFileMonitor.h" #include "cmGlobalGenerator.h" @@ -19,11 +18,12 @@ #include #include #include -#include #include #include #include +#include "cm_memory.hxx" + // Get rid of some windows macros: #undef max diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 587cda502e..878d5b6d8c 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -8,6 +8,8 @@ #include #include +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmCacheManager.h" #include "cmCommand.h" diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index b10b30feaa..28d8c644c2 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -12,6 +12,8 @@ #include #include +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmCustomCommand.h" #include "cmGeneratorExpression.h" diff --git a/Source/cmUVProcessChain.cxx b/Source/cmUVProcessChain.cxx index 90ece0bc50..fbd56340f8 100644 --- a/Source/cmUVProcessChain.cxx +++ b/Source/cmUVProcessChain.cxx @@ -11,9 +11,10 @@ #include #include -#include #include +#include "cm_memory.hxx" + struct cmUVProcessChain::InternalData { struct BasicStreamData diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index e2a4816348..ae347fe508 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -19,9 +19,10 @@ #include "windows.h" #include -#include #include +#include "cm_memory.hxx" + static void ConvertToWindowsSlash(std::string& s); static std::string cmVS10EscapeXML(std::string arg) diff --git a/Source/cmWorkerPool.cxx b/Source/cmWorkerPool.cxx index cbf070e91c..974100b081 100644 --- a/Source/cmWorkerPool.cxx +++ b/Source/cmWorkerPool.cxx @@ -16,6 +16,8 @@ #include #include +#include "cm_memory.hxx" + /** * @brief libuv pipe buffer class */ diff --git a/Source/cmWorkerPool.h b/Source/cmWorkerPool.h index 5cc308bca8..d708118fb7 100644 --- a/Source/cmWorkerPool.h +++ b/Source/cmWorkerPool.h @@ -5,14 +5,13 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include "cmAlgorithms.h" // IWYU pragma: keep - -#include #include #include #include #include +#include "cm_memory.hxx" + // -- Types class cmWorkerPoolInternal; diff --git a/Source/cm_memory.hxx b/Source/cm_memory.hxx new file mode 100644 index 0000000000..9f5e67827b --- /dev/null +++ b/Source/cm_memory.hxx @@ -0,0 +1,31 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef cm_memory_hxx +#define cm_memory_hxx + +#include "cmConfigure.h" // IWYU pragma: keep + +#include // IWYU pragma: export +#if !defined(CMake_HAVE_CXX_MAKE_UNIQUE) +# include +#endif + +namespace cm { + +#if defined(CMake_HAVE_CXX_MAKE_UNIQUE) + +using std::make_unique; + +#else + +template +std::unique_ptr make_unique(Args&&... args) +{ + return std::unique_ptr(new T(std::forward(args)...)); +} + +#endif + +} // namespace cm + +#endif diff --git a/Source/cmake.cxx b/Source/cmake.cxx index b8238a2e8c..7250e5107e 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmake.h" +#include "cm_memory.hxx" + #include "cmAlgorithms.h" #include "cmCommands.h" #include "cmDocumentation.h" @@ -104,7 +106,6 @@ #include #include #include -#include #include #include #include diff --git a/Tests/CMakeLib/testUVProcessChain.cxx b/Tests/CMakeLib/testUVProcessChain.cxx index e926350495..2c1202ec3c 100644 --- a/Tests/CMakeLib/testUVProcessChain.cxx +++ b/Tests/CMakeLib/testUVProcessChain.cxx @@ -1,6 +1,5 @@ #include "cmUVProcessChain.h" -#include "cmAlgorithms.h" #include "cmGetPipes.h" #include "cmUVHandlePtr.h" #include "cmUVStreambuf.h" @@ -17,6 +16,8 @@ #include +#include "cm_memory.hxx" + struct ExpectedStatus { bool Finished; diff --git a/Utilities/IWYU/mapping.imp b/Utilities/IWYU/mapping.imp index 4e00214f91..9fff4427e5 100644 --- a/Utilities/IWYU/mapping.imp +++ b/Utilities/IWYU/mapping.imp @@ -51,7 +51,9 @@ { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, { symbol: [ "std::allocator_traits > >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits, std::allocator > > >::value_type", private, "", public ] }, { symbol: [ "std::allocator_traits, std::allocator > > > >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits, std::allocator >, std::allocator, std::allocator > > > > >::value_type", private, "", public ] }, { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, # TODO: enable this block and remove some includes?