Просмотр исходного кода

Introduce memory management helper: cm_memory.hxx

Marc Chevrier 6 лет назад
Родитель
Сommit
d9b2c7dae2
44 измененных файлов с 118 добавлено и 63 удалено
  1. 2 1
      Source/CPack/cmCPackExternalGenerator.cxx
  2. 2 1
      Source/CTest/cmCTestRunTest.cxx
  3. 2 2
      Source/CTest/cmCTestUpdateHandler.cxx
  4. 0 15
      Source/cmAlgorithms.h
  5. 3 2
      Source/cmBinUtilsLinuxELFLinker.cxx
  6. 2 0
      Source/cmBinUtilsMacOSMachOLinker.cxx
  7. 3 2
      Source/cmBinUtilsWindowsPELinker.cxx
  8. 2 1
      Source/cmCTest.cxx
  9. 2 0
      Source/cmComputeLinkDepends.cxx
  10. 2 2
      Source/cmCryptoHash.cxx
  11. 2 1
      Source/cmExportFileGenerator.cxx
  12. 2 2
      Source/cmExportLibraryDependenciesCommand.cxx
  13. 2 1
      Source/cmFileCommand.cxx
  14. 2 1
      Source/cmFileTimes.cxx
  15. 2 1
      Source/cmFindPackageCommand.cxx
  16. 2 2
      Source/cmForEachCommand.cxx
  17. 2 1
      Source/cmGlobalNinjaGenerator.cxx
  18. 2 1
      Source/cmGlobalUnixMakefileGenerator3.cxx
  19. 2 1
      Source/cmGlobalXCodeGenerator.cxx
  20. 2 1
      Source/cmListCommand.cxx
  21. 2 1
      Source/cmLocalUnixMakefileGenerator3.cxx
  22. 3 0
      Source/cmMachO.cxx
  23. 2 1
      Source/cmMakefileExecutableTargetGenerator.cxx
  24. 2 1
      Source/cmMakefileLibraryTargetGenerator.cxx
  25. 2 2
      Source/cmMakefileUtilityTargetGenerator.cxx
  26. 2 1
      Source/cmNinjaNormalTargetGenerator.cxx
  27. 2 1
      Source/cmNinjaTargetGenerator.cxx
  28. 2 2
      Source/cmQtAutoGenGlobalInitializer.cxx
  29. 2 0
      Source/cmQtAutoGenInitializer.cxx
  30. 2 3
      Source/cmQtAutoGenerator.cxx
  31. 2 1
      Source/cmQtAutoMocUic.cxx
  32. 2 1
      Source/cmRuntimeDependencyArchive.cxx
  33. 2 2
      Source/cmServer.cxx
  34. 2 2
      Source/cmServerProtocol.cxx
  35. 2 0
      Source/cmState.cxx
  36. 2 0
      Source/cmTarget.cxx
  37. 2 1
      Source/cmUVProcessChain.cxx
  38. 2 1
      Source/cmVisualStudio10TargetGenerator.cxx
  39. 2 0
      Source/cmWorkerPool.cxx
  40. 2 3
      Source/cmWorkerPool.h
  41. 31 0
      Source/cm_memory.hxx
  42. 2 1
      Source/cmake.cxx
  43. 2 1
      Tests/CMakeLib/testUVProcessChain.cxx
  44. 2 0
      Utilities/IWYU/mapping.imp

+ 2 - 1
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 <utility>
 #include <vector>
 
+#include "cm_memory.hxx"
+
 int cmCPackExternalGenerator::InitializeInternal()
 {
   this->SetOption("CPACK_EXTERNAL_KNOWN_VERSIONS", "1.0");

+ 2 - 1
Source/CTest/cmCTestRunTest.cxx

@@ -11,7 +11,6 @@
 
 #include "cmsys/RegularExpression.hxx"
 #include <chrono>
-#include <cmAlgorithms.h>
 #include <cstdint>
 #include <cstring>
 #include <iomanip>
@@ -20,6 +19,8 @@
 #include <stdio.h>
 #include <utility>
 
+#include "cm_memory.hxx"
+
 cmCTestRunTest::cmCTestRunTest(cmCTestMultiProcessHandler& multiHandler)
   : MultiTestHandler(multiHandler)
 {

+ 2 - 2
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 <chrono>
-#include <memory>
 #include <sstream>
 
+#include "cm_memory.hxx"
+
 static const char* cmCTestUpdateHandlerUpdateStrings[] = {
   "Unknown", "CVS", "SVN", "BZR", "GIT", "HG", "P4"
 };

+ 0 - 15
Source/cmAlgorithms.h

@@ -11,7 +11,6 @@
 #include <algorithm>
 #include <functional>
 #include <iterator>
-#include <memory>
 #include <sstream>
 #include <string.h>
 #include <string>
@@ -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 <typename T, typename... Args>
-std::unique_ptr<T> make_unique(Args&&... args)
-{
-  return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
-}
-
-#endif
-
 #if __cplusplus >= 201703L || defined(_MSVC_LANG) && _MSVC_LANG >= 201703L
 
 using std::size;

+ 3 - 2
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 <cmsys/RegularExpression.hxx>
 
-#include <memory>
 #include <sstream>
 
+#include "cm_memory.hxx"
+
 static std::string ReplaceOrigin(const std::string& rpath,
                                  const std::string& origin)
 {

+ 2 - 0
Source/cmBinUtilsMacOSMachOLinker.cxx

@@ -12,6 +12,8 @@
 #include <string>
 #include <vector>
 
+#include "cm_memory.hxx"
+
 cmBinUtilsMacOSMachOLinker::cmBinUtilsMacOSMachOLinker(
   cmRuntimeDependencyArchive* archive)
   : cmBinUtilsLinker(archive)

+ 3 - 2
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 <memory>
 #include <sstream>
 #include <vector>
 
+#include "cm_memory.hxx"
+
 #ifdef _WIN32
 #  include <windows.h>
 #endif

+ 2 - 1
Source/cmCTest.cxx

@@ -15,7 +15,6 @@
 #include <ctype.h>
 #include <iostream>
 #include <map>
-#include <memory>
 #include <sstream>
 #include <stdio.h>
 #include <stdlib.h>
@@ -30,6 +29,8 @@
 #  include <unistd.h> // IWYU pragma: keep
 #endif
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmCTestBuildAndTestHandler.h"
 #include "cmCTestBuildHandler.h"

+ 2 - 0
Source/cmComputeLinkDepends.cxx

@@ -23,6 +23,8 @@
 #include <string.h>
 #include <utility>
 
+#include "cm_memory.hxx"
+
 /*
 
 This file computes an ordered list of link items to use when linking a

+ 2 - 2
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 <string.h>
 
-#include <memory>
+#include "cm_memory.hxx"
 
 static unsigned int const cmCryptoHashAlgoToId[] = {
   /* clang-format needs this comment to break after the opening brace */

+ 2 - 1
Source/cmExportFileGenerator.cxx

@@ -20,11 +20,12 @@
 
 #include "cmsys/FStream.hxx"
 #include <assert.h>
-#include <memory>
 #include <sstream>
 #include <string.h>
 #include <utility>
 
+#include "cm_memory.hxx"
+
 static std::string cmExportFileGeneratorEscape(std::string const& str)
 {
   // Escape a property value for writing into a .cmake file.

+ 2 - 2
Source/cmExportLibraryDependenciesCommand.cxx

@@ -4,10 +4,10 @@
 
 #include "cmsys/FStream.hxx"
 #include <map>
-#include <memory>
 #include <utility>
 
-#include "cmAlgorithms.h"
+#include "cm_memory.hxx"
+
 #include "cmGeneratedFileStream.h"
 #include "cmGlobalGenerator.h"
 #include "cmMakefile.h"

+ 2 - 1
Source/cmFileCommand.cxx

@@ -13,7 +13,6 @@
 #include <cmath>
 #include <ctype.h>
 #include <map>
-#include <memory>
 #include <set>
 #include <sstream>
 #include <stdio.h>
@@ -21,6 +20,8 @@
 #include <utility>
 #include <vector>
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmArgumentParser.h"
 #include "cmCryptoHash.h"

+ 2 - 1
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 <utility>
 
+#include "cm_memory.hxx"
+
 #if defined(_WIN32)
 #  include "cmSystemTools.h"
 #  include <windows.h>

+ 2 - 1
Source/cmFindPackageCommand.cxx

@@ -13,12 +13,13 @@
 #include <deque>
 #include <functional>
 #include <iterator>
-#include <memory>
 #include <sstream>
 #include <stdio.h>
 #include <string.h>
 #include <utility>
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmMakefile.h"
 #include "cmMessageType.h"

+ 2 - 2
Source/cmForEachCommand.cxx

@@ -2,12 +2,12 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmForEachCommand.h"
 
-#include <memory>
 #include <sstream>
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "cmAlgorithms.h"
+#include "cm_memory.hxx"
+
 #include "cmExecutionStatus.h"
 #include "cmMakefile.h"
 #include "cmMessageType.h"

+ 2 - 1
Source/cmGlobalNinjaGenerator.cxx

@@ -9,10 +9,11 @@
 #include <algorithm>
 #include <ctype.h>
 #include <iterator>
-#include <memory>
 #include <sstream>
 #include <stdio.h>
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmDocumentationEntry.h"
 #include "cmFortranParser.h"

+ 2 - 1
Source/cmGlobalUnixMakefileGenerator3.cxx

@@ -4,10 +4,11 @@
 
 #include <algorithm>
 #include <functional>
-#include <memory>
 #include <sstream>
 #include <utility>
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmDocumentationEntry.h"
 #include "cmGeneratedFileStream.h"

+ 2 - 1
Source/cmGlobalXCodeGenerator.cxx

@@ -5,11 +5,12 @@
 #include "cmsys/RegularExpression.hxx"
 #include <assert.h>
 #include <iomanip>
-#include <memory>
 #include <sstream>
 #include <stdio.h>
 #include <string.h>
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmComputeLinkInformation.h"
 #include "cmCustomCommand.h"

+ 2 - 1
Source/cmListCommand.cxx

@@ -7,7 +7,6 @@
 #include <assert.h>
 #include <functional>
 #include <iterator>
-#include <memory>
 #include <set>
 #include <sstream>
 #include <stdexcept>
@@ -16,6 +15,8 @@
 #include <utility>
 #include <vector>
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmGeneratorExpression.h"
 #include "cmMakefile.h"

+ 2 - 1
Source/cmLocalUnixMakefileGenerator3.cxx

@@ -5,11 +5,12 @@
 #include "cmsys/FStream.hxx"
 #include "cmsys/Terminal.h"
 #include <algorithm>
-#include <memory>
 #include <sstream>
 #include <stdio.h>
 #include <utility>
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmCustomCommand.h" // IWYU pragma: keep
 #include "cmCustomCommandGenerator.h"

+ 3 - 0
Source/cmMachO.cxx

@@ -4,10 +4,13 @@
 
 #include "cmAlgorithms.h"
 #include "cmsys/FStream.hxx"
+
 #include <cstddef>
 #include <string>
 #include <vector>
 
+#include "cm_memory.hxx"
+
 // Include the Mach-O format information system header.
 #include <mach-o/fat.h>
 #include <mach-o/loader.h>

+ 2 - 1
Source/cmMakefileExecutableTargetGenerator.cxx

@@ -2,13 +2,14 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmMakefileExecutableTargetGenerator.h"
 
-#include <memory>
 #include <set>
 #include <sstream>
 #include <string>
 #include <utility>
 #include <vector>
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmGeneratedFileStream.h"
 #include "cmGeneratorTarget.h"

+ 2 - 1
Source/cmMakefileLibraryTargetGenerator.cxx

@@ -2,13 +2,14 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmMakefileLibraryTargetGenerator.h"
 
-#include <memory>
 #include <set>
 #include <sstream>
 #include <stddef.h>
 #include <utility>
 #include <vector>
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmGeneratedFileStream.h"
 #include "cmGeneratorTarget.h"

+ 2 - 2
Source/cmMakefileUtilityTargetGenerator.cxx

@@ -2,13 +2,13 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmMakefileUtilityTargetGenerator.h"
 
-#include <memory>
 #include <ostream>
 #include <string>
 #include <utility>
 #include <vector>
 
-#include "cmAlgorithms.h"
+#include "cm_memory.hxx"
+
 #include "cmGeneratedFileStream.h"
 #include "cmGeneratorTarget.h"
 #include "cmGlobalUnixMakefileGenerator3.h"

+ 2 - 1
Source/cmNinjaNormalTargetGenerator.cxx

@@ -6,11 +6,12 @@
 #include <assert.h>
 #include <iterator>
 #include <map>
-#include <memory>
 #include <set>
 #include <sstream>
 #include <utility>
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmCustomCommand.h" // IWYU pragma: keep
 #include "cmCustomCommandGenerator.h"

+ 2 - 1
Source/cmNinjaTargetGenerator.cxx

@@ -8,10 +8,11 @@
 #include <assert.h>
 #include <iterator>
 #include <map>
-#include <memory>
 #include <ostream>
 #include <utility>
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmComputeLinkInformation.h"
 #include "cmCustomCommandGenerator.h"

+ 2 - 2
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 <memory>
 #include <utility>
 
+#include "cm_memory.hxx"
+
 cmQtAutoGenGlobalInitializer::Keywords::Keywords()
   : AUTOMOC("AUTOMOC")
   , AUTOUIC("AUTOUIC")

+ 2 - 0
Source/cmQtAutoGenInitializer.cxx

@@ -38,6 +38,8 @@
 #include <utility>
 #include <vector>
 
+#include "cm_memory.hxx"
+
 static std::size_t GetParallelCPUCount()
 {
   static std::size_t count = 0;

+ 2 - 3
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 <memory>
-
 cmQtAutoGenerator::Logger::Logger()
 {
   // Initialize logger

+ 2 - 1
Source/cmQtAutoMocUic.cxx

@@ -5,11 +5,12 @@
 #include <algorithm>
 #include <array>
 #include <list>
-#include <memory>
 #include <set>
 #include <sstream>
 #include <utility>
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmCryptoHash.h"
 #include "cmGeneratedFileStream.h"

+ 2 - 1
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 <utility>
 #include <vector>
 
+#include "cm_memory.hxx"
+
 #if defined(_WIN32)
 static void AddVisualStudioPath(std::vector<std::string>& paths,
                                 const std::string& prefix,

+ 2 - 2
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 <cassert>
 #include <cstdint>
 #include <iostream>
-#include <memory>
 #include <mutex>
 #include <utility>
 
+#include "cm_memory.hxx"
+
 void on_signal(uv_signal_t* signal, int signum)
 {
   auto conn = static_cast<cmServerBase*>(signal->data);

+ 2 - 2
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 <algorithm>
 #include <cassert>
 #include <functional>
-#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
 
+#include "cm_memory.hxx"
+
 // Get rid of some windows macros:
 #undef max
 

+ 2 - 0
Source/cmState.cxx

@@ -8,6 +8,8 @@
 #include <string.h>
 #include <utility>
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmCacheManager.h"
 #include "cmCommand.h"

+ 2 - 0
Source/cmTarget.cxx

@@ -12,6 +12,8 @@
 #include <string.h>
 #include <unordered_set>
 
+#include "cm_memory.hxx"
+
 #include "cmAlgorithms.h"
 #include "cmCustomCommand.h"
 #include "cmGeneratorExpression.h"

+ 2 - 1
Source/cmUVProcessChain.cxx

@@ -11,9 +11,10 @@
 #include <assert.h>
 
 #include <iterator>
-#include <memory>
 #include <utility>
 
+#include "cm_memory.hxx"
+
 struct cmUVProcessChain::InternalData
 {
   struct BasicStreamData

+ 2 - 1
Source/cmVisualStudio10TargetGenerator.cxx

@@ -19,9 +19,10 @@
 #include "windows.h"
 
 #include <iterator>
-#include <memory>
 #include <set>
 
+#include "cm_memory.hxx"
+
 static void ConvertToWindowsSlash(std::string& s);
 
 static std::string cmVS10EscapeXML(std::string arg)

+ 2 - 0
Source/cmWorkerPool.cxx

@@ -16,6 +16,8 @@
 #include <stddef.h>
 #include <thread>
 
+#include "cm_memory.hxx"
+
 /**
  * @brief libuv pipe buffer class
  */

+ 2 - 3
Source/cmWorkerPool.h

@@ -5,14 +5,13 @@
 
 #include "cmConfigure.h" // IWYU pragma: keep
 
-#include "cmAlgorithms.h" // IWYU pragma: keep
-
-#include <memory>
 #include <stdint.h>
 #include <string>
 #include <utility>
 #include <vector>
 
+#include "cm_memory.hxx"
+
 // -- Types
 class cmWorkerPoolInternal;
 

+ 31 - 0
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 <memory> // IWYU pragma: export
+#if !defined(CMake_HAVE_CXX_MAKE_UNIQUE)
+#  include <utility>
+#endif
+
+namespace cm {
+
+#if defined(CMake_HAVE_CXX_MAKE_UNIQUE)
+
+using std::make_unique;
+
+#else
+
+template <typename T, typename... Args>
+std::unique_ptr<T> make_unique(Args&&... args)
+{
+  return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
+}
+
+#endif
+
+} // namespace cm
+
+#endif

+ 2 - 1
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 <cstring>
 #include <initializer_list>
 #include <iostream>
-#include <memory>
 #include <sstream>
 #include <stdio.h>
 #include <stdlib.h>

+ 2 - 1
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 <csignal>
 
+#include "cm_memory.hxx"
+
 struct ExpectedStatus
 {
   bool Finished;

+ 2 - 0
Utilities/IWYU/mapping.imp

@@ -51,7 +51,9 @@
   { symbol: [ "std::allocator_traits<std::allocator<cmOrderDirectories::ConflictList> >::value_type", private, "<vector>", public ] },
   { symbol: [ "std::allocator_traits<std::allocator<cmStateSnapshot> >::value_type", private, "<vector>", public ] },
   { symbol: [ "std::allocator_traits<std::allocator<std::basic_string<char> > >::value_type", private, "<vector>", public ] },
+  { symbol: [ "std::allocator_traits<std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::value_type", private, "<vector>", public ] },
   { symbol: [ "std::allocator_traits<std::allocator<std::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > > >::value_type", private, "<vector>", public ] },
+  { symbol: [ "std::allocator_traits<std::allocator<std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >::value_type", private, "<vector>", public ] },
   { symbol: [ "std::allocator_traits<std::allocator<uv_stdio_container_s> >::value_type", private, "<vector>", public ] },
 
   # TODO: enable this block and remove some <utility> includes?