From aeff60e44c203dd67b316a6c6eab1454a408e1f7 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Wed, 23 Nov 2016 00:41:44 +0100 Subject: iwyu: Fix OSX specific issues --- Source/CPack/OSXScriptLauncher.cxx | 4 +++- Source/CPack/cmCPackBundleGenerator.cxx | 5 +++-- Source/CPack/cmCPackBundleGenerator.h | 4 ++++ Source/CPack/cmCPackDragNDropGenerator.cxx | 4 +++- Source/CPack/cmCPackDragNDropGenerator.h | 6 ++++++ Source/CPack/cmCPackOSXX11Generator.cxx | 11 ++++------- Source/CPack/cmCPackOSXX11Generator.h | 3 +++ Source/CPack/cmCPackPKGGenerator.cxx | 11 +++-------- Source/CPack/cmCPackPKGGenerator.h | 4 +++- Source/CPack/cmCPackPackageMakerGenerator.cxx | 18 +++++++++--------- Source/CPack/cmCPackPackageMakerGenerator.h | 3 +++ Source/CPack/cmCPackProductBuildGenerator.cxx | 11 ++++------- Source/CPack/cmCPackProductBuildGenerator.h | 4 ++++ Source/cmGlobalXCodeGenerator.cxx | 19 +++++++++++++++++-- Source/cmGlobalXCodeGenerator.h | 16 ++++++++++++++-- Source/cmLocalXCodeGenerator.cxx | 5 ++++- Source/cmLocalXCodeGenerator.h | 9 +++++++++ Source/cmMachO.cxx | 6 ++++-- Source/cmMachO.h | 5 +++++ Source/cmXCode21Object.cxx | 3 +++ Source/cmXCode21Object.h | 5 +++++ Source/cmXCodeObject.cxx | 5 +++-- Source/cmXCodeObject.h | 9 +++++++-- Source/cmakexbuild.cxx | 9 +++++++-- Tests/CMakeLib/run_compile_commands.cxx | 4 +++- 25 files changed, 133 insertions(+), 50 deletions(-) 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 #include #include - #include +#include +#include +#include #include 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 +#include + #include "cmCPackLog.h" #include "cmSystemTools.h" -#include - 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 +#include + #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 #include - #include +#include +#include #include 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 +#include +#include +#include +#include + #include "cmCPackGenerator.h" class cmGeneratedFileStream; 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 +#include + +#include "cmCPackGenerator.h" #include "cmCPackLog.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmMakefile.h" #include "cmSystemTools.h" -#include "cmake.h" - -#include -#include -#include 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 +#include + #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 + #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 -#include 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 #include +#include +#include +#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 +#include +#include +#include +#include +#include +#include +#include + #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 -#include -#include - -#include 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 + +#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 +#include +#include + #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 -#include 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 +#include + +#include "cmCPackGenerator.h" #include "cmCPackPKGGenerator.h" class cmCPackComponent; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 84a8c5e..764f68e 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 +#include +#include +#include +#include +#include + #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 +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 +#include +#include +#include +#include +#include -#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/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 // IWYU pragma: keep +#include +#include + #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 #include +#include +#include +#include // Include the Mach-O format information system header. #include 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 + +#include +#include + #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/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 +#include + #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 // IWYU pragma: keep + +#include +#include + #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 +#include -#include // 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 +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include +#include +#include +#include +#include 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 // IWYU pragma: keep + #include +#include +#include +#include + +#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 #include #include @@ -8,6 +8,8 @@ #include #include +#include "cmSystemTools.h" + class CompileCommandParser { public: -- cgit v0.12 From 7b4244aceb44aad117dfaccfb2287fbddbe9eca7 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Fri, 25 Nov 2016 22:10:40 +0100 Subject: iwyu: Fix more findings --- Source/CPack/IFW/cmCPackIFWInstaller.cxx | 8 +++--- Source/CPack/cmCPackGenerator.cxx | 16 ++++++------ Source/CPack/cmCPackGenerator.h | 7 +++--- Source/CPack/cmCPackGeneratorFactory.cxx | 12 ++++----- Source/CPack/cmCPackGeneratorFactory.h | 2 +- Source/CPack/cmCPackLog.cxx | 5 ++-- Source/CPack/cmCPackLog.h | 2 +- Source/CPack/cmCPackRPMGenerator.cxx | 11 +++++---- Source/CPack/cmCPackSTGZGenerator.cxx | 8 +++--- Source/CPack/cpack.cxx | 29 +++++++++++----------- Source/CTest/cmCTestGIT.cxx | 13 +++++----- Source/CTest/cmCTestGenericHandler.cxx | 7 +++--- Source/CTest/cmCTestGenericHandler.h | 8 +++--- Source/CTest/cmCTestLaunch.cxx | 18 +++++++------- Source/CTest/cmCTestMemCheckCommand.cxx | 3 +++ Source/CTest/cmCTestRunTest.h | 4 ++- Source/CTest/cmCTestScriptHandler.cxx | 20 +++++++-------- Source/CTest/cmCTestSubmitHandler.cxx | 18 +++++++------- Source/CTest/cmCTestTestHandler.cxx | 30 +++++++++++----------- Source/CTest/cmCTestUploadCommand.cxx | 5 ++-- Source/CTest/cmCTestVC.h | 5 ++-- Source/cmCTest.h | 1 + Source/cmCryptoHash.h | 6 +++-- Source/cmFileCommand.cxx | 41 ++++++++++++++++++++----------- Source/cmProcessOutput.h | 1 + Tests/CMakeLib/testFindPackageCommand.cxx | 6 ++++- Tests/CMakeLib/testSystemTools.cxx | 7 +++++- Tests/CMakeLib/testXMLSafe.cxx | 5 +++- 28 files changed, 170 insertions(+), 128 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 +#include +#include +#include + #include "CPack/cmCPackGenerator.h" #include "CPack/cmCPackLog.h" #include "cmCPackIFWGenerator.h" @@ -12,9 +17,6 @@ #include "cmXMLParser.h" #include "cmXMLWriter.h" -#include -#include - #ifdef cmCPackLogger #undef cmCPackLogger #endif 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 +#include +#include +#include +#include +#include + #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 -#include -#include -#include -#include -#include - #if defined(__HAIKU__) #include #include 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 -#include "cmCPackComponentGroup.h" -#include "cmSystemTools.h" - #include #include #include #include +#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 +#include +#include + #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 -#include - 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 +#include // IWYU pragma: keep #include #include 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 +#include + #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" -#include - 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 +#include // IWYU pragma: keep #include #include 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 +#include #include #include #include #include +#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 #include #include @@ -16,6 +12,10 @@ // include sys/stat.h after sys/types.h #include +#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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) +#include +#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 -#include -#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) -#include -#endif -#include -#include -#include -#include -#include -#include -#include - 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 #include #include @@ -16,6 +10,13 @@ #include #include +#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 #include #include +#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 - -#include "cmCTest.h" -#include "cmSystemTools.h" +#include // IWYU pragma: keep #include #include #include #include +#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 +#include +#include +#include +#include +#include +#include + #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 -#include -#include -#include -#include -#include -#include - #ifdef _WIN32 #include // for _O_BINARY #include // 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 +#include + #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 // IWYU pragma: keep -#include +#include #include #include #include +#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 +#include +#include +#include +#include +#include +#include +#include + #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 -#include -#include -#include -#include -#include -#include -#include - #ifdef _WIN32 #include #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 +#include +#include +#include +#include +#include +#include + #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 -#include -#include -#include -#include -#include -#include - #if defined(CTEST_USE_XMLRPC) #include "cmVersion.h" #include 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 #include #include @@ -32,6 +17,21 @@ #include #include +#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 +#include + #include "cmCTest.h" #include "cmCTestGenericHandler.h" #include "cmCTestUploadHandler.h" @@ -9,8 +12,6 @@ #include "cmSystemTools.h" #include "cmake.h" -#include - 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 -#include "cmProcessTools.h" - #include #include +#include "cmProcessOutput.h" +#include "cmProcessTools.h" + class cmCTest; class cmXMLWriter; 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 #include +class cmCTest; class cmCTestGenericHandler; class cmCTestStartCommand; class cmGeneratedFileStream; 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 +#include // IWYU pragma: keep -#include +#include #include #include +#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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +// include sys/stat.h after sys/types.h +#include + #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 -#include - -#include -// include sys/stat.h after sys/types.h -#include - -#include -#include -#include -#include -#include -#include +class cmSystemToolsFileTime; // Table of permissions flags. #if defined(_WIN32) && !defined(__CYGWIN__) 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 // IWYU pragma: keep +#include #include #include 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 // IWYU pragma: keep #include #include +#include + +#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 // IWYU pragma: keep #include +#include #include +#include + +#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 #include #include #include +#include "cmXMLSafe.h" + struct test_pair { const char* in; -- cgit v0.12 From 66a709999349b5a7964c2647c41f4759fe2141ee Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Fri, 25 Nov 2016 22:54:58 +0100 Subject: iwyu: Fix VisualStudio specific issues --- Source/bindexplib.cxx | 3 +-- Source/bindexplib.h | 5 +++-- Source/cmCallVisualStudioMacro.cxx | 2 ++ Source/cmCallVisualStudioMacro.h | 2 +- Source/cmGlobalVisualStudio10Generator.cxx | 3 +-- Source/cmGlobalVisualStudio11Generator.cxx | 1 + Source/cmGlobalVisualStudio11Generator.h | 11 +++++++++++ Source/cmGlobalVisualStudio12Generator.cxx | 1 + Source/cmGlobalVisualStudio12Generator.h | 9 +++++++++ Source/cmGlobalVisualStudio14Generator.cxx | 1 + Source/cmGlobalVisualStudio14Generator.h | 9 +++++++++ Source/cmGlobalVisualStudio15Generator.cxx | 1 + Source/cmGlobalVisualStudio15Generator.h | 8 ++++++++ Source/cmGlobalVisualStudio71Generator.cxx | 3 +-- Source/cmGlobalVisualStudio8Generator.cxx | 3 +-- Source/cmGlobalVisualStudio9Generator.cxx | 3 +-- Source/cmGlobalVisualStudioGenerator.cxx | 4 +++- Source/cmGlobalVisualStudioGenerator.h | 15 +++++++++++++++ Source/cmIDEOptions.cxx | 7 +++++-- Source/cmIDEOptions.h | 6 ++++-- Source/cmLocalVisualStudio10Generator.h | 7 +++++++ Source/cmLocalVisualStudio7Generator.h | 17 ++++++++++++----- Source/cmLocalVisualStudioGenerator.h | 16 +++++++++++----- Source/cmVisualStudio10TargetGenerator.h | 19 +++++++++++-------- Source/cmVisualStudio10ToolsetOptions.h | 4 +++- Source/cmVisualStudioGeneratorOptions.cxx | 1 + Source/cmVisualStudioGeneratorOptions.h | 10 +++++++++- Source/cmVisualStudioSlnData.h | 4 +++- Source/cmVisualStudioSlnParser.h | 6 ++++-- Source/cmVisualStudioWCEPlatformParser.h | 5 ++++- 30 files changed, 144 insertions(+), 42 deletions(-) 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 #include #include -#include -#include #include 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 -#include "cmStandardIncludes.h" - +#include +#include +#include class bindexplib { 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 + #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 -#include "cmStandardIncludes.h" +#include /** \class cmCallVisualStudioMacro * \brief Control class for communicating with CMake's Visual Studio macros 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 + +#include +#include +#include + #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 + +#include +#include + #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 + +#include +#include + #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 + +#include +#include + #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 +#include + #include "cmAlgorithms.h" #include "cmCallVisualStudioMacro.h" #include "cmGeneratedFileStream.h" @@ -12,7 +15,6 @@ #include "cmSourceFile.h" #include "cmState.h" #include "cmTarget.h" -#include 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 + +#include +#include +#include +#include +#include + #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/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 +#include +#include + +#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 -#include "cmStandardIncludes.h" +#include +#include +#include -#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 + +#include + #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 + +#include +#include +#include +#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 -#include "cmGlobalVisualStudioGenerator.h" +#include +#include +#include -#include +#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/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 1fa844c..a4e3adb 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -5,19 +5,22 @@ #include -#include "cmStandardIncludes.h" +#include +#include +#include +#include +#include -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 + +#include 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 +#include +#include + +#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 -#include "cmStandardIncludes.h" +#include +#include +#include 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 -#include "cmStandardIncludes.h" - #include +#include +#include +#include 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 -#include "cmStandardIncludes.h" +#include +#include +#include +#include #include "cmXMLParser.h" -- cgit v0.12 From d0c14dfb3694d076b8115d64dc317fd686b90aa2 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Fri, 25 Nov 2016 23:21:20 +0100 Subject: avoid including cmStandardIncludes.h --- Source/CPack/WiX/cmCPackWIXGenerator.cxx | 1 + Source/CPack/WiX/cmWIXRichTextFormatWriter.h | 3 +-- Source/cmGhsMultiGpj.h | 2 -- Source/cmGlobalGhsMultiGenerator.cxx | 6 ++++-- 4 files changed, 6 insertions(+), 6 deletions(-) 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 #include +#include #include #include #include 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 -#include "cmStandardIncludes.h" - #include +#include /** \class cmWIXRichtTextFormatWriter * \brief Helper class to generate Rich Text Format (RTF) documents 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 -#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 + +#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 -#include const char* cmGlobalGhsMultiGenerator::FILE_EXTENSION = ".gpj"; const char* cmGlobalGhsMultiGenerator::DEFAULT_MAKE_PROGRAM = "gbuild"; -- cgit v0.12