diff options
author | Brad King <brad.king@kitware.com> | 2016-11-28 19:24:07 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-11-28 19:24:07 (GMT) |
commit | 4093bd4025e65bdc75254bc7d08a675b10808a22 (patch) | |
tree | 2a4a0140ed7be3de05db9043af61bbe11decf83b | |
parent | 56c5c8e17aab80fe006d3de064d322dc31e8f25b (diff) | |
parent | d0c14dfb3694d076b8115d64dc317fd686b90aa2 (diff) | |
download | CMake-4093bd4025e65bdc75254bc7d08a675b10808a22.zip CMake-4093bd4025e65bdc75254bc7d08a675b10808a22.tar.gz CMake-4093bd4025e65bdc75254bc7d08a675b10808a22.tar.bz2 |
Merge topic 'include-what-you-use'
d0c14dfb avoid including cmStandardIncludes.h
66a70999 iwyu: Fix VisualStudio specific issues
7b4244ac iwyu: Fix more findings
aeff60e4 iwyu: Fix OSX specific issues
87 files changed, 453 insertions, 226 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx index 0098a4b..ba3248f 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx +++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx @@ -2,6 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackIFWInstaller.h" +#include <cmConfigure.h> +#include <sstream> +#include <stddef.h> +#include <utility> + #include "CPack/cmCPackGenerator.h" #include "CPack/cmCPackLog.h" #include "cmCPackIFWGenerator.h" @@ -12,9 +17,6 @@ #include "cmXMLParser.h" #include "cmXMLWriter.h" -#include <cmConfigure.h> -#include <utility> - #ifdef cmCPackLogger #undef cmCPackLogger #endif diff --git a/Source/CPack/OSXScriptLauncher.cxx b/Source/CPack/OSXScriptLauncher.cxx index 6eb4a6c..b159e64 100644 --- a/Source/CPack/OSXScriptLauncher.cxx +++ b/Source/CPack/OSXScriptLauncher.cxx @@ -3,8 +3,10 @@ #include <cmsys/FStream.hxx> #include <cmsys/Process.h> #include <cmsys/SystemTools.hxx> - #include <iostream> +#include <stddef.h> +#include <string> +#include <vector> #include <CoreFoundation/CoreFoundation.h> diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 0c4f573..2bccf2e 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -4,6 +4,7 @@ #include <CPack/cmCPackComponentGroup.h> #include <CPack/cmCPackLog.h> +#include <algorithm> #include <cmCryptoHash.h> #include <cmGeneratedFileStream.h> #include <cmInstalledFile.h> diff --git a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h index b535979..a3c8394 100644 --- a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h +++ b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h @@ -5,9 +5,8 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - #include <cmsys/FStream.hxx> +#include <string> /** \class cmWIXRichtTextFormatWriter * \brief Helper class to generate Rich Text Format (RTF) documents diff --git a/Source/CPack/cmCPackBundleGenerator.cxx b/Source/CPack/cmCPackBundleGenerator.cxx index 61d0127..d538901 100644 --- a/Source/CPack/cmCPackBundleGenerator.cxx +++ b/Source/CPack/cmCPackBundleGenerator.cxx @@ -2,11 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackBundleGenerator.h" +#include <sstream> +#include <vector> + #include "cmCPackLog.h" #include "cmSystemTools.h" -#include <cmsys/RegularExpression.hxx> - cmCPackBundleGenerator::cmCPackBundleGenerator() { } diff --git a/Source/CPack/cmCPackBundleGenerator.h b/Source/CPack/cmCPackBundleGenerator.h index 9ea4304..c9200c1 100644 --- a/Source/CPack/cmCPackBundleGenerator.h +++ b/Source/CPack/cmCPackBundleGenerator.h @@ -3,7 +3,11 @@ #ifndef cmCPackBundleGenerator_h #define cmCPackBundleGenerator_h +#include <cmConfigure.h> +#include <string> + #include "cmCPackDragNDropGenerator.h" +#include "cmCPackGenerator.h" /** \class cmCPackBundleGenerator * \brief A generator for OSX bundles diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index bdf4076..fd67df9 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -2,14 +2,16 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackDragNDropGenerator.h" +#include "cmCPackGenerator.h" #include "cmCPackLog.h" #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" #include <cmsys/FStream.hxx> #include <cmsys/RegularExpression.hxx> - #include <iomanip> +#include <map> +#include <stdlib.h> #include <CoreFoundation/CoreFoundation.h> diff --git a/Source/CPack/cmCPackDragNDropGenerator.h b/Source/CPack/cmCPackDragNDropGenerator.h index f803ad9..876eab7 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.h +++ b/Source/CPack/cmCPackDragNDropGenerator.h @@ -3,6 +3,12 @@ #ifndef cmCPackDragNDropGenerator_h #define cmCPackDragNDropGenerator_h +#include <cmConfigure.h> +#include <sstream> +#include <stddef.h> +#include <string> +#include <vector> + #include "cmCPackGenerator.h" class cmGeneratedFileStream; diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 09b9c0d..3878a32 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -2,24 +2,24 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackGenerator.h" +#include <algorithm> +#include <cmsys/FStream.hxx> +#include <cmsys/Glob.hxx> +#include <cmsys/RegularExpression.hxx> +#include <list> +#include <utility> + #include "cmCPackComponentGroup.h" #include "cmCPackLog.h" #include "cmCryptoHash.h" #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmStateTypes.h" +#include "cmStateSnapshot.h" #include "cmXMLSafe.h" #include "cm_auto_ptr.hxx" #include "cmake.h" -#include <algorithm> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/RegularExpression.hxx> -#include <list> -#include <utility> - #if defined(__HAIKU__) #include <FindDirectory.h> #include <StorageDefs.h> diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index f32dd70..b43bf8a 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -5,14 +5,15 @@ #include <cmConfigure.h> -#include "cmCPackComponentGroup.h" -#include "cmSystemTools.h" - #include <map> #include <sstream> #include <string> #include <vector> +#include "cmCPackComponentGroup.h" +#include "cmSystemTools.h" + +class cmCPackGenerator; class cmCPackLog; class cmInstalledFile; class cmMakefile; diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx index 2a0e65b..b012f01 100644 --- a/Source/CPack/cmCPackGeneratorFactory.cxx +++ b/Source/CPack/cmCPackGeneratorFactory.cxx @@ -2,9 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackGeneratorFactory.h" +#include <cmConfigure.h> +#include <ostream> +#include <utility> + #include "IFW/cmCPackIFWGenerator.h" +#include "cmAlgorithms.h" #include "cmCPack7zGenerator.h" #include "cmCPackGenerator.h" +#include "cmCPackLog.h" #include "cmCPackNSISGenerator.h" #include "cmCPackSTGZGenerator.h" #include "cmCPackTGZGenerator.h" @@ -36,12 +42,6 @@ #include "WiX/cmCPackWIXGenerator.h" #endif -#include "cmAlgorithms.h" -#include "cmCPackLog.h" - -#include <ostream> -#include <utility> - cmCPackGeneratorFactory::cmCPackGeneratorFactory() { if (cmCPackTGZGenerator::CanGenerate()) { diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h index 0a98f91..4ee0bc1 100644 --- a/Source/CPack/cmCPackGeneratorFactory.h +++ b/Source/CPack/cmCPackGeneratorFactory.h @@ -3,7 +3,7 @@ #ifndef cmCPackGeneratorFactory_h #define cmCPackGeneratorFactory_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep #include <map> #include <string> diff --git a/Source/CPack/cmCPackLog.cxx b/Source/CPack/cmCPackLog.cxx index 317f613..7d5c192 100644 --- a/Source/CPack/cmCPackLog.cxx +++ b/Source/CPack/cmCPackLog.cxx @@ -2,11 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackLog.h" +#include <cmConfigure.h> +#include <iostream> + #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" -#include <iostream> - cmCPackLog::cmCPackLog() { this->Verbose = false; diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h index 9ffe5c4..419c932 100644 --- a/Source/CPack/cmCPackLog.h +++ b/Source/CPack/cmCPackLog.h @@ -3,7 +3,7 @@ #ifndef cmCPackLog_h #define cmCPackLog_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep #include <ostream> #include <string.h> diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx index 225c1fb..0d8dc48 100644 --- a/Source/CPack/cmCPackOSXX11Generator.cxx +++ b/Source/CPack/cmCPackOSXX11Generator.cxx @@ -2,16 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackOSXX11Generator.h" +#include <sstream> +#include <sys/stat.h> + +#include "cmCPackGenerator.h" #include "cmCPackLog.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmMakefile.h" #include "cmSystemTools.h" -#include "cmake.h" - -#include <cmsys/Glob.hxx> -#include <cmsys/SystemTools.hxx> -#include <sys/stat.h> cmCPackOSXX11Generator::cmCPackOSXX11Generator() { diff --git a/Source/CPack/cmCPackOSXX11Generator.h b/Source/CPack/cmCPackOSXX11Generator.h index eb1e5ff..1918e21 100644 --- a/Source/CPack/cmCPackOSXX11Generator.h +++ b/Source/CPack/cmCPackOSXX11Generator.h @@ -3,6 +3,9 @@ #ifndef cmCPackOSXX11Generator_h #define cmCPackOSXX11Generator_h +#include <cmConfigure.h> +#include <string> + #include "cmCPackGenerator.h" /** \class cmCPackOSXX11Generator diff --git a/Source/CPack/cmCPackPKGGenerator.cxx b/Source/CPack/cmCPackPKGGenerator.cxx index 785ee01..70ae267 100644 --- a/Source/CPack/cmCPackPKGGenerator.cxx +++ b/Source/CPack/cmCPackPKGGenerator.cxx @@ -2,18 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackPKGGenerator.h" +#include <vector> + #include "cmCPackComponentGroup.h" +#include "cmCPackGenerator.h" #include "cmCPackLog.h" -#include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmLocalGenerator.h" -#include "cmMakefile.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" -#include "cmake.h" - -#include <cmsys/Glob.hxx> -#include <cmsys/SystemTools.hxx> cmCPackPKGGenerator::cmCPackPKGGenerator() { diff --git a/Source/CPack/cmCPackPKGGenerator.h b/Source/CPack/cmCPackPKGGenerator.h index bb3c1a7..1e96a62 100644 --- a/Source/CPack/cmCPackPKGGenerator.h +++ b/Source/CPack/cmCPackPKGGenerator.h @@ -5,10 +5,12 @@ #include <cmConfigure.h> #include <set> +#include <sstream> +#include <string> +#include "cmCPackComponentGroup.h" #include "cmCPackGenerator.h" -class cmCPackComponent; class cmXMLWriter; /** \class cmCPackPKGGenerator diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx index 25e8a1c..8000d6e 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.cxx +++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx @@ -2,20 +2,20 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackPackageMakerGenerator.h" +#include <assert.h> +#include <cmsys/FStream.hxx> +#include <cmsys/RegularExpression.hxx> +#include <map> +#include <sstream> +#include <stdio.h> +#include <stdlib.h> +#include <string> + #include "cmCPackComponentGroup.h" #include "cmCPackLog.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmMakefile.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" -#include "cmake.h" - -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/SystemTools.hxx> - -#include <assert.h> static inline unsigned int getVersion(unsigned int major, unsigned int minor) { diff --git a/Source/CPack/cmCPackPackageMakerGenerator.h b/Source/CPack/cmCPackPackageMakerGenerator.h index d679bc1..d4c6744 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.h +++ b/Source/CPack/cmCPackPackageMakerGenerator.h @@ -3,6 +3,9 @@ #ifndef cmCPackPackageMakerGenerator_h #define cmCPackPackageMakerGenerator_h +#include <cmConfigure.h> + +#include "cmCPackGenerator.h" #include "cmCPackPKGGenerator.h" class cmCPackComponent; diff --git a/Source/CPack/cmCPackProductBuildGenerator.cxx b/Source/CPack/cmCPackProductBuildGenerator.cxx index ff0ec79..a46e3a6 100644 --- a/Source/CPack/cmCPackProductBuildGenerator.cxx +++ b/Source/CPack/cmCPackProductBuildGenerator.cxx @@ -2,17 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackProductBuildGenerator.h" +#include <map> +#include <sstream> +#include <stddef.h> + #include "cmCPackComponentGroup.h" #include "cmCPackLog.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmLocalGenerator.h" -#include "cmMakefile.h" #include "cmSystemTools.h" -#include "cmake.h" - -#include <cmsys/Glob.hxx> -#include <cmsys/SystemTools.hxx> cmCPackProductBuildGenerator::cmCPackProductBuildGenerator() { diff --git a/Source/CPack/cmCPackProductBuildGenerator.h b/Source/CPack/cmCPackProductBuildGenerator.h index 4145eb4..b6da470 100644 --- a/Source/CPack/cmCPackProductBuildGenerator.h +++ b/Source/CPack/cmCPackProductBuildGenerator.h @@ -3,6 +3,10 @@ #ifndef cmCPackProductBuildGenerator_h #define cmCPackProductBuildGenerator_h +#include <cmConfigure.h> +#include <string> + +#include "cmCPackGenerator.h" #include "cmCPackPKGGenerator.h" class cmCPackComponent; diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx index 9817327..8ec03c2 100644 --- a/Source/CPack/cmCPackRPMGenerator.cxx +++ b/Source/CPack/cmCPackRPMGenerator.cxx @@ -2,17 +2,18 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackRPMGenerator.h" -#include "cmCPackComponentGroup.h" -#include "cmCPackGenerator.h" -#include "cmCPackLog.h" -#include "cmSystemTools.h" - #include <algorithm> +#include <ctype.h> #include <map> #include <ostream> #include <utility> #include <vector> +#include "cmCPackComponentGroup.h" +#include "cmCPackGenerator.h" +#include "cmCPackLog.h" +#include "cmSystemTools.h" + cmCPackRPMGenerator::cmCPackRPMGenerator() { } diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx index 66ba9f6..682394e 100644 --- a/Source/CPack/cmCPackSTGZGenerator.cxx +++ b/Source/CPack/cmCPackSTGZGenerator.cxx @@ -2,10 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackSTGZGenerator.h" -#include "cmCPackGenerator.h" -#include "cmCPackLog.h" -#include "cmSystemTools.h" - #include <cmsys/FStream.hxx> #include <sstream> #include <stdio.h> @@ -16,6 +12,10 @@ // include sys/stat.h after sys/types.h #include <sys/stat.h> +#include "cmCPackGenerator.h" +#include "cmCPackLog.h" +#include "cmSystemTools.h" + cmCPackSTGZGenerator::cmCPackSTGZGenerator() { } diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 06472c6..fa526ae 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -2,6 +2,20 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include <cmConfigure.h> +#include <cmsys/CommandLineArguments.hxx> +#include <cmsys/Encoding.hxx> +#include <iostream> +#include <map> +#include <sstream> +#include <stddef.h> +#include <string> +#include <utility> +#include <vector> + +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) +#include <cmsys/ConsoleBuf.hxx> +#endif + #include "cmCPackGenerator.h" #include "cmCPackGeneratorFactory.h" #include "cmCPackLog.h" @@ -10,24 +24,11 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmState.h" -#include "cmStateTypes.h" +#include "cmStateSnapshot.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" #include "cmake.h" -#include <cmsys/CommandLineArguments.hxx> -#include <cmsys/Encoding.hxx> -#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) -#include <cmsys/ConsoleBuf.hxx> -#endif -#include <iostream> -#include <map> -#include <sstream> -#include <stddef.h> -#include <string> -#include <utility> -#include <vector> - static const char* cmDocumentationName[][2] = { { CM_NULLPTR, " cpack - Packaging driver provided by CMake." }, { CM_NULLPTR, CM_NULLPTR } diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx index 20512ea..d30f6b3 100644 --- a/Source/CTest/cmCTestGIT.cxx +++ b/Source/CTest/cmCTestGIT.cxx @@ -2,12 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestGIT.h" -#include "cmAlgorithms.h" -#include "cmCTest.h" -#include "cmCTestVC.h" -#include "cmProcessTools.h" -#include "cmSystemTools.h" - #include <cmsys/FStream.hxx> #include <cmsys/Process.h> #include <ctype.h> @@ -16,6 +10,13 @@ #include <time.h> #include <vector> +#include "cmAlgorithms.h" +#include "cmCTest.h" +#include "cmCTestVC.h" +#include "cmProcessOutput.h" +#include "cmProcessTools.h" +#include "cmSystemTools.h" + static unsigned int cmCTestGITVersion(unsigned int epic, unsigned int major, unsigned int minor, unsigned int fix) { diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx index c093cc6..7638f45 100644 --- a/Source/CTest/cmCTestGenericHandler.cxx +++ b/Source/CTest/cmCTestGenericHandler.cxx @@ -2,12 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestGenericHandler.h" -#include "cmCTest.h" -#include "cmSystemTools.h" - +#include <cmConfigure.h> #include <sstream> #include <utility> +#include "cmCTest.h" +#include "cmSystemTools.h" + cmCTestGenericHandler::cmCTestGenericHandler() { this->HandlerVerbose = cmSystemTools::OUTPUT_NONE; diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h index 4176eb2..2ebbe70 100644 --- a/Source/CTest/cmCTestGenericHandler.h +++ b/Source/CTest/cmCTestGenericHandler.h @@ -3,16 +3,16 @@ #ifndef cmCTestGenericHandler_h #define cmCTestGenericHandler_h -#include <cmConfigure.h> - -#include "cmCTest.h" -#include "cmSystemTools.h" +#include <cmConfigure.h> // IWYU pragma: keep #include <map> #include <stddef.h> #include <string> #include <vector> +#include "cmCTest.h" +#include "cmSystemTools.h" + class cmCTestCommand; class cmGeneratedFileStream; class cmMakefile; diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index 43c0fef..03e0319 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -4,24 +4,24 @@ #include <cmConfigure.h> +#include <cmsys/FStream.hxx> +#include <cmsys/Process.h> +#include <cmsys/RegularExpression.hxx> +#include <iostream> +#include <stdlib.h> +#include <string.h> + #include "cmCryptoHash.h" #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmProcessOutput.h" -#include "cmStateTypes.h" +#include "cmStateSnapshot.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" +#include "cm_auto_ptr.hxx" #include "cmake.h" -#include <cm_auto_ptr.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/Process.h> -#include <cmsys/RegularExpression.hxx> -#include <iostream> -#include <stdlib.h> -#include <string.h> - #ifdef _WIN32 #include <fcntl.h> // for _O_BINARY #include <io.h> // for _setmode diff --git a/Source/CTest/cmCTestMemCheckCommand.cxx b/Source/CTest/cmCTestMemCheckCommand.cxx index 5e4c5ae..fd7c3a9 100644 --- a/Source/CTest/cmCTestMemCheckCommand.cxx +++ b/Source/CTest/cmCTestMemCheckCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestMemCheckCommand.h" +#include <sstream> +#include <vector> + #include "cmCTest.h" #include "cmCTestGenericHandler.h" #include "cmCTestMemCheckHandler.h" diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h index a10e271..ee4630a 100644 --- a/Source/CTest/cmCTestRunTest.h +++ b/Source/CTest/cmCTestRunTest.h @@ -5,11 +5,13 @@ #include <cmConfigure.h> // IWYU pragma: keep -#include <cmCTestTestHandler.h> +#include <set> #include <stddef.h> #include <string> #include <vector> +#include "cmCTestTestHandler.h" + class cmCTest; class cmProcess; diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 08ea4ee..b537242 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -2,6 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestScriptHandler.h" +#include <cmsys/Directory.hxx> +#include <cmsys/Process.h> +#include <map> +#include <sstream> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <utility> + #include "cmCTest.h" #include "cmCTestBuildCommand.h" #include "cmCTestCommand.h" @@ -23,19 +32,10 @@ #include "cmMakefile.h" #include "cmState.h" #include "cmStateDirectory.h" -#include "cmStateTypes.h" +#include "cmStateSnapshot.h" #include "cmSystemTools.h" #include "cmake.h" -#include <cmsys/Directory.hxx> -#include <cmsys/Process.h> -#include <map> -#include <sstream> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <utility> - #ifdef _WIN32 #include <windows.h> #else diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 2b2d207..0f13c1e 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -2,6 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestSubmitHandler.h" +#include <cm_curl.h> +#include <cm_jsoncpp_reader.h> +#include <cm_jsoncpp_value.h> +#include <cmsys/Process.h> +#include <sstream> +#include <stdio.h> +#include <stdlib.h> + #include "cmCTest.h" #include "cmCTestCurl.h" #include "cmCTestScriptHandler.h" @@ -9,19 +17,11 @@ #include "cmGeneratedFileStream.h" #include "cmProcessOutput.h" #include "cmState.h" -#include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmThirdParty.h" #include "cmXMLParser.h" #include "cmake.h" -#include <cm_curl.h> -#include <cm_jsoncpp_reader.h> -#include <cm_jsoncpp_value.h> -#include <cmsys/Process.h> -#include <sstream> -#include <stdio.h> -#include <stdlib.h> - #if defined(CTEST_USE_XMLRPC) #include "cmVersion.h" #include <cm_xmlrpc.h> diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 132d049..ab43dbc 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -2,21 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestTestHandler.h" -#include "cmCTest.h" -#include "cmCTestBatchTestHandler.h" -#include "cmCTestMultiProcessHandler.h" -#include "cmCommand.h" -#include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmMakefile.h" -#include "cmState.h" -#include "cmStateTypes.h" -#include "cmSystemTools.h" -#include "cmXMLWriter.h" -#include "cm_auto_ptr.hxx" -#include "cm_utf8.h" -#include "cmake.h" - #include <algorithm> #include <cmsys/Base64.h> #include <cmsys/Directory.hxx> @@ -32,6 +17,21 @@ #include <string.h> #include <time.h> +#include "cmCTest.h" +#include "cmCTestBatchTestHandler.h" +#include "cmCTestMultiProcessHandler.h" +#include "cmCommand.h" +#include "cmGeneratedFileStream.h" +#include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmState.h" +#include "cmStateSnapshot.h" +#include "cmSystemTools.h" +#include "cmXMLWriter.h" +#include "cm_auto_ptr.hxx" +#include "cm_utf8.h" +#include "cmake.h" + class cmExecutionStatus; class cmCTestSubdirCommand : public cmCommand diff --git a/Source/CTest/cmCTestUploadCommand.cxx b/Source/CTest/cmCTestUploadCommand.cxx index 9266bce..717117a 100644 --- a/Source/CTest/cmCTestUploadCommand.cxx +++ b/Source/CTest/cmCTestUploadCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestUploadCommand.h" +#include <sstream> +#include <vector> + #include "cmCTest.h" #include "cmCTestGenericHandler.h" #include "cmCTestUploadHandler.h" @@ -9,8 +12,6 @@ #include "cmSystemTools.h" #include "cmake.h" -#include <sstream> - cmCTestGenericHandler* cmCTestUploadCommand::InitializeHandler() { cmCTestGenericHandler* handler = diff --git a/Source/CTest/cmCTestVC.h b/Source/CTest/cmCTestVC.h index dd8b973..2681ba0 100644 --- a/Source/CTest/cmCTestVC.h +++ b/Source/CTest/cmCTestVC.h @@ -5,11 +5,12 @@ #include <cmConfigure.h> -#include "cmProcessTools.h" - #include <iosfwd> #include <string> +#include "cmProcessOutput.h" +#include "cmProcessTools.h" + class cmCTest; class cmXMLWriter; diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx index db97c47..eded883 100644 --- a/Source/bindexplib.cxx +++ b/Source/bindexplib.cxx @@ -62,11 +62,10 @@ *---------------------------------------------------------------------- */ #include "bindexplib.h" + #include <cmsys/Encoding.hxx> #include <fstream> #include <iostream> -#include <stdio.h> -#include <string> #include <windows.h> typedef struct cmANON_OBJECT_HEADER_BIGOBJ { diff --git a/Source/bindexplib.h b/Source/bindexplib.h index 1a0c3a3..d6900ba 100644 --- a/Source/bindexplib.h +++ b/Source/bindexplib.h @@ -5,8 +5,9 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - +#include <set> +#include <stdio.h> +#include <string> class bindexplib { diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 4436327..8db2e5f 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -14,6 +14,7 @@ #include <time.h> #include <vector> +class cmCTest; class cmCTestGenericHandler; class cmCTestStartCommand; class cmGeneratedFileStream; diff --git a/Source/cmCallVisualStudioMacro.cxx b/Source/cmCallVisualStudioMacro.cxx index a21a7d2..99fe587 100644 --- a/Source/cmCallVisualStudioMacro.cxx +++ b/Source/cmCallVisualStudioMacro.cxx @@ -2,6 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCallVisualStudioMacro.h" +#include <sstream> + #include "cmSystemTools.h" #if defined(_MSC_VER) diff --git a/Source/cmCallVisualStudioMacro.h b/Source/cmCallVisualStudioMacro.h index 7ff4513..e9d34e5 100644 --- a/Source/cmCallVisualStudioMacro.h +++ b/Source/cmCallVisualStudioMacro.h @@ -5,7 +5,7 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" +#include <string> /** \class cmCallVisualStudioMacro * \brief Control class for communicating with CMake's Visual Studio macros diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h index 26d55b3..0b562da 100644 --- a/Source/cmCryptoHash.h +++ b/Source/cmCryptoHash.h @@ -3,12 +3,14 @@ #ifndef cmCryptoHash_h #define cmCryptoHash_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include <cm_auto_ptr.hxx> +#include <stddef.h> #include <string> #include <vector> +#include "cm_auto_ptr.hxx" + /** * @brief Abstract base class for cryptographic hash generators */ diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index c2e37c1..2f6238b 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2,15 +2,39 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFileCommand.h" +#include <algorithm> +#include <assert.h> +#include <cm_kwiml.h> +#include <cmsys/Directory.hxx> +#include <cmsys/FStream.hxx> +#include <cmsys/Glob.hxx> +#include <cmsys/RegularExpression.hxx> +#include <cmsys/String.hxx> +#include <list> +#include <sstream> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include <sys/types.h> +// include sys/stat.h after sys/types.h +#include <sys/stat.h> + #include "cmAlgorithms.h" +#include "cmCommandArgumentsHelper.h" #include "cmCryptoHash.h" -#include "cmCryptoHash.h" +#include "cmFileLockPool.h" #include "cmFileTimeComparison.h" +#include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" #include "cmHexFileConverter.h" #include "cmInstallType.h" +#include "cmListFileCache.h" #include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmSystemTools.h" #include "cmTimestamp.h" +#include "cm_auto_ptr.hxx" #include "cmake.h" #if defined(CMAKE_BUILD_WITH_CMAKE) @@ -18,20 +42,7 @@ #include "cmFileLockResult.h" #endif -#undef GetCurrentDirectory -#include <assert.h> -#include <stdlib.h> - -#include <sys/types.h> -// include sys/stat.h after sys/types.h -#include <sys/stat.h> - -#include <cm_auto_ptr.hxx> -#include <cmsys/Directory.hxx> -#include <cmsys/Encoding.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/RegularExpression.hxx> +class cmSystemToolsFileTime; // Table of permissions flags. #if defined(_WIN32) && !defined(__CYGWIN__) diff --git a/Source/cmGhsMultiGpj.h b/Source/cmGhsMultiGpj.h index 793d471..2c2b123 100644 --- a/Source/cmGhsMultiGpj.h +++ b/Source/cmGhsMultiGpj.h @@ -5,8 +5,6 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - class cmGeneratedFileStream; class GhsMultiGpj diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 6bbfed5..286f375 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -2,14 +2,16 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalGhsMultiGenerator.h" +#include <cmsys/SystemTools.hxx> + +#include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGhsMultiTargetGenerator.h" #include "cmLocalGhsMultiGenerator.h" #include "cmMakefile.h" #include "cmVersion.h" -#include <cmAlgorithms.h> -#include <cmsys/SystemTools.hxx> const char* cmGlobalGhsMultiGenerator::FILE_EXTENSION = ".gpj"; const char* cmGlobalGhsMultiGenerator::DEFAULT_MAKE_PROGRAM = "gbuild"; diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 2ce65cd..a1af6ff 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -1,10 +1,9 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "windows.h" // this must be first to define GetCurrentDirectory - #include "cmGlobalVisualStudio10Generator.h" #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmGeneratorTarget.h" #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index acd2c2b..049e86e 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -3,6 +3,7 @@ #include "cmGlobalVisualStudio11Generator.h" #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmVS11CLFlagTable.h" diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h index be78544..ae99408 100644 --- a/Source/cmGlobalVisualStudio11Generator.h +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -3,7 +3,18 @@ #ifndef cmGlobalVisualStudio11Generator_h #define cmGlobalVisualStudio11Generator_h +#include <cmConfigure.h> + +#include <iosfwd> +#include <set> +#include <string> + #include "cmGlobalVisualStudio10Generator.h" +#include "cmStateTypes.h" + +class cmGlobalGeneratorFactory; +class cmMakefile; +class cmake; /** \class cmGlobalVisualStudio11Generator */ class cmGlobalVisualStudio11Generator : public cmGlobalVisualStudio10Generator diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx index c18ff9e..0a48ba6 100644 --- a/Source/cmGlobalVisualStudio12Generator.cxx +++ b/Source/cmGlobalVisualStudio12Generator.cxx @@ -3,6 +3,7 @@ #include "cmGlobalVisualStudio12Generator.h" #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmVS12CLFlagTable.h" diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h index cdda512..79efe52 100644 --- a/Source/cmGlobalVisualStudio12Generator.h +++ b/Source/cmGlobalVisualStudio12Generator.h @@ -3,8 +3,17 @@ #ifndef cmGlobalVisualStudio12Generator_h #define cmGlobalVisualStudio12Generator_h +#include <cmConfigure.h> + +#include <iosfwd> +#include <string> + #include "cmGlobalVisualStudio11Generator.h" +class cmGlobalGeneratorFactory; +class cmMakefile; +class cmake; + /** \class cmGlobalVisualStudio12Generator */ class cmGlobalVisualStudio12Generator : public cmGlobalVisualStudio11Generator { diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index e0b86d7..b4cb823 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -3,6 +3,7 @@ #include "cmGlobalVisualStudio14Generator.h" #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmVS140CLFlagTable.h" diff --git a/Source/cmGlobalVisualStudio14Generator.h b/Source/cmGlobalVisualStudio14Generator.h index 991f018..ab22978 100644 --- a/Source/cmGlobalVisualStudio14Generator.h +++ b/Source/cmGlobalVisualStudio14Generator.h @@ -3,8 +3,17 @@ #ifndef cmGlobalVisualStudio14Generator_h #define cmGlobalVisualStudio14Generator_h +#include <cmConfigure.h> + +#include <iosfwd> +#include <string> + #include "cmGlobalVisualStudio12Generator.h" +class cmGlobalGeneratorFactory; +class cmMakefile; +class cmake; + /** \class cmGlobalVisualStudio14Generator */ class cmGlobalVisualStudio14Generator : public cmGlobalVisualStudio12Generator { diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx index fbc7a10..19b48df 100644 --- a/Source/cmGlobalVisualStudio15Generator.cxx +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -3,6 +3,7 @@ #include "cmGlobalVisualStudio15Generator.h" #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmVS141CLFlagTable.h" diff --git a/Source/cmGlobalVisualStudio15Generator.h b/Source/cmGlobalVisualStudio15Generator.h index 2e458f4..59eb11a 100644 --- a/Source/cmGlobalVisualStudio15Generator.h +++ b/Source/cmGlobalVisualStudio15Generator.h @@ -3,8 +3,16 @@ #ifndef cmGlobalVisualStudio15Generator_h #define cmGlobalVisualStudio15Generator_h +#include <cmConfigure.h> + +#include <iosfwd> +#include <string> + #include "cmGlobalVisualStudio14Generator.h" +class cmGlobalGeneratorFactory; +class cmake; + /** \class cmGlobalVisualStudio15Generator */ class cmGlobalVisualStudio15Generator : public cmGlobalVisualStudio14Generator { diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index 8af0512..55a788f 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -1,9 +1,8 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "windows.h" // this must be first to define GetCurrentDirectory - #include "cmGlobalVisualStudio71Generator.h" +#include "cmDocumentationEntry.h" #include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index cf37c2c..e961a3d 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -1,9 +1,8 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "windows.h" // this must be first to define GetCurrentDirectory - #include "cmGlobalVisualStudio8Generator.h" +#include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx index 32ba849..b1634e2 100644 --- a/Source/cmGlobalVisualStudio9Generator.cxx +++ b/Source/cmGlobalVisualStudio9Generator.cxx @@ -1,9 +1,8 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "windows.h" // this must be first to define GetCurrentDirectory - #include "cmGlobalVisualStudio9Generator.h" +#include "cmDocumentationEntry.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" #include "cmVisualStudioWCEPlatformParser.h" diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 354ada9..5edb81f 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -3,6 +3,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalVisualStudioGenerator.h" +#include <cmsys/Encoding.hxx> +#include <iostream> + #include "cmAlgorithms.h" #include "cmCallVisualStudioMacro.h" #include "cmGeneratedFileStream.h" @@ -12,7 +15,6 @@ #include "cmSourceFile.h" #include "cmState.h" #include "cmTarget.h" -#include <cmsys/Encoding.hxx> cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator(cmake* cm) : cmGlobalGenerator(cm) diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 0e88bce..f32f0bb 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -3,7 +3,22 @@ #ifndef cmGlobalVisualStudioGenerator_h #define cmGlobalVisualStudioGenerator_h +#include <cmConfigure.h> + +#include <iosfwd> +#include <map> +#include <set> +#include <string> +#include <vector> + #include "cmGlobalGenerator.h" +#include "cmTargetDepend.h" + +class cmCustomCommand; +class cmGeneratorTarget; +class cmLocalGenerator; +class cmMakefile; +class cmake; /** \class cmGlobalVisualStudioGenerator * \brief Base class for global Visual Studio generators. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 4a75b4d..50197c9 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2,20 +2,35 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalXCodeGenerator.h" -#include "cmAlgorithms.h" +#include <assert.h> +#include <cmsys/RegularExpression.hxx> +#include <iomanip> +#include <sstream> +#include <stdio.h> +#include <string.h> + #include "cmComputeLinkInformation.h" #include "cmCustomCommandGenerator.h" +#include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmGlobalGeneratorFactory.h" +#include "cmLocalGenerator.h" #include "cmLocalXCodeGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" #include "cmSourceFile.h" +#include "cmSourceGroup.h" +#include "cmStateTypes.h" +#include "cmSystemTools.h" +#include "cmTarget.h" #include "cmXCode21Object.h" #include "cmXCodeObject.h" +#include "cm_auto_ptr.hxx" #include "cmake.h" -#include <cm_auto_ptr.hxx> +struct cmLinkImplementation; #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmXMLParser.h" diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 98625d1..42c39aa 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -3,13 +3,25 @@ #ifndef cmGlobalXCodeGenerator_h #define cmGlobalXCodeGenerator_h -#include "cmGlobalGenerator.h" +#include <cmConfigure.h> +#include <iosfwd> +#include <map> +#include <set> +#include <string> +#include <vector> -#include "cmCustomCommand.h" +#include "cmGlobalGenerator.h" #include "cmXCodeObject.h" + +class cmCustomCommand; +class cmGeneratorTarget; class cmGlobalGeneratorFactory; +class cmLocalGenerator; +class cmMakefile; class cmSourceFile; class cmSourceGroup; +class cmake; +struct cmDocumentationEntry; /** \class cmGlobalXCodeGenerator * \brief Write a Unix makefiles. diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx index 286076f..c6c0e05 100644 --- a/Source/cmIDEOptions.cxx +++ b/Source/cmIDEOptions.cxx @@ -2,9 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIDEOptions.h" -#include "cmSystemTools.h" - #include <cmsys/String.h> +#include <iterator> +#include <string.h> + +#include "cmIDEFlagTable.h" +#include "cmSystemTools.h" cmIDEOptions::cmIDEOptions() { diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index 1067c40..a0696e1 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -5,9 +5,11 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" +#include <map> +#include <string> +#include <vector> -#include "cmIDEFlagTable.h" +struct cmIDEFlagTable; /** \class cmIDEOptions * \brief Superclass for IDE option processing diff --git a/Source/cmLocalVisualStudio10Generator.h b/Source/cmLocalVisualStudio10Generator.h index 4becfee..1ed57ec 100644 --- a/Source/cmLocalVisualStudio10Generator.h +++ b/Source/cmLocalVisualStudio10Generator.h @@ -3,8 +3,15 @@ #ifndef cmLocalVisualStudio10Generator_h #define cmLocalVisualStudio10Generator_h +#include <cmConfigure.h> + +#include <string> + #include "cmLocalVisualStudio7Generator.h" +class cmGlobalGenerator; +class cmMakefile; + /** \class cmLocalVisualStudio10Generator * \brief Write Visual Studio 10 project files. * diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h index 6665bb0..d69cce1 100644 --- a/Source/cmLocalVisualStudio7Generator.h +++ b/Source/cmLocalVisualStudio7Generator.h @@ -3,17 +3,23 @@ #ifndef cmLocalVisualStudio7Generator_h #define cmLocalVisualStudio7Generator_h -#include "cmLocalVisualStudioGenerator.h" +#include <cmConfigure.h> + +#include <iosfwd> +#include <string> +#include <vector> +#include "cmLocalVisualStudioGenerator.h" #include "cmVisualStudioGeneratorOptions.h" -class cmSourceFile; class cmCustomCommand; -class cmSourceGroup; - -class cmLocalVisualStudio7GeneratorOptions; +class cmGeneratorTarget; +class cmGlobalGenerator; class cmLocalVisualStudio7GeneratorFCInfo; class cmLocalVisualStudio7GeneratorInternals; +class cmMakefile; +class cmSourceFile; +class cmSourceGroup; /** \class cmLocalVisualStudio7Generator * \brief Write Visual Studio .NET project files. @@ -119,6 +125,7 @@ private: friend class cmLocalVisualStudio7GeneratorInternals; class EventWriter; + friend class EventWriter; std::string ModuleDefinitionFile; diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h index 169ecaf..39188f9 100644 --- a/Source/cmLocalVisualStudioGenerator.h +++ b/Source/cmLocalVisualStudioGenerator.h @@ -3,16 +3,22 @@ #ifndef cmLocalVisualStudioGenerator_h #define cmLocalVisualStudioGenerator_h -#include "cmLocalGenerator.h" +#include <cmConfigure.h> -#include "cmGlobalVisualStudioGenerator.h" +#include <map> +#include <memory> +#include <string> -#include <cm_auto_ptr.hxx> +#include "cmGlobalVisualStudioGenerator.h" +#include "cmLocalGenerator.h" +#include "cm_auto_ptr.hxx" -class cmSourceFile; -class cmSourceGroup; class cmCustomCommand; class cmCustomCommandGenerator; +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmMakefile; +class cmSourceFile; /** \class cmLocalVisualStudioGenerator * \brief Base class for Visual Studio generators. diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx index b596a8f..739ef43 100644 --- a/Source/cmLocalXCodeGenerator.cxx +++ b/Source/cmLocalXCodeGenerator.cxx @@ -4,9 +4,12 @@ #include "cmGeneratorTarget.h" #include "cmGlobalXCodeGenerator.h" -#include "cmMakefile.h" #include "cmSourceFile.h" +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmMakefile; + cmLocalXCodeGenerator::cmLocalXCodeGenerator(cmGlobalGenerator* gg, cmMakefile* mf) : cmLocalGenerator(gg, mf) diff --git a/Source/cmLocalXCodeGenerator.h b/Source/cmLocalXCodeGenerator.h index 3756b61..b4a8c6c 100644 --- a/Source/cmLocalXCodeGenerator.h +++ b/Source/cmLocalXCodeGenerator.h @@ -3,8 +3,17 @@ #ifndef cmLocalXCodeGenerator_h #define cmLocalXCodeGenerator_h +#include <cmConfigure.h> // IWYU pragma: keep +#include <map> +#include <string> + #include "cmLocalGenerator.h" +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmMakefile; +class cmSourceFile; + /** \class cmLocalXCodeGenerator * \brief Write a local Xcode project * diff --git a/Source/cmMachO.cxx b/Source/cmMachO.cxx index 95518f9..586e6c6 100644 --- a/Source/cmMachO.cxx +++ b/Source/cmMachO.cxx @@ -1,10 +1,12 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmStandardIncludes.h" // to get CMAKE_USE_MACH_PARSER first - #include "cmMachO.h" +#include <algorithm> #include <cmsys/FStream.hxx> +#include <stddef.h> +#include <string> +#include <vector> // Include the Mach-O format information system header. #include <mach-o/fat.h> diff --git a/Source/cmMachO.h b/Source/cmMachO.h index a754c1f..901f17a 100644 --- a/Source/cmMachO.h +++ b/Source/cmMachO.h @@ -3,6 +3,11 @@ #ifndef cmMachO_h #define cmMachO_h +#include <cmConfigure.h> + +#include <iosfwd> +#include <string> + #if !defined(CMAKE_USE_MACH_PARSER) #error "This file may be included only if CMAKE_USE_MACH_PARSER is enabled." #endif diff --git a/Source/cmProcessOutput.h b/Source/cmProcessOutput.h index d7a5e98..6a4e7d5 100644 --- a/Source/cmProcessOutput.h +++ b/Source/cmProcessOutput.h @@ -5,6 +5,7 @@ #include <cmConfigure.h> // IWYU pragma: keep +#include <stddef.h> #include <string> #include <vector> diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 1fa844c..a4e3adb 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -5,19 +5,22 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" +#include <iosfwd> +#include <map> +#include <set> +#include <string> +#include <vector> -class cmMakefile; -class cmGeneratorTarget; +class cmComputeLinkInformation; +class cmCustomCommand; class cmGeneratedFileStream; +class cmGeneratorTarget; class cmGlobalVisualStudio10Generator; -class cmSourceFile; -class cmCustomCommand; class cmLocalVisualStudio7Generator; -class cmComputeLinkInformation; +class cmMakefile; +class cmSourceFile; +class cmSourceGroup; class cmVisualStudioGeneratorOptions; -struct cmIDEFlagTable; -#include "cmSourceGroup.h" class cmVisualStudio10TargetGenerator { diff --git a/Source/cmVisualStudio10ToolsetOptions.h b/Source/cmVisualStudio10ToolsetOptions.h index ea6c9c8..bb0be15 100644 --- a/Source/cmVisualStudio10ToolsetOptions.h +++ b/Source/cmVisualStudio10ToolsetOptions.h @@ -3,7 +3,9 @@ #ifndef cmVisualStudio10ToolsetOptions_h #define cmVisualStudio10ToolsetOptions_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> + +#include <string> struct cmIDEFlagTable; diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index e751bfc..62200ce 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -1,5 +1,6 @@ #include "cmVisualStudioGeneratorOptions.h" +#include "cmLocalVisualStudioGenerator.h" #include "cmOutputConverter.h" #include "cmSystemTools.h" #include "cmVisualStudio10TargetGenerator.h" diff --git a/Source/cmVisualStudioGeneratorOptions.h b/Source/cmVisualStudioGeneratorOptions.h index 0a0b96d..e27c5d3 100644 --- a/Source/cmVisualStudioGeneratorOptions.h +++ b/Source/cmVisualStudioGeneratorOptions.h @@ -3,9 +3,17 @@ #ifndef cmVisualStudioGeneratorOptions_h #define cmVisualStudioGeneratorOptions_h -#include "cmLocalVisualStudioGenerator.h" +#include <cmConfigure.h> +#include <iosfwd> +#include <string> + +#include "cmGlobalVisualStudioGenerator.h" +#include "cmIDEFlagTable.h" #include "cmIDEOptions.h" + +class cmLocalVisualStudioGenerator; + typedef cmIDEFlagTable cmVS7FlagTable; class cmVisualStudio10TargetGenerator; diff --git a/Source/cmVisualStudioSlnData.h b/Source/cmVisualStudioSlnData.h index 9f5ccb7..b2f8db9 100644 --- a/Source/cmVisualStudioSlnData.h +++ b/Source/cmVisualStudioSlnData.h @@ -5,7 +5,9 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" +#include <map> +#include <string> +#include <vector> class cmSlnProjectEntry { diff --git a/Source/cmVisualStudioSlnParser.h b/Source/cmVisualStudioSlnParser.h index 8939ab5..a3391a6 100644 --- a/Source/cmVisualStudioSlnParser.h +++ b/Source/cmVisualStudioSlnParser.h @@ -5,9 +5,10 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - #include <bitset> +#include <iosfwd> +#include <stddef.h> +#include <string> class cmSlnData; @@ -65,6 +66,7 @@ public: protected: class State; + friend class State; class ParsedLine; diff --git a/Source/cmVisualStudioWCEPlatformParser.h b/Source/cmVisualStudioWCEPlatformParser.h index 25f1a18..8ed6083 100644 --- a/Source/cmVisualStudioWCEPlatformParser.h +++ b/Source/cmVisualStudioWCEPlatformParser.h @@ -5,7 +5,10 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" +#include <map> +#include <stddef.h> +#include <string> +#include <vector> #include "cmXMLParser.h" diff --git a/Source/cmXCode21Object.cxx b/Source/cmXCode21Object.cxx index a783c70..719e627 100644 --- a/Source/cmXCode21Object.cxx +++ b/Source/cmXCode21Object.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmXCode21Object.h" +#include <ostream> +#include <string> + #include "cmSystemTools.h" cmXCode21Object::cmXCode21Object(PBXType ptype, Type type) diff --git a/Source/cmXCode21Object.h b/Source/cmXCode21Object.h index 0db20e6..083d229 100644 --- a/Source/cmXCode21Object.h +++ b/Source/cmXCode21Object.h @@ -3,6 +3,11 @@ #ifndef cmXCode21Object_h #define cmXCode21Object_h +#include <cmConfigure.h> // IWYU pragma: keep + +#include <iosfwd> +#include <vector> + #include "cmXCodeObject.h" class cmXCode21Object : public cmXCodeObject diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx index b1dc7ea..3689ac4 100644 --- a/Source/cmXCodeObject.cxx +++ b/Source/cmXCodeObject.cxx @@ -2,9 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmXCodeObject.h" -#include "cmSystemTools.h" +#include <CoreFoundation/CoreFoundation.h> +#include <ostream> -#include <CoreFoundation/CoreFoundation.h> // CFUUIDCreate +#include "cmSystemTools.h" const char* cmXCodeObject::PBXTypeNames[] = { /* clang-format needs this comment to break after the opening brace */ diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h index d495130..3bfecdf 100644 --- a/Source/cmXCodeObject.h +++ b/Source/cmXCodeObject.h @@ -3,9 +3,14 @@ #ifndef cmXCodeObject_h #define cmXCodeObject_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include <algorithm> +#include <iosfwd> +#include <map> +#include <string> +#include <utility> +#include <vector> class cmGeneratorTarget; diff --git a/Source/cmakexbuild.cxx b/Source/cmakexbuild.cxx index 82db012..e166bee 100644 --- a/Source/cmakexbuild.cxx +++ b/Source/cmakexbuild.cxx @@ -1,9 +1,14 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmStandardIncludes.h" -#include "cmSystemTools.h" +#include <cmConfigure.h> // IWYU pragma: keep + #include <cmsys/Process.h> +#include <iostream> +#include <string> +#include <vector> + +#include "cmSystemTools.h" // This is a wrapper program for xcodebuild // it calls xcodebuild, and does two things diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index 0bf0a7c..5d4ca70 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -1,4 +1,4 @@ -#include "cmSystemTools.h" +#include <cmConfigure.h> #include <cmsys/FStream.hxx> #include <iostream> @@ -8,6 +8,8 @@ #include <utility> #include <vector> +#include "cmSystemTools.h" + class CompileCommandParser { public: diff --git a/Tests/CMakeLib/testFindPackageCommand.cxx b/Tests/CMakeLib/testFindPackageCommand.cxx index 7622756..bfd429f 100644 --- a/Tests/CMakeLib/testFindPackageCommand.cxx +++ b/Tests/CMakeLib/testFindPackageCommand.cxx @@ -1,9 +1,13 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmFindPackageCommand.h" + +#include <cmConfigure.h> // IWYU pragma: keep #include <iostream> #include <string> +#include <vector> + +#include "cmFindPackageCommand.h" #define cmPassed(m) std::cout << "Passed: " << (m) << "\n" #define cmFailed(m) \ diff --git a/Tests/CMakeLib/testSystemTools.cxx b/Tests/CMakeLib/testSystemTools.cxx index b16b088..0dfa326 100644 --- a/Tests/CMakeLib/testSystemTools.cxx +++ b/Tests/CMakeLib/testSystemTools.cxx @@ -1,9 +1,14 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmSystemTools.h" + +#include <cmConfigure.h> // IWYU pragma: keep #include <iostream> +#include <stddef.h> #include <string> +#include <vector> + +#include "cmSystemTools.h" #define cmPassed(m) std::cout << "Passed: " << (m) << "\n" #define cmFailed(m) \ diff --git a/Tests/CMakeLib/testXMLSafe.cxx b/Tests/CMakeLib/testXMLSafe.cxx index 6c59128..fe776c5 100644 --- a/Tests/CMakeLib/testXMLSafe.cxx +++ b/Tests/CMakeLib/testXMLSafe.cxx @@ -1,11 +1,14 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmXMLSafe.h" + +#include <cmConfigure.h> #include <sstream> #include <stdio.h> #include <string> +#include "cmXMLSafe.h" + struct test_pair { const char* in; |