From 67c75064d14652719eb6fe4869524d48921f8c62 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 11 Nov 2021 23:22:19 +0900 Subject: Source: Fix IWYU warnings in Xcode generators --- Source/cmGlobalXCodeGenerator.cxx | 13 ++++++++++--- Source/cmGlobalXCodeGenerator.h | 2 ++ Source/cmLocalXCodeGenerator.cxx | 8 ++++++-- Source/cmLocalXCodeGenerator.h | 1 + Source/cmXCode21Object.h | 1 + Source/cmXCodeObject.cxx | 2 -- Source/cmXCodeObject.h | 1 + Source/cmXCodeScheme.cxx | 10 ++++++++-- Source/cmXCodeScheme.h | 9 +++++---- 9 files changed, 34 insertions(+), 13 deletions(-) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 6fa15e6..5b99945 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -17,36 +18,42 @@ #include "cmsys/RegularExpression.hxx" -#include "cmCMakePath.h" #include "cmComputeLinkInformation.h" #include "cmCryptoHash.h" #include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" #include "cmCustomCommandLines.h" +#include "cmCustomCommandTypes.h" #include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmGlobalGeneratorFactory.h" +#include "cmLinkItem.h" +#include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmLocalXCodeGenerator.h" #include "cmMakefile.h" #include "cmMessageType.h" #include "cmOutputConverter.h" +#include "cmPolicies.h" #include "cmSourceFile.h" +#include "cmSourceFileLocation.h" +#include "cmSourceFileLocationKind.h" #include "cmSourceGroup.h" #include "cmState.h" +#include "cmStateSnapshot.h" #include "cmStateTypes.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" #include "cmTarget.h" +#include "cmTargetDepend.h" #include "cmXCode21Object.h" #include "cmXCodeObject.h" #include "cmXCodeScheme.h" +#include "cmXMLWriter.h" #include "cmake.h" -struct cmLinkImplementation; - #if !defined(CMAKE_BOOTSTRAP) && defined(__APPLE__) # include # if !TARGET_OS_IPHONE diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 910c946..5917db3 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -11,10 +11,12 @@ #include #include +#include #include #include "cmGlobalGenerator.h" #include "cmTransformDepfile.h" +#include "cmValue.h" #include "cmXCodeObject.h" class cmCustomCommand; diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx index 3b4e3a8..dd064a1 100644 --- a/Source/cmLocalXCodeGenerator.cxx +++ b/Source/cmLocalXCodeGenerator.cxx @@ -2,14 +2,18 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmLocalXCodeGenerator.h" +#include +#include +#include + #include "cmGeneratorTarget.h" #include "cmGlobalXCodeGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmStringAlgorithms.h" +#include "cmSystemTools.h" -class cmGeneratorTarget; class cmGlobalGenerator; -class cmMakefile; cmLocalXCodeGenerator::cmLocalXCodeGenerator(cmGlobalGenerator* gg, cmMakefile* mf) diff --git a/Source/cmLocalXCodeGenerator.h b/Source/cmLocalXCodeGenerator.h index 5f72f6d..ff6b356 100644 --- a/Source/cmLocalXCodeGenerator.h +++ b/Source/cmLocalXCodeGenerator.h @@ -4,6 +4,7 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include #include #include diff --git a/Source/cmXCode21Object.h b/Source/cmXCode21Object.h index f3fc438..0c7f22b 100644 --- a/Source/cmXCode21Object.h +++ b/Source/cmXCode21Object.h @@ -6,6 +6,7 @@ #include #include +#include #include #include "cmXCodeObject.h" diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx index d5c5275..c817980 100644 --- a/Source/cmXCodeObject.cxx +++ b/Source/cmXCodeObject.cxx @@ -6,8 +6,6 @@ #include -#include "cmSystemTools.h" - const char* cmXCodeObject::PBXTypeNames[] = { /* clang-format needs this comment to break after the opening brace */ "PBXGroup", diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h index dd5e86e..389fb62 100644 --- a/Source/cmXCodeObject.h +++ b/Source/cmXCodeObject.h @@ -5,6 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include +#include #include #include #include diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx index 2755d2f..adc500a 100644 --- a/Source/cmXCodeScheme.cxx +++ b/Source/cmXCodeScheme.cxx @@ -3,7 +3,6 @@ #include "cmXCodeScheme.h" #include -#include #include #include @@ -14,7 +13,14 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" -#include "cmXMLSafe.h" +#include "cmStateTypes.h" +#include "cmStringAlgorithms.h" +#include "cmSystemTools.h" +#include "cmValue.h" +#include "cmXCodeObject.h" +#include "cmXMLWriter.h" + +class cmLocalGenerator; cmXCodeScheme::cmXCodeScheme(cmLocalGenerator* lg, cmXCodeObject* xcObj, TestObjects tests, diff --git a/Source/cmXCodeScheme.h b/Source/cmXCodeScheme.h index 11f043e..07fdedb 100644 --- a/Source/cmXCodeScheme.h +++ b/Source/cmXCodeScheme.h @@ -4,12 +4,13 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include +#include #include -#include "cmGlobalXCodeGenerator.h" -#include "cmSystemTools.h" -#include "cmXCodeObject.h" -#include "cmXMLWriter.h" +class cmLocalGenerator; +class cmXCodeObject; +class cmXMLWriter; /** \class cmXCodeScheme * \brief Write shared schemes for native targets in Xcode project. -- cgit v0.12