diff options
88 files changed, 104 insertions, 69 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 7e07ff4..4a91698 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -7,7 +7,7 @@ #include "cmsys/RegularExpression.hxx" #include <algorithm> #include <cstring> -#include <memory> // IWYU pragma: keep +#include <memory> #include <utility> #include "cmCPackComponentGroup.h" diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 58b9e70..67b7ea6 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -5,7 +5,6 @@ #include "cmsys/Encoding.hxx" #include <iostream> #include <map> -#include <memory> // IWYU pragma: keep #include <sstream> #include <stddef.h> #include <string> diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index a96513e..237ca82 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -6,7 +6,6 @@ #include "cmsys/Process.h" #include "cmsys/RegularExpression.hxx" #include <iostream> -#include <memory> // IWYU pragma: keep #include <stdlib.h> #include <string.h> diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index ef63073..37a8abf 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -29,11 +29,13 @@ #include <iostream> #include <list> #include <math.h> +#include <memory> #include <sstream> #include <stack> #include <stdlib.h> #include <unordered_map> #include <utility> +#include <vector> namespace cmsys { class RegularExpression; diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h index 38cc417..43dfe8e 100644 --- a/Source/CTest/cmCTestRunTest.h +++ b/Source/CTest/cmCTestRunTest.h @@ -5,6 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include <memory> #include <set> #include <stddef.h> #include <string> @@ -12,7 +13,7 @@ #include "cmCTestTestHandler.h" #include "cmDuration.h" -#include "cmProcess.h" // IWYU pragma: keep (for unique_ptr) +#include "cmProcess.h" class cmCTest; class cmCTestMultiProcessHandler; diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 0ed56c8..46ef809 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -11,7 +11,7 @@ #include <functional> #include <iomanip> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <sstream> #include <stdio.h> diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx index 5cfc4a7..fb97e9b 100644 --- a/Source/CTest/cmCTestUpdateHandler.cxx +++ b/Source/CTest/cmCTestUpdateHandler.cxx @@ -18,7 +18,7 @@ #include "cmXMLWriter.h" #include <chrono> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> static const char* cmCTestUpdateHandlerUpdateStrings[] = { diff --git a/Source/cmBinUtilsLinuxELFLinker.h b/Source/cmBinUtilsLinuxELFLinker.h index 348edc4..e209637 100644 --- a/Source/cmBinUtilsLinuxELFLinker.h +++ b/Source/cmBinUtilsLinuxELFLinker.h @@ -9,7 +9,7 @@ #include "cmLDConfigTool.h" #include "cmStateTypes.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmBinUtilsMacOSMachOLinker.h b/Source/cmBinUtilsMacOSMachOLinker.h index 0350d1e..f4f309d 100644 --- a/Source/cmBinUtilsMacOSMachOLinker.h +++ b/Source/cmBinUtilsMacOSMachOLinker.h @@ -8,7 +8,7 @@ #include "cmBinUtilsMacOSMachOGetRuntimeDependenciesTool.h" #include "cmStateTypes.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmBinUtilsWindowsPELinker.h b/Source/cmBinUtilsWindowsPELinker.h index d742195..8d2bf4b 100644 --- a/Source/cmBinUtilsWindowsPELinker.h +++ b/Source/cmBinUtilsWindowsPELinker.h @@ -8,7 +8,7 @@ #include "cmBinUtilsWindowsPEGetRuntimeDependenciesTool.h" #include "cmStateTypes.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> class cmRuntimeDependencyArchive; diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index d1226c3..536ca35 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -15,7 +15,7 @@ #include <ctype.h> #include <iostream> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <stdlib.h> diff --git a/Source/cmCTest.h b/Source/cmCTest.h index d300c33..7f66378 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -10,7 +10,7 @@ #include <chrono> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <string> #include <time.h> diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index 0b1f00c..839c27a 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -10,6 +10,7 @@ #include "cmTargetLinkLibraryType.h" #include <map> +#include <memory> #include <queue> #include <set> #include <string> diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx index d914eb1..4310eed 100644 --- a/Source/cmCryptoHash.cxx +++ b/Source/cmCryptoHash.cxx @@ -8,7 +8,7 @@ #include "cmsys/FStream.hxx" #include <string.h> -#include <memory> // IWYU pragma: keep +#include <memory> static unsigned int const cmCryptoHashAlgoToId[] = { /* clang-format needs this comment to break after the opening brace */ diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h index b712f09..c7d3377 100644 --- a/Source/cmCryptoHash.h +++ b/Source/cmCryptoHash.h @@ -5,7 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include <memory> // IWYU pragma: keep +#include <memory> #include <stddef.h> #include <string> #include <vector> diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 89aaad0..5e8731a 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -12,7 +12,7 @@ #include "cmStateTypes.h" #include "cmSystemTools.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <stddef.h> #include <utility> diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 2226463..51eb814 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -6,7 +6,7 @@ #include "cm_kwiml.h" #include "cmsys/FStream.hxx" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stddef.h> #include <utility> diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index 494afbb..121f33f 100644 --- a/Source/cmExecuteProcessCommand.cxx +++ b/Source/cmExecuteProcessCommand.cxx @@ -4,10 +4,13 @@ #include "cm_static_string_view.hxx" #include "cmsys/Process.h" + #include <algorithm> #include <ctype.h> /* isspace */ #include <iostream> +#include <memory> #include <stdio.h> +#include <vector> #include "cmAlgorithms.h" #include "cmArgumentParser.h" diff --git a/Source/cmExportBuildAndroidMKGenerator.cxx b/Source/cmExportBuildAndroidMKGenerator.cxx index ced27c9..e693155 100644 --- a/Source/cmExportBuildAndroidMKGenerator.cxx +++ b/Source/cmExportBuildAndroidMKGenerator.cxx @@ -3,7 +3,6 @@ #include "cmExportBuildAndroidMKGenerator.h" #include <algorithm> -#include <memory> // IWYU pragma: keep #include <sstream> #include <utility> diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index c366183..e1c098d 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -20,7 +20,7 @@ #include "cmsys/FStream.hxx" #include <assert.h> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <string.h> #include <utility> diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index b60a053..2e86533 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -4,7 +4,7 @@ #include "cmsys/FStream.hxx" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <utility> #include "cmAlgorithms.h" diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index c169032..a3c9802 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -13,7 +13,7 @@ #include "cmTarget.h" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <utility> cmExportTryCompileFileGenerator::cmExportTryCompileFileGenerator( diff --git a/Source/cmFileAPI.h b/Source/cmFileAPI.h index 602efa8..aa5a42f 100644 --- a/Source/cmFileAPI.h +++ b/Source/cmFileAPI.h @@ -10,7 +10,7 @@ #include "cm_jsoncpp_writer.h" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <unordered_set> #include <vector> diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx index 0fb166a..73b4123 100644 --- a/Source/cmFileAPICodemodel.cxx +++ b/Source/cmFileAPICodemodel.cxx @@ -31,6 +31,7 @@ #include <algorithm> #include <cassert> #include <map> +#include <memory> #include <set> #include <string> #include <unordered_map> diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 980ad21..dfba910 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -13,7 +13,7 @@ #include <cmath> #include <ctype.h> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <sstream> #include <stdio.h> diff --git a/Source/cmFileTimes.h b/Source/cmFileTimes.h index cbf0fe2..191d89e 100644 --- a/Source/cmFileTimes.h +++ b/Source/cmFileTimes.h @@ -5,7 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> /** \class cmFileTimes diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 50ae6a9..783b5f6 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -13,7 +13,7 @@ #include <deque> #include <functional> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <string.h> diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 08003eb..7f189d6 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmForEachCommand.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <stdlib.h> diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 175a26d..4d3a005 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -3,7 +3,7 @@ #include "cmGeneratorExpression.h" #include "cmsys/RegularExpression.hxx" -#include <memory> // IWYU pragma: keep +#include <memory> #include <utility> #include "assert.h" diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index fd36c4b..ef76651 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -8,7 +8,7 @@ #include "cmListFileCache.h" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <string> #include <utility> diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx index 326cb0e..11c2dcc 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.cxx +++ b/Source/cmGeneratorExpressionEvaluationFile.cxx @@ -3,7 +3,7 @@ #include "cmGeneratorExpressionEvaluationFile.h" #include "cmsys/FStream.hxx" -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <utility> diff --git a/Source/cmGeneratorExpressionEvaluationFile.h b/Source/cmGeneratorExpressionEvaluationFile.h index 89a2390..06ebeac 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.h +++ b/Source/cmGeneratorExpressionEvaluationFile.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index a60c75c..d828dac 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -33,7 +33,7 @@ #include <errno.h> #include <iterator> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <sstream> #include <stdlib.h> diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 85a8dbb..845937a 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -7,7 +7,7 @@ #include <assert.h> #include <errno.h> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <queue> #include <sstream> #include <stdio.h> diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index b80da72..997595b 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -22,9 +22,11 @@ #include "cmTarget.h" #include <algorithm> +#include <memory> #include <ostream> #include <set> #include <utility> +#include <vector> cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmGeneratorTarget* target) : GeneratorTarget(target) diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 7fd5433..e36825c 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -7,6 +7,7 @@ #include <iosfwd> #include <map> +#include <memory> #include <set> #include <string> #include <unordered_map> diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 2d52356..98e8339 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -9,7 +9,7 @@ #include <algorithm> #include <ctype.h> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 15dd404..99afc1d 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -7,7 +7,7 @@ #include <iosfwd> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <string> #include <unordered_map> diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index aa584ad..93f5482 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -4,6 +4,7 @@ #include <algorithm> #include <functional> +#include <memory> #include <sstream> #include <utility> diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 7c2bcd3..78e8f30 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -5,7 +5,7 @@ #include "cmsys/RegularExpression.hxx" #include <assert.h> #include <iomanip> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <string.h> diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index a75d8a9..9befb78 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -4,7 +4,7 @@ #include <cstddef> #include <iostream> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <utility> diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index d1f8f58..6f32861 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -11,7 +11,7 @@ #include "cmSystemTools.h" #include "cmake.h" -#include <memory> // IWYU pragma: keep +#include <memory> static std::string cmIfCommandError( std::vector<cmExpandedCommandArgument> const& args) diff --git a/Source/cmInstallDirectoryGenerator.cxx b/Source/cmInstallDirectoryGenerator.cxx index 14288f6..c8ebc8c 100644 --- a/Source/cmInstallDirectoryGenerator.cxx +++ b/Source/cmInstallDirectoryGenerator.cxx @@ -8,7 +8,7 @@ #include "cmMakefile.h" #include "cmSystemTools.h" -#include <memory> // IWYU pragma: keep +#include <memory> cmInstallDirectoryGenerator::cmInstallDirectoryGenerator( std::vector<std::string> const& dirs, const char* dest, diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx index 2ed9f73..e8e82cc 100644 --- a/Source/cmInstallFilesGenerator.cxx +++ b/Source/cmInstallFilesGenerator.cxx @@ -6,7 +6,7 @@ #include "cmInstallType.h" #include "cmSystemTools.h" -#include <memory> // IWYU pragma: keep +#include <memory> class cmLocalGenerator; diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx index 5832d27..b7b7817 100644 --- a/Source/cmInstallScriptGenerator.cxx +++ b/Source/cmInstallScriptGenerator.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallScriptGenerator.h" +#include <memory> #include <ostream> #include <vector> diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 0774436..d891ad8 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -4,6 +4,7 @@ #include <assert.h> #include <map> +#include <memory> #include <set> #include <sstream> #include <utility> diff --git a/Source/cmInstalledFile.h b/Source/cmInstalledFile.h index b7d602e..eb827be 100644 --- a/Source/cmInstalledFile.h +++ b/Source/cmInstalledFile.h @@ -8,7 +8,7 @@ #include "cmGeneratorExpression.h" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmJsonObjects.cxx b/Source/cmJsonObjects.cxx index 8d065e1..505188f 100644 --- a/Source/cmJsonObjects.cxx +++ b/Source/cmJsonObjects.cxx @@ -31,6 +31,7 @@ #include <functional> #include <limits> #include <map> +#include <memory> #include <set> #include <string> #include <unordered_map> diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index 1b01ea2..e9a4a6f 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -7,12 +7,14 @@ #include <assert.h> #include <functional> #include <iterator> +#include <memory> #include <set> #include <sstream> #include <stdexcept> #include <stdio.h> #include <stdlib.h> // required for atoi #include <utility> +#include <vector> #include "cmAlgorithms.h" #include "cmGeneratorExpression.h" diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 9457415..5de1a74 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <iosfwd> -#include <memory> // IWYU pragma: keep +#include <memory> #include <stddef.h> #include <string> #include <utility> diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 801f0e8..0f730c9 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -26,22 +26,24 @@ #include "cmTestGenerator.h" #include "cmVersion.h" #include "cmake.h" +#include "cmsys/RegularExpression.hxx" #if defined(CMAKE_BUILD_WITH_CMAKE) # define CM_LG_ENCODE_OBJECT_NAMES # include "cmCryptoHash.h" #endif -#include "cmsys/RegularExpression.hxx" #include <algorithm> #include <assert.h> #include <initializer_list> #include <iterator> +#include <memory> #include <sstream> #include <stdio.h> #include <string.h> #include <unordered_set> #include <utility> +#include <vector> #if defined(__HAIKU__) # include <FindDirectory.h> diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 81cafa3..248f4a6 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -5,7 +5,7 @@ #include <algorithm> #include <assert.h> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <utility> diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index c392e97..1b4f428 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -5,7 +5,7 @@ #include "cmsys/FStream.hxx" #include "cmsys/Terminal.h" #include <algorithm> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <utility> diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h index 3fdafd2..585eb3c 100644 --- a/Source/cmLocalVisualStudioGenerator.h +++ b/Source/cmLocalVisualStudioGenerator.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include "cmGlobalVisualStudioGenerator.h" diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index bd98f08..5f22a07 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -9,7 +9,7 @@ #include <cstring> #include <ctype.h> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <stdlib.h> diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index d223347..d0b70d9 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -8,7 +8,7 @@ #include "cmsys/RegularExpression.hxx" #include <deque> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <stack> #include <stddef.h> diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 6b9b9c7..2001c1f 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileExecutableTargetGenerator.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <sstream> #include <string> diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index b9f7c6d..e5aed01 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileLibraryTargetGenerator.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <sstream> #include <stddef.h> diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index b3bab4b..b5a6246 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileTargetGenerator.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <utility> diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index c570a7c..9eeeed0 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -7,6 +7,7 @@ #include <iosfwd> #include <map> +#include <memory> #include <set> #include <string> #include <vector> diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index 4236995..70d9fca 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileUtilityTargetGenerator.h" +#include <memory> #include <ostream> #include <string> #include <utility> diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index f65abc8..d1af9e6 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -6,7 +6,7 @@ #include <assert.h> #include <iterator> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <sstream> #include <utility> diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 2139a45..57e500e 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -8,7 +8,7 @@ #include <assert.h> #include <iterator> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <ostream> #include <utility> diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h index 3055e18..a99d8e7 100644 --- a/Source/cmNinjaTargetGenerator.h +++ b/Source/cmNinjaTargetGenerator.h @@ -13,7 +13,7 @@ #include "cmOSXBundleGenerator.h" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <string> #include <vector> diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx index 585db42..2d055ff 100644 --- a/Source/cmOrderDirectories.cxx +++ b/Source/cmOrderDirectories.cxx @@ -13,6 +13,7 @@ #include <assert.h> #include <functional> #include <sstream> +#include <vector> /* Directory ordering computation. diff --git a/Source/cmQtAutoGen.h b/Source/cmQtAutoGen.h index 9c52129..619fff1 100644 --- a/Source/cmQtAutoGen.h +++ b/Source/cmQtAutoGen.h @@ -5,7 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmQtAutoGenGlobalInitializer.h b/Source/cmQtAutoGenGlobalInitializer.h index d56153a..d7f4cc6 100644 --- a/Source/cmQtAutoGenGlobalInitializer.h +++ b/Source/cmQtAutoGenGlobalInitializer.h @@ -8,7 +8,7 @@ #include "cmQtAutoGen.h" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <unordered_map> #include <vector> diff --git a/Source/cmQtAutoGenInitializer.h b/Source/cmQtAutoGenInitializer.h index aa073d1..eb0d35e 100644 --- a/Source/cmQtAutoGenInitializer.h +++ b/Source/cmQtAutoGenInitializer.h @@ -8,7 +8,7 @@ #include "cmQtAutoGen.h" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <ostream> #include <set> #include <string> diff --git a/Source/cmQtAutoGenerator.cxx b/Source/cmQtAutoGenerator.cxx index e1c435b..3a3162d 100644 --- a/Source/cmQtAutoGenerator.cxx +++ b/Source/cmQtAutoGenerator.cxx @@ -14,6 +14,8 @@ #include "cmSystemTools.h" #include "cmake.h" +#include <memory> + cmQtAutoGenerator::Logger::Logger() { // Initialize logger diff --git a/Source/cmQtAutoMocUic.h b/Source/cmQtAutoMocUic.h index 8061c13..dc18328 100644 --- a/Source/cmQtAutoMocUic.h +++ b/Source/cmQtAutoMocUic.h @@ -14,7 +14,7 @@ #include <atomic> #include <cstddef> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <string> #include <unordered_map> diff --git a/Source/cmRuntimeDependencyArchive.h b/Source/cmRuntimeDependencyArchive.h index ec3ecd4..67efec7 100644 --- a/Source/cmRuntimeDependencyArchive.h +++ b/Source/cmRuntimeDependencyArchive.h @@ -9,7 +9,7 @@ #include "cmsys/RegularExpression.hxx" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <string> #include <vector> diff --git a/Source/cmServer.h b/Source/cmServer.h index aba4924..ab2ad23 100644 --- a/Source/cmServer.h +++ b/Source/cmServer.h @@ -10,7 +10,7 @@ #include "cmUVHandlePtr.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmState.h b/Source/cmState.h index accd838..0649ace 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -6,6 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <map> +#include <memory> #include <set> #include <string> #include <vector> diff --git a/Source/cmStateDirectory.cxx b/Source/cmStateDirectory.cxx index 6ca1c9f..3f70ed3 100644 --- a/Source/cmStateDirectory.cxx +++ b/Source/cmStateDirectory.cxx @@ -6,6 +6,7 @@ #include <algorithm> #include <assert.h> #include <iterator> +#include <vector> #include "cmAlgorithms.h" #include "cmProperty.h" diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index 998f904..10ccac0 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -8,7 +8,7 @@ #include <algorithm> #include <ctype.h> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <stdlib.h> diff --git a/Source/cmTarget.h b/Source/cmTarget.h index fdcca47..f47cc14 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <iosfwd> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <string> #include <utility> diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index 498953e..916784c 100644 --- a/Source/cmTestGenerator.cxx +++ b/Source/cmTestGenerator.cxx @@ -2,8 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTestGenerator.h" +#include <memory> #include <ostream> #include <utility> +#include <vector> #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" diff --git a/Source/cmUVProcessChain.h b/Source/cmUVProcessChain.h index 2b33520..75f8f66 100644 --- a/Source/cmUVProcessChain.h +++ b/Source/cmUVProcessChain.h @@ -7,7 +7,7 @@ #include <array> #include <iosfwd> -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmVariableWatch.h b/Source/cmVariableWatch.h index 1230101..acac2c1 100644 --- a/Source/cmVariableWatch.h +++ b/Source/cmVariableWatch.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 0420881..d17a6d8 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -19,7 +19,7 @@ #include "windows.h" #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> static void ConvertToWindowsSlash(std::string& s); diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index a01fa6f..0d3bdf8 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -9,7 +9,7 @@ #include "cmMessageType.h" #include "cmSystemTools.h" -#include <memory> // IWYU pragma: keep +#include <memory> cmWhileFunctionBlocker::cmWhileFunctionBlocker(cmMakefile* mf) : Makefile(mf) diff --git a/Source/cmWorkerPool.h b/Source/cmWorkerPool.h index f08bb4f..5cc308b 100644 --- a/Source/cmWorkerPool.h +++ b/Source/cmWorkerPool.h @@ -7,7 +7,7 @@ #include "cmAlgorithms.h" // IWYU pragma: keep -#include <memory> // IWYU pragma: keep +#include <memory> #include <stdint.h> #include <string> #include <utility> diff --git a/Source/cmake.cxx b/Source/cmake.cxx index ca3b405..b8238a2 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -104,7 +104,7 @@ #include <cstring> #include <initializer_list> #include <iostream> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <stdlib.h> diff --git a/Source/cmake.h b/Source/cmake.h index c03872b..6aa00e1 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -7,7 +7,7 @@ #include <functional> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <string> #include <unordered_set> diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 86082e5..effc094 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -41,7 +41,7 @@ #include <array> #include <iostream> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <stdlib.h> diff --git a/Tests/CMakeLib/testUVProcessChain.cxx b/Tests/CMakeLib/testUVProcessChain.cxx index 72ae602..e926350 100644 --- a/Tests/CMakeLib/testUVProcessChain.cxx +++ b/Tests/CMakeLib/testUVProcessChain.cxx @@ -10,6 +10,7 @@ #include <algorithm> #include <functional> #include <iostream> +#include <memory> #include <sstream> #include <string> #include <vector> diff --git a/Tests/CMakeServerLib/testServerBuffering.cpp b/Tests/CMakeServerLib/testServerBuffering.cpp index 7330ead..8b0b89b 100644 --- a/Tests/CMakeServerLib/testServerBuffering.cpp +++ b/Tests/CMakeServerLib/testServerBuffering.cpp @@ -1,6 +1,8 @@ #include "cmConnection.h" #include "cmServerConnection.h" + #include <iostream> +#include <memory> #include <string> #include <vector> diff --git a/Utilities/IWYU/mapping.imp b/Utilities/IWYU/mapping.imp index 0393ff1..4e00214 100644 --- a/Utilities/IWYU/mapping.imp +++ b/Utilities/IWYU/mapping.imp @@ -42,10 +42,17 @@ { symbol: [ "std::istringstream", private, "<sstream>", public ] }, { symbol: [ "std::ostringstream", private, "<sstream>", public ] }, - # HACK: iwyu suggests those two files each time vector[] is used. + # HACK: iwyu suggests <ext/alloc_traits.h> and <memory> each time vector[] is used. # https://github.com/include-what-you-use/include-what-you-use/issues/166 { include: [ "<ext/alloc_traits.h>", private, "<vector>", public ] }, - { include: [ "<memory>", public, "<vector>", public ] }, + { symbol: [ "std::allocator_traits<std::allocator<cmComputeComponentGraph::TarjanEntry> >::value_type", private, "<vector>", public ] }, + { symbol: [ "std::allocator_traits<std::allocator<cmFortranFile> >::value_type", private, "<vector>", public ] }, + { symbol: [ "std::allocator_traits<std::allocator<cmGraphEdgeList> >::value_type", private, "<vector>", public ] }, + { 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::vector<std::basic_string<char>, std::allocator<std::basic_string<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? #{ symbol: [ "std::pair", private, "<utility>", public ] }, |