diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-09-01 20:59:28 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-03 08:04:56 -0400 |
commit | efed6468eda950644014ccfada85300710e05009 (patch) | |
tree | 34373674a96941d95ee8443e34936ff66da8f56a /Source | |
parent | bd3d0eafbb362fbc0f140c228da85791a473e44e (diff) | |
download | cmake-efed6468eda950644014ccfada85300710e05009.tar.gz |
fix a load of include-what-you-use violations
Diffstat (limited to 'Source')
165 files changed, 1102 insertions, 438 deletions
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index ee3389cae8..5a8a5bea26 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -27,6 +27,8 @@ #include <cmsys/Encoding.hxx> #include <cmsys/SystemTools.hxx> +#include "cmSystemTools.h" // IWYU pragma: keep + static const char* cmDocumentationName[][2] = { { 0, " cmake-gui - CMake GUI." }, { 0, 0 } }; diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index b4ddc3e8dc..6523e3e152 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -9,52 +9,54 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include "cmCurl.h" // include before anything that includes windows.h - #include "cmCTest.h" #include "cmAlgorithms.h" -#include "cmCTestCommand.h" -#include "cmCTestStartCommand.h" -#include "cmDynamicLoader.h" -#include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmMakefile.h" -#include "cmState.h" -#include "cmVersionMacros.h" -#include "cmXMLWriter.h" -#include "cmake.h" -#include <cmsys/Base64.h> -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/SystemInformation.hxx> - #include "cmCTestBuildAndTestHandler.h" #include "cmCTestBuildHandler.h" #include "cmCTestConfigureHandler.h" #include "cmCTestCoverageHandler.h" +#include "cmCTestGenericHandler.h" #include "cmCTestMemCheckHandler.h" #include "cmCTestScriptHandler.h" +#include "cmCTestStartCommand.h" #include "cmCTestSubmitHandler.h" #include "cmCTestTestHandler.h" #include "cmCTestUpdateHandler.h" #include "cmCTestUploadHandler.h" - +#include "cmCurl.h" +#include "cmDynamicLoader.h" +#include "cmGeneratedFileStream.h" +#include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmState.h" +#include "cmSystemTools.h" #include "cmVersion.h" +#include "cmVersionConfig.h" +#include "cmXMLWriter.h" +#include "cmake.h" +#include <cm_auto_ptr.hxx> +#include <cm_curl.h> +#include <cm_zlib.h> +#include <cmsys/Base64.h> +#include <cmsys/Directory.hxx> +#include <cmsys/FStream.hxx> #include <cmsys/Glob.hxx> #include <cmsys/Process.h> -#include <cmsys/RegularExpression.hxx> - +#include <cmsys/String.hxx> +#include <cmsys/SystemInformation.hxx> #include <ctype.h> -#include <float.h> -#include <math.h> +#include <iostream> +#include <map> +#include <sstream> +#include <stdio.h> #include <stdlib.h> - -#include <cm_auto_ptr.hxx> - -#include <cm_zlib.h> -#include <cmsys/Base64.h> +#include <string.h> +#include <string> +#include <time.h> +#include <utility> +#include <vector> #if defined(__BEOS__) || defined(__HAIKU__) #include <be/kernel/OS.h> /* disable_debugger() API. */ diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 9d661d45e9..a73cd83b50 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -15,18 +15,18 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - -#include "cmListFileCache.h" +#include <cmsys/String.hxx> +#include <map> +#include <set> +#include <sstream> +#include <string> #include <time.h> +#include <vector> -class cmake; -class cmMakefile; class cmCTestGenericHandler; -class cmGeneratedFileStream; -class cmCTestCommand; -class cmCTestScriptHandler; class cmCTestStartCommand; +class cmGeneratedFileStream; +class cmMakefile; class cmXMLWriter; #define cmCTestLog(ctSelf, logType, msg) \ diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 68111a004d..6a2dfe8f64 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -11,12 +11,18 @@ ============================================================================*/ #include "cmCommandArgumentParserHelper.h" +#include <cm_kwiml.h> + +#include "cmCommandArgumentLexer.h" #include "cmMakefile.h" -#include "cmOutputConverter.h" #include "cmState.h" #include "cmSystemTools.h" +#include "cmake.h" -#include "cmCommandArgumentLexer.h" +#include <cmConfigure.h> +#include <iostream> +#include <sstream> +#include <string.h> int cmCommandArgument_yyparse(yyscan_t yyscanner); // diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h index 1040ad3b8b..6faf12bc9d 100644 --- a/Source/cmCommandArgumentParserHelper.h +++ b/Source/cmCommandArgumentParserHelper.h @@ -12,9 +12,10 @@ #ifndef cmCommandArgumentParserHelper_h #define cmCommandArgumentParserHelper_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include <string> +#include <vector> #define YYSTYPE cmCommandArgumentParserHelper::ParserType #define YYSTYPE_IS_DECLARED diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index d7532b37a1..94f03e8511 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -14,6 +14,7 @@ #include "cmAlgorithms.h" #include "cmOutputConverter.h" +#include "cmSystemTools.h" static std::string const keyAND = "AND"; static std::string const keyCOMMAND = "COMMAND"; diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx index 8e2d87e36a..a3d3dd52cf 100644 --- a/Source/cmCryptoHash.cxx +++ b/Source/cmCryptoHash.cxx @@ -12,8 +12,10 @@ #include "cmCryptoHash.h" #include "cm_sha2.h" + #include <cmsys/FStream.hxx> #include <cmsys/MD5.h> +#include <string.h> CM_AUTO_PTR<cmCryptoHash> cmCryptoHash::New(const char* algo) { diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h index c51393d8b0..0be2918eee 100644 --- a/Source/cmCryptoHash.h +++ b/Source/cmCryptoHash.h @@ -14,9 +14,9 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - #include <cm_auto_ptr.hxx> +#include <string> +#include <vector> /** * @brief Abstract base class for cryptographic hash generators diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx index 5bc4f9181e..eec773fdb6 100644 --- a/Source/cmCurl.cxx +++ b/Source/cmCurl.cxx @@ -11,7 +11,13 @@ ============================================================================*/ #include "cmCurl.h" +#include "cmThirdParty.h" + +#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \ + !defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH) +#define CMAKE_FIND_CAFILE #include "cmSystemTools.h" +#endif // curl versions before 7.21.5 did not provide this error code #if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x071505 @@ -32,8 +38,7 @@ std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile) ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile); check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: "); } -#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \ - !defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH) +#ifdef CMAKE_FIND_CAFILE #define CMAKE_CAFILE_FEDORA "/etc/pki/tls/certs/ca-bundle.crt" else if (cmSystemTools::FileExists(CMAKE_CAFILE_FEDORA, true)) { ::CURLcode res = diff --git a/Source/cmCurl.h b/Source/cmCurl.h index c3a20533d5..6434f501a9 100644 --- a/Source/cmCurl.h +++ b/Source/cmCurl.h @@ -14,9 +14,8 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - -#include "cm_curl.h" +#include <cm_curl.h> +#include <string> std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile = CM_NULLPTR); diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx index eaa49b04da..89a04d1479 100644 --- a/Source/cmCustomCommand.cxx +++ b/Source/cmCustomCommand.cxx @@ -13,7 +13,7 @@ #include "cmMakefile.h" -#include <cm_auto_ptr.hxx> +#include <cmConfigure.h> cmCustomCommand::cmCustomCommand() : Backtrace() diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h index 152b3b9043..b855bb9a11 100644 --- a/Source/cmCustomCommand.h +++ b/Source/cmCustomCommand.h @@ -12,11 +12,15 @@ #ifndef cmCustomCommand_h #define cmCustomCommand_h -#include <cmConfigure.h> - -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep +#include "cmCustomCommandLines.h" #include "cmListFileCache.h" + +#include <string> +#include <utility> +#include <vector> + class cmMakefile; /** \class cmCustomCommand diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 6165bcf117..8b8579b617 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -12,10 +12,17 @@ #include "cmCustomCommandGenerator.h" #include "cmCustomCommand.h" +#include "cmCustomCommandLines.h" #include "cmGeneratorExpression.h" +#include "cmGeneratorTarget.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" + +#include <cmConfigure.h> cmCustomCommandGenerator::cmCustomCommandGenerator(cmCustomCommand const& cc, const std::string& config, diff --git a/Source/cmCustomCommandGenerator.h b/Source/cmCustomCommandGenerator.h index 66644d6f05..f4cd9fda82 100644 --- a/Source/cmCustomCommandGenerator.h +++ b/Source/cmCustomCommandGenerator.h @@ -12,13 +12,14 @@ #ifndef cmCustomCommandGenerator_h #define cmCustomCommandGenerator_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include <string> +#include <vector> class cmCustomCommand; -class cmLocalGenerator; class cmGeneratorExpression; +class cmLocalGenerator; class cmCustomCommandGenerator { diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx index e0fb59b7dd..fecc4887c1 100644 --- a/Source/cmDefinitions.cxx +++ b/Source/cmDefinitions.cxx @@ -12,6 +12,8 @@ #include "cmDefinitions.h" #include <assert.h> +#include <set> +#include <utility> cmDefinitions::Def cmDefinitions::NoDef; diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index f22de79572..d1423ec761 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -14,20 +14,21 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - #include "cmLinkedTree.h" +#include <string> +#include <vector> + #if defined(CMAKE_BUILD_WITH_CMAKE) #ifdef CMake_HAVE_CXX_UNORDERED_MAP #include <unordered_map> #else #include "cmsys/hash_map.hxx" #endif +#else +#include <map> #endif -#include <list> - /** \class cmDefinitions * \brief Store a scope of variable definitions for CMake language. * diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index ce72eda03e..23ff3a478e 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -16,8 +16,11 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSystemTools.h" + #include <cmsys/FStream.hxx> +#include <sstream> #include <string.h> +#include <utility> cmDepends::cmDepends(cmLocalGenerator* lg, const char* targetDir) : CompileDirectory() diff --git a/Source/cmDepends.h b/Source/cmDepends.h index b9d47a67fc..5ed784db50 100644 --- a/Source/cmDepends.h +++ b/Source/cmDepends.h @@ -14,7 +14,12 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" +#include <iosfwd> +#include <map> +#include <set> +#include <stddef.h> +#include <string> +#include <vector> class cmFileTimeComparison; class cmLocalGenerator; diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index 928f7ec42a..fbbf42f655 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -15,10 +15,11 @@ #include "cmFileTimeComparison.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" #include "cmSystemTools.h" -#include <cmsys/FStream.hxx> -#include <ctype.h> // isspace +#include <cmsys/FStream.hxx> +#include <utility> #define INCLUDE_REGEX_LINE \ "^[ \t]*#[ \t]*(include|import)[ \t]*[<\"]([^\">]+)([\">])" diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h index bde07b745c..5606fb3073 100644 --- a/Source/cmDependsC.h +++ b/Source/cmDependsC.h @@ -12,10 +12,19 @@ #ifndef cmDependsC_h #define cmDependsC_h +#include <cmConfigure.h> + #include "cmDepends.h" #include <cmsys/RegularExpression.hxx> +#include <iosfwd> +#include <map> #include <queue> +#include <set> +#include <string> +#include <vector> + +class cmLocalGenerator; /** \class cmDependsC * \brief Dependency scanner for C and C++ object files. diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 8c0acce5ec..1eece98ad7 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -11,14 +11,20 @@ ============================================================================*/ #include "cmDependsFortran.h" +#include "cmFortranParser.h" /* Interface to parser object. */ #include "cmGeneratedFileStream.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" #include "cmSystemTools.h" -#include "cmFortranParser.h" /* Interface to parser object. */ #include <assert.h> #include <cmsys/FStream.hxx> +#include <iostream> +#include <map> +#include <stdlib.h> +#include <string.h> +#include <utility> // TODO: Test compiler for the case of the mod file. Some always // use lower case and some always use upper case. I do not know if any diff --git a/Source/cmDependsFortran.h b/Source/cmDependsFortran.h index f4385ebb9c..b6de46ffb7 100644 --- a/Source/cmDependsFortran.h +++ b/Source/cmDependsFortran.h @@ -12,10 +12,17 @@ #ifndef cmFortran_h #define cmFortran_h +#include <cmConfigure.h> +#include <iosfwd> +#include <set> +#include <string> +#include <vector> + #include "cmDepends.h" class cmDependsFortranInternals; class cmFortranSourceInfo; +class cmLocalGenerator; /** \class cmDependsFortran * \brief Dependency scanner for Fortran object files. diff --git a/Source/cmDependsJava.cxx b/Source/cmDependsJava.cxx index a9130e67bc..18bc695747 100644 --- a/Source/cmDependsJava.cxx +++ b/Source/cmDependsJava.cxx @@ -11,7 +11,6 @@ ============================================================================*/ #include "cmDependsJava.h" -#include "cmDependsJavaParserHelper.h" #include "cmSystemTools.h" cmDependsJava::cmDependsJava() diff --git a/Source/cmDependsJava.h b/Source/cmDependsJava.h index 5bb3039d04..95265c568b 100644 --- a/Source/cmDependsJava.h +++ b/Source/cmDependsJava.h @@ -12,8 +12,15 @@ #ifndef cmDependsJava_h #define cmDependsJava_h +#include <cmConfigure.h> + #include "cmDepends.h" +#include <iosfwd> +#include <map> +#include <set> +#include <string> + /** \class cmDependsJava * \brief Dependency scanner for Java class files. */ diff --git a/Source/cmDependsJavaParserHelper.cxx b/Source/cmDependsJavaParserHelper.cxx index 79c4669194..8d77ca62d4 100644 --- a/Source/cmDependsJavaParserHelper.cxx +++ b/Source/cmDependsJavaParserHelper.cxx @@ -11,9 +11,16 @@ ============================================================================*/ #include "cmDependsJavaParserHelper.h" +#include <cmConfigure.h> + #include "cmDependsJavaLexer.h" #include "cmSystemTools.h" + #include <cmsys/FStream.hxx> +#include <iostream> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> int cmDependsJava_yyparse(yyscan_t yyscanner); diff --git a/Source/cmDependsJavaParserHelper.h b/Source/cmDependsJavaParserHelper.h index 377d5846c0..731bbccfcd 100644 --- a/Source/cmDependsJavaParserHelper.h +++ b/Source/cmDependsJavaParserHelper.h @@ -12,9 +12,10 @@ #ifndef cmDependsJavaParserHelper_h #define cmDependsJavaParserHelper_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include <string> +#include <vector> #define YYSTYPE cmDependsJavaParserHelper::ParserType #define YYSTYPE_IS_DECLARED diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 5516cf12e5..13736b9122 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -12,17 +12,18 @@ #include "cmDocumentation.h" #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" +#include "cmDocumentationSection.h" #include "cmRST.h" #include "cmSystemTools.h" #include "cmVersion.h" -#include <cmsys/Directory.hxx> +#include <algorithm> #include <cmsys/FStream.hxx> #include <cmsys/Glob.hxx> - #include <ctype.h> - -#include <algorithm> +#include <string.h> +#include <utility> static const char* cmDocumentationStandardOptions[][2] = { { "--help,-help,-usage,-h,-H,/?", "Print usage information and exit." }, diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h index c82e1d4669..7661eb72d5 100644 --- a/Source/cmDocumentation.h +++ b/Source/cmDocumentation.h @@ -14,15 +14,15 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - #include "cmDocumentationFormatter.h" -#include "cmDocumentationSection.h" -#include "cmake.h" -namespace cmsys { -class Directory; -} +#include <iosfwd> +#include <map> +#include <string> +#include <vector> + +class cmDocumentationSection; +struct cmDocumentationEntry; /** Class to generate documentation. */ class cmDocumentation : public cmDocumentationEnums diff --git a/Source/cmDocumentationFormatter.cxx b/Source/cmDocumentationFormatter.cxx index 4816bb971d..5a718a2fb8 100644 --- a/Source/cmDocumentationFormatter.cxx +++ b/Source/cmDocumentationFormatter.cxx @@ -11,8 +11,14 @@ ============================================================================*/ #include "cmDocumentationFormatter.h" +#include "cmDocumentationEntry.h" #include "cmDocumentationSection.h" +#include <ostream> +#include <string.h> +#include <string> +#include <vector> + cmDocumentationFormatter::cmDocumentationFormatter() : TextWidth(77) , TextIndent("") diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h index 7a931206b3..09fb20ba3d 100644 --- a/Source/cmDocumentationFormatter.h +++ b/Source/cmDocumentationFormatter.h @@ -12,9 +12,9 @@ #ifndef _cmDocumentationFormatter_h #define _cmDocumentationFormatter_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include <iosfwd> /** This is just a helper class to make it build with MSVC 6.0. Actually the enums and internal classes could directly go into diff --git a/Source/cmDocumentationSection.h b/Source/cmDocumentationSection.h index 161a731bd7..1d41070f6a 100644 --- a/Source/cmDocumentationSection.h +++ b/Source/cmDocumentationSection.h @@ -12,7 +12,12 @@ #ifndef _cmDocumentationSection_h #define _cmDocumentationSection_h -#include "cmDocumentationFormatter.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#include "cmDocumentationEntry.h" + +#include <string> +#include <vector> // Low-level interface for custom documents: /** Internal class representing a section of the documentation. diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx index f6841ad543..762feee7cf 100644 --- a/Source/cmDynamicLoader.cxx +++ b/Source/cmDynamicLoader.cxx @@ -11,6 +11,13 @@ ============================================================================*/ #include "cmDynamicLoader.h" +#include <cmConfigure.h> + +#include <cmsys/DynamicLoader.hxx> +#include <map> +#include <string> +#include <utility> + class cmDynamicLoaderCache { public: diff --git a/Source/cmDynamicLoader.h b/Source/cmDynamicLoader.h index d9b89905f1..4f6ade5bca 100644 --- a/Source/cmDynamicLoader.h +++ b/Source/cmDynamicLoader.h @@ -17,9 +17,7 @@ #ifndef cmDynamicLoader_h #define cmDynamicLoader_h -#include <cmConfigure.h> - -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep #include <cmsys/DynamicLoader.hxx> diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 150593bfe1..6fff984dd4 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -9,12 +9,16 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include "cmStandardIncludes.h" // to get CMAKE_USE_ELF_PARSER first - #include "cmELF.h" #include <cm_auto_ptr.hxx> +#include <cm_kwiml.h> #include <cmsys/FStream.hxx> +#include <map> +#include <sstream> +#include <stddef.h> +#include <utility> +#include <vector> // Include the ELF format information system header. #if defined(__OpenBSD__) diff --git a/Source/cmELF.h b/Source/cmELF.h index 80832ad417..a4c34566e2 100644 --- a/Source/cmELF.h +++ b/Source/cmELF.h @@ -12,6 +12,11 @@ #ifndef cmELF_h #define cmELF_h +#include <cmConfigure.h> + +#include <iosfwd> +#include <string> + #if !defined(CMAKE_USE_ELF_PARSER) #error "This file may be included only if CMAKE_USE_ELF_PARSER is enabled." #endif diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index 390477af38..8f4dfd874a 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -12,9 +12,23 @@ #include "cmExportBuildFileGenerator.h" #include "cmExportSet.h" +#include "cmGeneratorExpression.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTargetExport.h" +#include "cmake.h" + +#include <algorithm> +#include <map> +#include <set> +#include <sstream> +#include <utility> cmExportBuildFileGenerator::cmExportBuildFileGenerator() { diff --git a/Source/cmExportBuildFileGenerator.h b/Source/cmExportBuildFileGenerator.h index 417e8c928c..990824f364 100644 --- a/Source/cmExportBuildFileGenerator.h +++ b/Source/cmExportBuildFileGenerator.h @@ -12,10 +12,18 @@ #ifndef cmExportBuildFileGenerator_h #define cmExportBuildFileGenerator_h +#include <cmConfigure.h> + #include "cmExportFileGenerator.h" -#include "cmListFileCache.h" + +#include <iosfwd> +#include <string> +#include <vector> class cmExportSet; +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmLocalGenerator; /** \class cmExportBuildFileGenerator * \brief Generate a file exporting targets from a build tree. diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 7f01196c80..23c77d9551 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -13,20 +13,25 @@ #include "cmAlgorithms.h" #include "cmComputeLinkInformation.h" -#include "cmExportSet.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmInstallExportGenerator.h" +#include "cmGeneratorTarget.h" +#include "cmLinkItem.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmPolicies.h" +#include "cmState.h" #include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTargetExport.h" -#include "cmVersion.h" +#include "cmake.h" #include <assert.h> #include <cm_auto_ptr.hxx> #include <cmsys/FStream.hxx> +#include <sstream> +#include <string.h> +#include <utility> static std::string cmExportFileGeneratorEscape(std::string const& str) { diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index 9c96015a67..354994a148 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -12,11 +12,19 @@ #ifndef cmExportFileGenerator_h #define cmExportFileGenerator_h -#include "cmCommand.h" -#include "cmGeneratorExpression.h" +#include <cmConfigure.h> // IWYU pragma: keep +#include "cmGeneratorExpression.h" #include "cmVersion.h" -#include "cmVersionMacros.h" +#include "cmVersionConfig.h" + +#include <iosfwd> +#include <map> +#include <set> +#include <string> +#include <vector> + +class cmGeneratorTarget; #define STRINGIFY_HELPER(X) #X #define STRINGIFY(X) STRINGIFY_HELPER(X) diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 77471574c3..ceba69ac8b 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -15,12 +15,22 @@ #include "cmExportSet.h" #include "cmExportSetMap.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorExpression.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmInstallExportGenerator.h" #include "cmInstallTargetGenerator.h" #include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTargetExport.h" +#include <sstream> +#include <utility> + cmExportInstallFileGenerator::cmExportInstallFileGenerator( cmInstallExportGenerator* iegen) : IEGen(iegen) diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index 68960dbe05..c693dc174b 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -12,8 +12,18 @@ #ifndef cmExportInstallFileGenerator_h #define cmExportInstallFileGenerator_h +#include <cmConfigure.h> + #include "cmExportFileGenerator.h" +#include <iosfwd> +#include <map> +#include <set> +#include <string> +#include <vector> + +class cmGeneratorTarget; +class cmGlobalGenerator; class cmInstallExportGenerator; class cmInstallTargetGenerator; diff --git a/Source/cmExportSet.h b/Source/cmExportSet.h index 49f2cac3ea..4f3c9d8ebb 100644 --- a/Source/cmExportSet.h +++ b/Source/cmExportSet.h @@ -12,11 +12,14 @@ #ifndef cmExportSet_h #define cmExportSet_h -#include "cmSystemTools.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#include <string> +#include <vector> -class cmTargetExport; class cmInstallExportGenerator; class cmLocalGenerator; +class cmTargetExport; /// A set of targets that were installed with the same EXPORT parameter. class cmExportSet diff --git a/Source/cmExportSetMap.cxx b/Source/cmExportSetMap.cxx index ac1c66edb0..42fb781c5a 100644 --- a/Source/cmExportSetMap.cxx +++ b/Source/cmExportSetMap.cxx @@ -15,6 +15,8 @@ #include "cmAlgorithms.h" #include "cmExportSet.h" +#include <utility> + cmExportSet* cmExportSetMap::operator[](const std::string& name) { std::map<std::string, cmExportSet*>::iterator it = this->find(name); diff --git a/Source/cmExportSetMap.h b/Source/cmExportSetMap.h index d2954e3358..c3a55bab7c 100644 --- a/Source/cmExportSetMap.h +++ b/Source/cmExportSetMap.h @@ -12,7 +12,10 @@ #ifndef cmExportSetMap_h #define cmExportSetMap_h -#include "cmSystemTools.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#include <map> +#include <string> class cmExportSet; diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index 2916e6b2d1..a0aefb8d0f 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -12,10 +12,19 @@ #include "cmExportTryCompileFileGenerator.h" -#include "cmGeneratedFileStream.h" +#include "cmGeneratorExpression.h" #include "cmGeneratorExpressionDAGChecker.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cm_auto_ptr.hxx" + +#include <map> +#include <utility> cmExportTryCompileFileGenerator::cmExportTryCompileFileGenerator( cmGlobalGenerator* gg, const std::vector<std::string>& targets, diff --git a/Source/cmExportTryCompileFileGenerator.h b/Source/cmExportTryCompileFileGenerator.h index 1d13711dab..27d5b3c1d7 100644 --- a/Source/cmExportTryCompileFileGenerator.h +++ b/Source/cmExportTryCompileFileGenerator.h @@ -12,10 +12,18 @@ #ifndef cmExportTryCompileFileGenerator_h #define cmExportTryCompileFileGenerator_h +#include <cmConfigure.h> + #include "cmExportFileGenerator.h" -class cmInstallExportGenerator; -class cmInstallTargetGenerator; +#include <iosfwd> +#include <set> +#include <string> +#include <vector> + +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmMakefile; class cmExportTryCompileFileGenerator : public cmExportFileGenerator { diff --git a/Source/cmExprParserHelper.cxx b/Source/cmExprParserHelper.cxx index 1a101ab162..3a76367bd5 100644 --- a/Source/cmExprParserHelper.cxx +++ b/Source/cmExprParserHelper.cxx @@ -11,11 +11,13 @@ ============================================================================*/ #include "cmExprParserHelper.h" -#include "cmMakefile.h" -#include "cmSystemTools.h" +#include <cmConfigure.h> #include "cmExprLexer.h" +#include <iostream> +#include <sstream> + int cmExpr_yyparse(yyscan_t yyscanner); // cmExprParserHelper::cmExprParserHelper() diff --git a/Source/cmExprParserHelper.h b/Source/cmExprParserHelper.h index 8e3d9964ce..74024840b9 100644 --- a/Source/cmExprParserHelper.h +++ b/Source/cmExprParserHelper.h @@ -12,9 +12,10 @@ #ifndef cmExprParserHelper_h #define cmExprParserHelper_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include <string> +#include <vector> #define YYSTYPE cmExprParserHelper::ParserType #define YYSTYPE_IS_DECLARED @@ -26,9 +27,6 @@ * * Finds dependencies for java file and list of outputs */ - -class cmMakefile; - class cmExprParserHelper { public: diff --git a/Source/cmExternalMakefileProjectGenerator.cxx b/Source/cmExternalMakefileProjectGenerator.cxx index b01290cf52..e4d124fc69 100644 --- a/Source/cmExternalMakefileProjectGenerator.cxx +++ b/Source/cmExternalMakefileProjectGenerator.cxx @@ -12,7 +12,7 @@ #include "cmExternalMakefileProjectGenerator.h" -#include <assert.h> +class cmMakefile; void cmExternalMakefileProjectGenerator::EnableLanguage( std::vector<std::string> const& /*unused*/, cmMakefile* /*unused*/, diff --git a/Source/cmExternalMakefileProjectGenerator.h b/Source/cmExternalMakefileProjectGenerator.h index 7d10ce1a52..b306f191f5 100644 --- a/Source/cmExternalMakefileProjectGenerator.h +++ b/Source/cmExternalMakefileProjectGenerator.h @@ -12,13 +12,13 @@ #ifndef cmExternalMakefileProjectGenerator_h #define cmExternalMakefileProjectGenerator_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" - -#include "cmDocumentation.h" +#include <string> +#include <vector> class cmGlobalGenerator; +class cmMakefile; /** \class cmExternalMakefileProjectGenerator * \brief Base class for generators for "External Makefile based IDE projects". diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 6eae26b5ea..7eb3a740fd 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -12,16 +12,23 @@ ============================================================================*/ #include "cmExtraCodeBlocksGenerator.h" +#include "cmAlgorithms.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" #include "cmake.h" -#include <cmsys/SystemTools.hxx> +#include <algorithm> +#include <map> +#include <ostream> +#include <string.h> +#include <utility> /* Some useful URLs: Homepage: diff --git a/Source/cmExtraCodeBlocksGenerator.h b/Source/cmExtraCodeBlocksGenerator.h index b39080cd28..179be30556 100644 --- a/Source/cmExtraCodeBlocksGenerator.h +++ b/Source/cmExtraCodeBlocksGenerator.h @@ -13,11 +13,16 @@ #ifndef cmExtraCodeBlocksGenerator_h #define cmExtraCodeBlocksGenerator_h +#include <cmConfigure.h> + #include "cmExternalMakefileProjectGenerator.h" +#include <string> +#include <vector> + +class cmGeneratorTarget; class cmLocalGenerator; class cmMakefile; -class cmGeneratorTarget; class cmXMLWriter; /** \class cmExtraCodeBlocksGenerator diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index eda6867427..a039f49e30 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -14,18 +14,22 @@ #include "cmExtraCodeLiteGenerator.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" +#include "cmXMLWriter.h" #include "cmake.h" -#include "cmStandardIncludes.h" -#include "cmXMLWriter.h" -#include <cmsys/Directory.hxx> #include <cmsys/SystemInformation.hxx> -#include <cmsys/SystemTools.hxx> +#include <map> +#include <set> +#include <sstream> +#include <string.h> +#include <utility> cmExtraCodeLiteGenerator::cmExtraCodeLiteGenerator() : cmExternalMakefileProjectGenerator() diff --git a/Source/cmExtraCodeLiteGenerator.h b/Source/cmExtraCodeLiteGenerator.h index e20e745f6c..f5765d85d0 100644 --- a/Source/cmExtraCodeLiteGenerator.h +++ b/Source/cmExtraCodeLiteGenerator.h @@ -14,9 +14,15 @@ #ifndef cmGlobalCodeLiteGenerator_h #define cmGlobalCodeLiteGenerator_h +#include <cmConfigure.h> + #include "cmExternalMakefileProjectGenerator.h" +#include <string> +#include <vector> + class cmLocalGenerator; +class cmMakefile; class cmExtraCodeLiteGenerator : public cmExternalMakefileProjectGenerator { diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 945ee40bc1..5a98e3482f 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -14,17 +14,26 @@ #include "cmExtraEclipseCDT4Generator.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorExpression.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" #include "cmSourceFile.h" +#include "cmSourceGroup.h" #include "cmState.h" -#include "cmTarget.h" +#include "cmSystemTools.h" #include "cmXMLWriter.h" +#include "cmake.h" -#include "cmSystemTools.h" +#include <algorithm> #include <assert.h> -#include <stdlib.h> +#include <cmsys/RegularExpression.hxx> +#include <map> +#include <sstream> +#include <stdio.h> +#include <utility> static void AppendAttribute(cmXMLWriter& xml, const char* keyval) { diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h index 4b585c3fc4..97b7bd7c01 100644 --- a/Source/cmExtraEclipseCDT4Generator.h +++ b/Source/cmExtraEclipseCDT4Generator.h @@ -14,11 +14,19 @@ #ifndef cmExtraEclipseCDT4Generator_h #define cmExtraEclipseCDT4Generator_h +#include <cmConfigure.h> + #include "cmExternalMakefileProjectGenerator.h" +#include <iosfwd> +#include <set> +#include <string> +#include <vector> + +class cmLocalGenerator; class cmMakefile; -class cmXMLWriter; class cmSourceGroup; +class cmXMLWriter; /** \class cmExtraEclipseCDT4Generator * \brief Write Eclipse project files for Makefile based projects diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index 4e72504713..36ab5b3b5f 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -13,14 +13,18 @@ #include "cmExtraKateGenerator.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" -#include "cmake.h" -#include <cmsys/SystemTools.hxx> +#include <ostream> +#include <set> +#include <string.h> +#include <vector> cmExtraKateGenerator::cmExtraKateGenerator() : cmExternalMakefileProjectGenerator() diff --git a/Source/cmExtraKateGenerator.h b/Source/cmExtraKateGenerator.h index 3d1605265c..518deada23 100644 --- a/Source/cmExtraKateGenerator.h +++ b/Source/cmExtraKateGenerator.h @@ -13,10 +13,14 @@ #ifndef cmExtraKateGenerator_h #define cmExtraKateGenerator_h +#include <cmConfigure.h> + #include "cmExternalMakefileProjectGenerator.h" -class cmLocalGenerator; +#include <string> + class cmGeneratedFileStream; +class cmLocalGenerator; /** \class cmExtraKateGenerator * \brief Write Kate project files for Makefile or ninja based projects diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 6e81ee1d71..8ee275ab3c 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -14,15 +14,18 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" -#include "cmGlobalUnixMakefileGenerator3.h" +#include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" -#include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" -#include "cmake.h" -#include <cmsys/SystemTools.hxx> +#include <cmsys/RegularExpression.hxx> +#include <ostream> +#include <set> +#include <string.h> +#include <utility> /* Sublime Text 2 Generator diff --git a/Source/cmExtraSublimeTextGenerator.h b/Source/cmExtraSublimeTextGenerator.h index c087825a99..ee2b25335b 100644 --- a/Source/cmExtraSublimeTextGenerator.h +++ b/Source/cmExtraSublimeTextGenerator.h @@ -13,13 +13,19 @@ #ifndef cmExtraSublimeTextGenerator_h #define cmExtraSublimeTextGenerator_h +#include <cmConfigure.h> + #include "cmExternalMakefileProjectGenerator.h" -#include "cmSourceFile.h" -class cmLocalGenerator; -class cmMakefile; +#include <map> +#include <string> +#include <vector> + class cmGeneratedFileStream; class cmGeneratorTarget; +class cmLocalGenerator; +class cmMakefile; +class cmSourceFile; /** \class cmExtraSublimeTextGenerator * \brief Write Sublime Text 2 project files for Makefile based projects diff --git a/Source/cmFileLock.h b/Source/cmFileLock.h index 38b90e1bf7..90bb1b292d 100644 --- a/Source/cmFileLock.h +++ b/Source/cmFileLock.h @@ -13,9 +13,9 @@ #ifndef cmFileLock_h #define cmFileLock_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include <string> #if defined(_WIN32) #include <windows.h> // HANDLE diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h index a3883dab46..d1883e7bbe 100644 --- a/Source/cmFileLockPool.h +++ b/Source/cmFileLockPool.h @@ -12,14 +12,13 @@ #ifndef cmFileLockPool_h #define cmFileLockPool_h -#include <cmConfigure.h> - -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep #include <list> +#include <string> -class cmFileLockResult; class cmFileLock; +class cmFileLockResult; class cmFileLockPool { diff --git a/Source/cmFileLockResult.cxx b/Source/cmFileLockResult.cxx index 090fe60f2e..de851bce95 100644 --- a/Source/cmFileLockResult.cxx +++ b/Source/cmFileLockResult.cxx @@ -13,6 +13,7 @@ #include "cmFileLockResult.h" #include <errno.h> +#include <string.h> cmFileLockResult cmFileLockResult::MakeOk() { diff --git a/Source/cmFileLockResult.h b/Source/cmFileLockResult.h index 10d4c13fd2..54b9626e66 100644 --- a/Source/cmFileLockResult.h +++ b/Source/cmFileLockResult.h @@ -13,9 +13,9 @@ #ifndef cmFileLockResult_h #define cmFileLockResult_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include <string> #if defined(_WIN32) #include <windows.h> // DWORD diff --git a/Source/cmFilePathUuid.cxx b/Source/cmFilePathUuid.cxx index f99646c797..b2def51901 100644 --- a/Source/cmFilePathUuid.cxx +++ b/Source/cmFilePathUuid.cxx @@ -17,6 +17,8 @@ #include "cmMakefile.h" #include "cmSystemTools.h" +#include <vector> + cmFilePathUuid::cmFilePathUuid(cmMakefile* makefile) { initParentDirs(makefile->GetCurrentSourceDirectory(), diff --git a/Source/cmFilePathUuid.h b/Source/cmFilePathUuid.h index 619c71b7d3..87cfcf8a7d 100644 --- a/Source/cmFilePathUuid.h +++ b/Source/cmFilePathUuid.h @@ -13,10 +13,9 @@ #ifndef cmFilePathUuid_h #define cmFilePathUuid_h -#include <cmConfigure.h> - -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep +#include <stddef.h> #include <string> #include <utility> diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx index 1360b44b4f..089d520987 100644 --- a/Source/cmFileTimeComparison.cxx +++ b/Source/cmFileTimeComparison.cxx @@ -11,6 +11,11 @@ ============================================================================*/ #include "cmFileTimeComparison.h" +#include <cmConfigure.h> +#include <string> +#include <time.h> +#include <utility> + // Use a hash table to avoid duplicate file time checks from disk. #if defined(CMAKE_BUILD_WITH_CMAKE) #ifdef CMake_HAVE_CXX_UNORDERED_MAP @@ -20,16 +25,14 @@ #endif #endif -#include <cmsys/Encoding.hxx> - // Use a platform-specific API to get file times efficiently. #if !defined(_WIN32) || defined(__CYGWIN__) -#define cmFileTimeComparison_Type struct stat -#include <ctype.h> #include <sys/stat.h> +#define cmFileTimeComparison_Type struct stat #else -#define cmFileTimeComparison_Type FILETIME +#include <cmsys/Encoding.hxx> #include <windows.h> +#define cmFileTimeComparison_Type FILETIME #endif class cmFileTimeComparisonInternal diff --git a/Source/cmFileTimeComparison.h b/Source/cmFileTimeComparison.h index 52e974ccc4..ea5c47ef23 100644 --- a/Source/cmFileTimeComparison.h +++ b/Source/cmFileTimeComparison.h @@ -12,9 +12,7 @@ #ifndef cmFileTimeComparison_h #define cmFileTimeComparison_h -#include <cmConfigure.h> - -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep class cmFileTimeComparisonInternal; diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx index 30a33b4bed..71edf9f7a1 100644 --- a/Source/cmFortranParserImpl.cxx +++ b/Source/cmFortranParserImpl.cxx @@ -10,9 +10,16 @@ See the License for more information. ============================================================================*/ #include "cmFortranParser.h" - +#include "cmFortranLexer.h" #include "cmSystemTools.h" + #include <assert.h> +#include <cmConfigure.h> +#include <set> +#include <stack> +#include <stdio.h> +#include <string> +#include <vector> bool cmFortranParser_s::FindIncludeFile(const char* dir, const char* includeName, diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index c35a1bcd0f..9a83070527 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -13,6 +13,8 @@ #include "cmSystemTools.h" +#include <stdio.h> + #if defined(CMAKE_BUILD_WITH_CMAKE) #include <cm_zlib.h> #endif diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h index e5e3320d03..4c4f26b2a2 100644 --- a/Source/cmGeneratedFileStream.h +++ b/Source/cmGeneratedFileStream.h @@ -14,9 +14,8 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - #include <cmsys/FStream.hxx> +#include <string> // This is the first base class of cmGeneratedFileStream. It will be // created before and destroyed after the ofstream portion and can diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 6cd643937f..b016d9e2ab 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -13,12 +13,14 @@ #include "assert.h" #include "cmAlgorithms.h" -#include "cmSystemTools.h" - -#include "cmGeneratorExpressionDAGChecker.h" +#include "cmGeneratorExpressionContext.h" #include "cmGeneratorExpressionEvaluator.h" #include "cmGeneratorExpressionLexer.h" #include "cmGeneratorExpressionParser.h" +#include "cmSystemTools.h" + +#include <cmsys/RegularExpression.hxx> +#include <utility> cmGeneratorExpression::cmGeneratorExpression( const cmListFileBacktrace& backtrace) diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 75e69b4bc2..24233b308f 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -15,22 +15,20 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - #include "cmListFileCache.h" #include <cm_auto_ptr.hxx> -#include <cmsys/RegularExpression.hxx> +#include <map> +#include <set> +#include <string> +#include <vector> +class cmCompiledGeneratorExpression; class cmGeneratorTarget; class cmLocalGenerator; -class cmListFileBacktrace; - -struct cmGeneratorExpressionEvaluator; struct cmGeneratorExpressionContext; struct cmGeneratorExpressionDAGChecker; - -class cmCompiledGeneratorExpression; +struct cmGeneratorExpressionEvaluator; /** \class cmGeneratorExpression * \brief Evaluate generate-time query expression syntax. diff --git a/Source/cmGeneratorExpressionContext.cxx b/Source/cmGeneratorExpressionContext.cxx index 8da6b50210..77289d1fd4 100644 --- a/Source/cmGeneratorExpressionContext.cxx +++ b/Source/cmGeneratorExpressionContext.cxx @@ -12,8 +12,6 @@ #include "cmGeneratorExpressionContext.h" -#include "cmGeneratorTarget.h" - cmGeneratorExpressionContext::cmGeneratorExpressionContext( cmLocalGenerator* lg, std::string const& config, bool quiet, cmGeneratorTarget const* headTarget, const cmGeneratorTarget* currentTarget, diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx index 045ded1b46..c47744347c 100644 --- a/Source/cmGeneratorExpressionDAGChecker.cxx +++ b/Source/cmGeneratorExpressionDAGChecker.cxx @@ -13,7 +13,15 @@ #include "cmGeneratorExpressionDAGChecker.h" #include "cmAlgorithms.h" +#include "cmGeneratorExpressionContext.h" +#include "cmGeneratorExpressionEvaluator.h" +#include "cmGeneratorTarget.h" #include "cmLocalGenerator.h" +#include "cmake.h" + +#include <sstream> +#include <string.h> +#include <utility> cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker( const cmListFileBacktrace& backtrace, const std::string& target, diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h index e522728f26..c6d728181a 100644 --- a/Source/cmGeneratorExpressionDAGChecker.h +++ b/Source/cmGeneratorExpressionDAGChecker.h @@ -14,9 +14,14 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" +#include "cmListFileCache.h" -#include "cmGeneratorExpressionEvaluator.h" +#include <map> +#include <set> +#include <string> + +struct GeneratorExpressionContent; +struct cmGeneratorExpressionContext; #define CM_SELECT_BOTH(F, A1, A2) F(A1, A2) #define CM_SELECT_FIRST(F, A1, A2) F(A1) diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx index c01c4fc6b2..aad9d1bfed 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.cxx +++ b/Source/cmGeneratorExpressionEvaluationFile.cxx @@ -14,12 +14,17 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" +#include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include <cmsys/FStream.hxx> +#include "cmSystemTools.h" +#include "cmake.h" -#include <assert.h> +#include <cmConfigure.h> +#include <cmsys/FStream.hxx> +#include <sstream> +#include <utility> cmGeneratorExpressionEvaluationFile::cmGeneratorExpressionEvaluationFile( const std::string& input, diff --git a/Source/cmGeneratorExpressionEvaluationFile.h b/Source/cmGeneratorExpressionEvaluationFile.h index 52ba2d8c29..3a668a22f6 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.h +++ b/Source/cmGeneratorExpressionEvaluationFile.h @@ -12,10 +12,15 @@ #ifndef cmGeneratorExpressionEvaluationFile_h #define cmGeneratorExpressionEvaluationFile_h +#include <cmConfigure.h> // IWYU pragma: keep + #include "cmGeneratorExpression.h" #include <cm_auto_ptr.hxx> +#include <map> +#include <string> #include <sys/types.h> +#include <vector> class cmLocalGenerator; diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index b4b74c5df8..d21ab25766 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -12,21 +12,12 @@ #include "cmGeneratorExpressionEvaluator.h" #include "cmAlgorithms.h" -#include "cmGeneratorExpression.h" -#include "cmGeneratorExpressionDAGChecker.h" -#include "cmGeneratorExpressionParser.h" -#include "cmGlobalGenerator.h" -#include "cmLocalGenerator.h" -#include "cmMakefile.h" -#include "cmSourceFile.h" - -#include <cmsys/String.h> - -#include <assert.h> -#include <errno.h> - +#include "cmGeneratorExpressionContext.h" #include "cmGeneratorExpressionNode.h" +#include <algorithm> +#include <sstream> + GeneratorExpressionContent::GeneratorExpressionContent( const char* startContent, size_t length) : StartContent(startContent) diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h index 58e732b921..5e8ebe0a5e 100644 --- a/Source/cmGeneratorExpressionEvaluator.h +++ b/Source/cmGeneratorExpressionEvaluator.h @@ -12,13 +12,13 @@ #ifndef cmGeneratorExpressionEvaluator_h #define cmGeneratorExpressionEvaluator_h -#include "cmGeneratorExpressionContext.h" - -#include "cmListFileCache.h" +#include <cmConfigure.h> +#include <stddef.h> #include <string> #include <vector> +struct cmGeneratorExpressionContext; struct cmGeneratorExpressionDAGChecker; struct cmGeneratorExpressionNode; diff --git a/Source/cmGeneratorExpressionLexer.h b/Source/cmGeneratorExpressionLexer.h index 6bd336bced..55836aca5a 100644 --- a/Source/cmGeneratorExpressionLexer.h +++ b/Source/cmGeneratorExpressionLexer.h @@ -12,10 +12,10 @@ #ifndef cmGeneratorExpressionLexer_h #define cmGeneratorExpressionLexer_h -#include <cmConfigure.h> - -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep +#include <stddef.h> +#include <string> #include <vector> struct cmGeneratorExpressionToken diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 12cf980190..44e9ce19aa 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -13,9 +13,36 @@ #include "cmGeneratorExpressionNode.h" #include "cmAlgorithms.h" +#include "cmGeneratorExpression.h" +#include "cmGeneratorExpressionContext.h" +#include "cmGeneratorExpressionDAGChecker.h" +#include "cmGeneratorExpressionEvaluator.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" +#include "cmLinkItem.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmPolicies.h" +#include "cmSourceFile.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" + +#include <algorithm> +#include <assert.h> +#include <cmConfigure.h> +#include <cmsys/RegularExpression.hxx> +#include <cmsys/String.h> +#include <errno.h> +#include <map> +#include <set> +#include <sstream> +#include <stdlib.h> +#include <string.h> +#include <utility> std::string cmGeneratorExpressionNode::EvaluateDependentExpression( std::string const& prop, cmLocalGenerator* lg, @@ -1455,13 +1482,12 @@ static const struct InstallPrefixNode : public cmGeneratorExpressionNode } installPrefixNode; -class ArtifactNameTag; +class ArtifactDirTag; class ArtifactLinkerTag; -class ArtifactSonameTag; -class ArtifactPdbTag; - +class ArtifactNameTag; class ArtifactPathTag; -class ArtifactDirTag; +class ArtifactPdbTag; +class ArtifactSonameTag; template <typename ArtifactT> struct TargetFilesystemArtifactResultCreator diff --git a/Source/cmGeneratorExpressionNode.h b/Source/cmGeneratorExpressionNode.h index 3ee57eb6d2..23f405b40c 100644 --- a/Source/cmGeneratorExpressionNode.h +++ b/Source/cmGeneratorExpressionNode.h @@ -12,20 +12,16 @@ #ifndef cmGeneratorExpressionNode_h #define cmGeneratorExpressionNode_h -#include "cmGeneratorExpression.h" +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmGeneratorExpressionDAGChecker.h" -#include "cmGeneratorExpressionEvaluator.h" -#include "cmGeneratorExpressionParser.h" -#include "cmLocalGenerator.h" -#include "cmSourceFile.h" +#include <string> +#include <vector> -#include <cmsys/String.h> - -#include <assert.h> -#include <errno.h> - -#include "cmListFileCache.h" +class cmGeneratorTarget; +class cmLocalGenerator; +struct GeneratorExpressionContent; +struct cmGeneratorExpressionContext; +struct cmGeneratorExpressionDAGChecker; struct cmGeneratorExpressionNode { diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx index f853f8d658..c753f9b9c8 100644 --- a/Source/cmGeneratorExpressionParser.cxx +++ b/Source/cmGeneratorExpressionParser.cxx @@ -14,7 +14,8 @@ #include "cmGeneratorExpressionEvaluator.h" -#include "assert.h" +#include <assert.h> +#include <stddef.h> cmGeneratorExpressionParser::cmGeneratorExpressionParser( const std::vector<cmGeneratorExpressionToken>& tokens) diff --git a/Source/cmGeneratorExpressionParser.h b/Source/cmGeneratorExpressionParser.h index b0e9ea4490..4534d6bbe8 100644 --- a/Source/cmGeneratorExpressionParser.h +++ b/Source/cmGeneratorExpressionParser.h @@ -12,12 +12,11 @@ #ifndef cmGeneratorExpressionParser_h #define cmGeneratorExpressionParser_h -#include "cmGeneratorExpressionLexer.h" +#include <cmConfigure.h> // IWYU pragma: keep -#include <set> #include <vector> -#include "cmListFileCache.h" +#include "cmGeneratorExpressionLexer.h" struct cmGeneratorExpressionEvaluator; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8bd3b8295d..ee2907cab0 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -13,19 +13,33 @@ #include "cmAlgorithms.h" #include "cmComputeLinkInformation.h" +#include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" +#include "cmCustomCommandLines.h" #include "cmGeneratorExpression.h" #include "cmGeneratorExpressionDAGChecker.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmPropertyMap.h" #include "cmSourceFile.h" +#include "cmSourceFileLocation.h" +#include "cmSystemTools.h" #include "cmTarget.h" +#include "cmTargetLinkLibraryType.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" -#include <queue> - -#include "assert.h" +#include <algorithm> +#include <assert.h> +#include <cmsys/RegularExpression.hxx> #include <errno.h> +#include <iterator> +#include <queue> +#include <sstream> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #if defined(CMake_HAVE_CXX_UNORDERED_SET) #include <unordered_set> diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index f9987aa6ff..173f15dc4c 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -12,15 +12,26 @@ #ifndef cmGeneratorTarget_h #define cmGeneratorTarget_h +#include <cmConfigure.h> + #include "cmLinkItem.h" +#include "cmListFileCache.h" +#include "cmPolicies.h" +#include "cmState.h" + +#include <map> +#include <set> +#include <string> +#include <utility> +#include <vector> +class cmComputeLinkInformation; class cmCustomCommand; class cmGlobalGenerator; class cmLocalGenerator; class cmMakefile; class cmSourceFile; class cmTarget; -class cmComputeLinkInformation; class cmGeneratorTarget { diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 3d35114eba..d3c9625c43 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmGhsMultiTargetGenerator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGhsMultiGenerator.h" #include "cmLocalGhsMultiGenerator.h" #include "cmMakefile.h" diff --git a/Source/cmGlobalCommonGenerator.cxx b/Source/cmGlobalCommonGenerator.cxx index 900b08e192..d8ea317c2b 100644 --- a/Source/cmGlobalCommonGenerator.cxx +++ b/Source/cmGlobalCommonGenerator.cxx @@ -11,6 +11,8 @@ ============================================================================*/ #include "cmGlobalCommonGenerator.h" +class cmake; + cmGlobalCommonGenerator::cmGlobalCommonGenerator(cmake* cm) : cmGlobalGenerator(cm) { diff --git a/Source/cmGlobalCommonGenerator.h b/Source/cmGlobalCommonGenerator.h index a48ff4f383..5bc16c3d02 100644 --- a/Source/cmGlobalCommonGenerator.h +++ b/Source/cmGlobalCommonGenerator.h @@ -12,8 +12,12 @@ #ifndef cmGlobalCommonGenerator_h #define cmGlobalCommonGenerator_h +#include <cmConfigure.h> + #include "cmGlobalGenerator.h" +class cmake; + /** \class cmGlobalCommonGenerator * \brief Common infrastructure for Makefile and Ninja global generators. */ diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 50c5a42c9b..ef8266ff21 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -21,6 +21,8 @@ #include "cmAlgorithms.h" #include "cmCPackPropertiesGenerator.h" #include "cmComputeTargetDepends.h" +#include "cmCustomCommand.h" +#include "cmCustomCommandLines.h" #include "cmExportBuildFileGenerator.h" #include "cmExternalMakefileProjectGenerator.h" #include "cmGeneratedFileStream.h" @@ -29,25 +31,31 @@ #include "cmInstallGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" +#include "cmPolicies.h" #include "cmQtAutoGeneratorInitializer.h" #include "cmSourceFile.h" #include "cmState.h" -#include "cmTargetExport.h" #include "cmVersion.h" #include "cmake.h" +#include <algorithm> +#include <assert.h> #include <cmsys/Directory.hxx> #include <cmsys/FStream.hxx> +#include <iterator> +#include <sstream> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #if defined(CMAKE_BUILD_WITH_CMAKE) -#include "cm_jsoncpp_value.h" -#include "cm_jsoncpp_writer.h" +#include <cm_jsoncpp_value.h> +#include <cm_jsoncpp_writer.h> #include <cmsys/MD5.h> #endif -#include <stdlib.h> // required for atof - -#include <assert.h> +class cmInstalledFile; bool cmTarget::StrictTargetComparison::operator()(cmTarget const* t1, cmTarget const* t2) const diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index dc80a33e40..1e1479a9fe 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -15,15 +15,18 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - -#include "cmExportSetMap.h" // For cmExportSetMap -#include "cmGeneratorExpression.h" -#include "cmGeneratorTarget.h" +#include "cmExportSetMap.h" #include "cmState.h" -#include "cmSystemTools.h" // for cmSystemTools::OutputOption -#include "cmTarget.h" // For cmTargets -#include "cmTargetDepend.h" // For cmTargetDependSet +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmTargetDepend.h" + +#include <iosfwd> +#include <map> +#include <set> +#include <string> +#include <utility> +#include <vector> #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmFileLockPool.h" @@ -34,15 +37,14 @@ #endif #endif -class cmake; +class cmCustomCommandLines; +class cmSourceFile; +class cmExportBuildFileGenerator; +class cmExternalMakefileProjectGenerator; class cmGeneratorTarget; -class cmMakefile; class cmLocalGenerator; -class cmExternalMakefileProjectGenerator; -class cmTarget; -class cmInstallTargetGenerator; -class cmInstallFilesGenerator; -class cmExportBuildFileGenerator; +class cmMakefile; +class cmake; /** \class cmGlobalGenerator * \brief Responsible for overseeing the generation process for the entire tree diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 0ae913e24e..d75ebf81a1 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -12,6 +12,7 @@ #include "cmGlobalGhsMultiGenerator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmGhsMultiTargetGenerator.h" #include "cmLocalGhsMultiGenerator.h" #include "cmMakefile.h" diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index daf70031c6..aaa1108ed5 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -13,17 +13,23 @@ #include "cmGlobalKdevelopGenerator.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" +#include "cmTarget.h" #include "cmXMLWriter.h" #include "cmake.h" #include <cmsys/Directory.hxx> #include <cmsys/FStream.hxx> -#include <cmsys/SystemTools.hxx> +#include <map> +#include <set> +#include <string.h> +#include <utility> cmGlobalKdevelopGenerator::cmGlobalKdevelopGenerator() : cmExternalMakefileProjectGenerator() diff --git a/Source/cmGlobalKdevelopGenerator.h b/Source/cmGlobalKdevelopGenerator.h index 666527c105..6a201b0127 100644 --- a/Source/cmGlobalKdevelopGenerator.h +++ b/Source/cmGlobalKdevelopGenerator.h @@ -13,8 +13,13 @@ #ifndef cmGlobalKdevelopGenerator_h #define cmGlobalKdevelopGenerator_h +#include <cmConfigure.h> + #include "cmExternalMakefileProjectGenerator.h" +#include <string> +#include <vector> + class cmLocalGenerator; /** \class cmGlobalKdevelopGenerator diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 590f20725a..30a05a00da 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -13,16 +13,27 @@ #include "cmGlobalNinjaGenerator.h" #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorExpressionEvaluationFile.h" #include "cmGeneratorTarget.h" +#include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmTargetDepend.h" #include "cmVersion.h" +#include "cmake.h" #include <algorithm> -#include <assert.h> #include <ctype.h> +#include <functional> +#include <iterator> +#include <sstream> +#include <stdio.h> const char* cmGlobalNinjaGenerator::NINJA_BUILD_FILE = "build.ninja"; const char* cmGlobalNinjaGenerator::NINJA_RULES_FILE = "rules.ninja"; diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 082ee3aba3..a0fad644b7 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -13,16 +13,28 @@ #ifndef cmGlobalNinjaGenerator_h #define cmGlobalNinjaGenerator_h -#include "cmGlobalCommonGenerator.h" +#include <cmConfigure.h> +#include "cmGlobalCommonGenerator.h" +#include "cmGlobalGenerator.h" #include "cmGlobalGeneratorFactory.h" #include "cmNinjaTypes.h" - -//#define NINJA_GEN_VERBOSE_FILES - -class cmLocalGenerator; +#include "cmPolicies.h" + +#include <iosfwd> +#include <map> +#include <set> +#include <string> +#include <utility> +#include <vector> + +class cmCustomCommand; +class cmMakefile; +class cmake; +struct cmDocumentationEntry; class cmGeneratedFileStream; class cmGeneratorTarget; +class cmLocalGenerator; /** * \class cmGlobalNinjaGenerator diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 77fbbe940c..d90ebf087c 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -12,13 +12,25 @@ #include "cmGlobalUnixMakefileGenerator3.h" #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" #include "cmMakefileTargetGenerator.h" +#include "cmOutputConverter.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmTargetDepend.h" #include "cmake.h" +#include <algorithm> +#include <functional> +#include <sstream> +#include <utility> + cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3(cmake* cm) : cmGlobalCommonGenerator(cm) { diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index ceb4140bfa..3724124457 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -12,13 +12,27 @@ #ifndef cmGlobalUnixMakefileGenerator3_h #define cmGlobalUnixMakefileGenerator3_h -#include "cmGlobalCommonGenerator.h" +#include <cmConfigure.h> +#include "cmGeneratorTarget.h" +#include "cmGlobalCommonGenerator.h" #include "cmGlobalGeneratorFactory.h" +#include "cmState.h" + +#include <iosfwd> +#include <map> +#include <set> +#include <stddef.h> +#include <string> +#include <vector> class cmGeneratedFileStream; -class cmMakefileTargetGenerator; +class cmLocalGenerator; class cmLocalUnixMakefileGenerator3; +class cmMakefile; +class cmMakefileTargetGenerator; +class cmake; +struct cmDocumentationEntry; /** \class cmGlobalUnixMakefileGenerator3 * \brief Write a Unix makefiles. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index df831e55b3..819feb1e8a 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -14,6 +14,7 @@ #include "cmGlobalVisualStudio10Generator.h" #include "cmAlgorithms.h" +#include "cmGeneratorTarget.h" #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmSourceFile.h" diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index 45d952216a..ea008ad6e0 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -13,6 +13,7 @@ #include "cmGlobalVisualStudio71Generator.h" +#include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" #include "cmake.h" diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 67ac230ca7..08be30470f 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -14,6 +14,7 @@ #include "cmGlobalVisualStudio7Generator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" #include "cmUuid.h" diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 2c0168e1be..53a05a0fb8 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -14,6 +14,7 @@ #include "cmGlobalVisualStudio8Generator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" #include "cmSourceFile.h" diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index 86fe6f27d0..d8f1d93acb 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -11,8 +11,10 @@ ============================================================================*/ #include "cmGlobalWatcomWMakeGenerator.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmDocumentationEntry.h" #include "cmMakefile.h" +#include "cmState.h" +#include "cmake.h" cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator(cmake* cm) : cmGlobalUnixMakefileGenerator3(cm) diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h index bc0d786aee..df1168ed24 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.h +++ b/Source/cmGlobalWatcomWMakeGenerator.h @@ -12,8 +12,18 @@ #ifndef cmGlobalWatcomWMakeGenerator_h #define cmGlobalWatcomWMakeGenerator_h +#include <cmConfigure.h> + +#include "cmGlobalGeneratorFactory.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include <string> +#include <vector> + +class cmMakefile; +class cmake; +struct cmDocumentationEntry; + /** \class cmGlobalWatcomWMakeGenerator * \brief Write a NMake makefiles. * diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index adb9936a15..2824f7e90b 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -12,9 +12,19 @@ #include "cmGraphVizWriter.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" + +#include <cmConfigure.h> +#include <iostream> +#include <sstream> +#include <utility> static const char* getShapeForTarget(const cmGeneratorTarget* target) { diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h index 06437854ff..f34e967920 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -12,15 +12,19 @@ #ifndef CMGRAPHVIZWRITER_H #define CMGRAPHVIZWRITER_H -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include "cmState.h" -#include "cmGeneratedFileStream.h" -#include "cmLocalGenerator.h" #include <cmsys/RegularExpression.hxx> +#include <map> +#include <set> +#include <string> +#include <vector> +class cmGeneratedFileStream; class cmGeneratorTarget; +class cmLocalGenerator; /** This class implements writing files for graphviz (dot) for graphs * representing the dependencies between the targets in the project. */ diff --git a/Source/cmInstallDirectoryGenerator.cxx b/Source/cmInstallDirectoryGenerator.cxx index 469b1193da..3b4226d0b4 100644 --- a/Source/cmInstallDirectoryGenerator.cxx +++ b/Source/cmInstallDirectoryGenerator.cxx @@ -12,8 +12,11 @@ #include "cmInstallDirectoryGenerator.h" #include "cmGeneratorExpression.h" +#include "cmInstallType.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" cmInstallDirectoryGenerator::cmInstallDirectoryGenerator( std::vector<std::string> const& dirs, const char* dest, diff --git a/Source/cmInstallDirectoryGenerator.h b/Source/cmInstallDirectoryGenerator.h index 93becf4dcc..ed40785310 100644 --- a/Source/cmInstallDirectoryGenerator.h +++ b/Source/cmInstallDirectoryGenerator.h @@ -13,6 +13,14 @@ #define cmInstallDirectoryGenerator_h #include "cmInstallGenerator.h" +#include "cmScriptGenerator.h" + +#include <cmConfigure.h> +#include <iosfwd> +#include <string> +#include <vector> + +class cmLocalGenerator; /** \class cmInstallDirectoryGenerator * \brief Generate directory installation rules. diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx index 72c4d1f691..27628f423c 100644 --- a/Source/cmInstallExportGenerator.cxx +++ b/Source/cmInstallExportGenerator.cxx @@ -11,19 +11,17 @@ ============================================================================*/ #include "cmInstallExportGenerator.h" -#include <stdio.h> - -#include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmInstallTargetGenerator.h" -#include "cmLocalGenerator.h" -#include "cmMakefile.h" -#include "cmake.h" - -#include "cmInstallFilesGenerator.h" +#include <algorithm> +#include <map> +#include <sstream> +#include <utility> #include "cmExportInstallFileGenerator.h" #include "cmExportSet.h" +#include "cmInstallType.h" +#include "cmLocalGenerator.h" +#include "cmSystemTools.h" +#include "cmake.h" cmInstallExportGenerator::cmInstallExportGenerator( cmExportSet* exportSet, const char* destination, diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h index 22e661b1f2..55398278cb 100644 --- a/Source/cmInstallExportGenerator.h +++ b/Source/cmInstallExportGenerator.h @@ -12,13 +12,19 @@ #ifndef cmInstallExportGenerator_h #define cmInstallExportGenerator_h +#include <cmConfigure.h> + #include "cmInstallGenerator.h" +#include "cmScriptGenerator.h" + +#include <iosfwd> +#include <stddef.h> +#include <string> +#include <vector> class cmExportInstallFileGenerator; -class cmInstallFilesGenerator; -class cmInstallTargetGenerator; class cmExportSet; -class cmMakefile; +class cmLocalGenerator; /** \class cmInstallExportGenerator * \brief Generate rules for creating an export files. diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx index 93a740cb45..1d0faddeff 100644 --- a/Source/cmInstallFilesGenerator.cxx +++ b/Source/cmInstallFilesGenerator.cxx @@ -12,9 +12,11 @@ #include "cmInstallFilesGenerator.h" #include "cmGeneratorExpression.h" -#include "cmLocalGenerator.h" -#include "cmMakefile.h" +#include "cmInstallType.h" #include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" + +class cmLocalGenerator; cmInstallFilesGenerator::cmInstallFilesGenerator( std::vector<std::string> const& files, const char* dest, bool programs, diff --git a/Source/cmInstallFilesGenerator.h b/Source/cmInstallFilesGenerator.h index 5cb09f45e7..1648976e56 100644 --- a/Source/cmInstallFilesGenerator.h +++ b/Source/cmInstallFilesGenerator.h @@ -12,7 +12,16 @@ #ifndef cmInstallFilesGenerator_h #define cmInstallFilesGenerator_h +#include <cmConfigure.h> + #include "cmInstallGenerator.h" +#include "cmScriptGenerator.h" + +#include <iosfwd> +#include <string> +#include <vector> + +class cmLocalGenerator; /** \class cmInstallFilesGenerator * \brief Generate file installation rules. diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx index e3d5badc05..69120a836a 100644 --- a/Source/cmInstallGenerator.cxx +++ b/Source/cmInstallGenerator.cxx @@ -14,6 +14,8 @@ #include "cmMakefile.h" #include "cmSystemTools.h" +#include <ostream> + cmInstallGenerator::cmInstallGenerator( const char* destination, std::vector<std::string> const& configurations, const char* component, MessageLevel message, bool exclude_from_all) diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h index ad9fc28519..fa0bdd6958 100644 --- a/Source/cmInstallGenerator.h +++ b/Source/cmInstallGenerator.h @@ -12,9 +12,15 @@ #ifndef cmInstallGenerator_h #define cmInstallGenerator_h +#include <cmConfigure.h> + #include "cmInstallType.h" #include "cmScriptGenerator.h" +#include <iosfwd> +#include <string> +#include <vector> + class cmLocalGenerator; class cmMakefile; diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx index 76d6b718fa..78711000ea 100644 --- a/Source/cmInstallScriptGenerator.cxx +++ b/Source/cmInstallScriptGenerator.cxx @@ -11,6 +11,11 @@ ============================================================================*/ #include "cmInstallScriptGenerator.h" +#include "cmScriptGenerator.h" + +#include <ostream> +#include <vector> + cmInstallScriptGenerator::cmInstallScriptGenerator(const char* script, bool code, const char* component, diff --git a/Source/cmInstallScriptGenerator.h b/Source/cmInstallScriptGenerator.h index dc00359f32..609294f8c5 100644 --- a/Source/cmInstallScriptGenerator.h +++ b/Source/cmInstallScriptGenerator.h @@ -12,8 +12,13 @@ #ifndef cmInstallScriptGenerator_h #define cmInstallScriptGenerator_h +#include <cmConfigure.h> + #include "cmInstallGenerator.h" +#include <iosfwd> +#include <string> + /** \class cmInstallScriptGenerator * \brief Generate target installation rules. */ diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 4b2f40cb99..1ad59ffdc5 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -14,13 +14,21 @@ #include "cmComputeLinkInformation.h" #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" -#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" +#include "cmInstallType.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cm_auto_ptr.hxx" #include "cmake.h" #include <assert.h> +#include <map> +#include <set> +#include <sstream> +#include <utility> cmInstallTargetGenerator::cmInstallTargetGenerator( const std::string& targetName, const char* dest, bool implib, diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h index b1c28b8ed0..797e962c25 100644 --- a/Source/cmInstallTargetGenerator.h +++ b/Source/cmInstallTargetGenerator.h @@ -12,9 +12,17 @@ #ifndef cmInstallTargetGenerator_h #define cmInstallTargetGenerator_h +#include <cmConfigure.h> + #include "cmInstallGenerator.h" +#include "cmScriptGenerator.h" + +#include <iosfwd> +#include <string> +#include <vector> class cmGeneratorTarget; +class cmLocalGenerator; /** \class cmInstallTargetGenerator * \brief Generate target installation rules. diff --git a/Source/cmInstalledFile.cxx b/Source/cmInstalledFile.cxx index bfc5cf123b..3ab7db0161 100644 --- a/Source/cmInstalledFile.cxx +++ b/Source/cmInstalledFile.cxx @@ -12,9 +12,13 @@ #include "cmInstalledFile.h" #include "cmAlgorithms.h" +#include "cmListFileCache.h" #include "cmMakefile.h" #include "cmSystemTools.h" +#include <cmConfigure.h> +#include <utility> + cmInstalledFile::cmInstalledFile() : NameExpression(CM_NULLPTR) { diff --git a/Source/cmInstalledFile.h b/Source/cmInstalledFile.h index 00ff611e86..8bad5a5826 100644 --- a/Source/cmInstalledFile.h +++ b/Source/cmInstalledFile.h @@ -13,6 +13,13 @@ #define cmInstalledFile_h #include "cmGeneratorExpression.h" +#include "cm_auto_ptr.hxx" + +#include <map> +#include <string> +#include <vector> + +class cmMakefile; /** \class cmInstalledFile * \brief Represents a file intended for installation. diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index aad538ca6c..14bb81e16e 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -15,9 +15,12 @@ #include "cmMessenger.h" #include "cmOutputConverter.h" #include "cmSystemTools.h" -#include "cmVersion.h" +#include "cmake.h" -#include <cmsys/RegularExpression.hxx> +#include <algorithm> +#include <assert.h> +#include <cmConfigure.h> +#include <sstream> struct cmListFileParser { diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 08b59ebd57..215f17908e 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -12,9 +12,11 @@ #ifndef cmListFileCache_h #define cmListFileCache_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include <iosfwd> +#include <string> +#include <vector> #include "cmState.h" @@ -151,6 +153,7 @@ public: private: struct Entry; + cmState::Snapshot Bottom; Entry* Cur; cmListFileBacktrace(cmState::Snapshot bottom, Entry* up, diff --git a/Source/cmLocalCommonGenerator.cxx b/Source/cmLocalCommonGenerator.cxx index 1383421257..0e79293566 100644 --- a/Source/cmLocalCommonGenerator.cxx +++ b/Source/cmLocalCommonGenerator.cxx @@ -11,8 +11,13 @@ ============================================================================*/ #include "cmLocalCommonGenerator.h" +#include "cmGeneratorTarget.h" #include "cmMakefile.h" +#include <vector> + +class cmGlobalGenerator; + cmLocalCommonGenerator::cmLocalCommonGenerator( cmGlobalGenerator* gg, cmMakefile* mf, cmOutputConverter::RelativeRoot wd) : cmLocalGenerator(gg, mf) diff --git a/Source/cmLocalCommonGenerator.h b/Source/cmLocalCommonGenerator.h index 0a8753d2c1..9012afd4bd 100644 --- a/Source/cmLocalCommonGenerator.h +++ b/Source/cmLocalCommonGenerator.h @@ -12,9 +12,16 @@ #ifndef cmLocalCommonGenerator_h #define cmLocalCommonGenerator_h +#include <cmConfigure.h> + #include "cmLocalGenerator.h" +#include "cmOutputConverter.h" + +#include <string> -class cmCommonTargetGenerator; +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmMakefile; /** \class cmLocalCommonGenerator * \brief Common infrastructure for Makefile and Ninja local generators. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index de9e1e551b..cecf7b7225 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -16,14 +16,15 @@ #include "cmCustomCommandGenerator.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorExpressionEvaluationFile.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" -#include "cmInstallFilesGenerator.h" #include "cmInstallGenerator.h" #include "cmInstallScriptGenerator.h" #include "cmInstallTargetGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmTest.h" +#include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTestGenerator.h" #include "cmVersion.h" #include "cmake.h" @@ -33,9 +34,14 @@ #include <cmsys/MD5.h> #endif -#include <ctype.h> // for isalpha - +#include <algorithm> #include <assert.h> +#include <cmsys/RegularExpression.hxx> +#include <ctype.h> +#include <iterator> +#include <sstream> +#include <stdio.h> +#include <utility> #if defined(__HAIKU__) #include <FindDirectory.h> diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index f7a4074f3e..a43a7d10f3 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -14,19 +14,25 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - +#include "cmListFileCache.h" #include "cmOutputConverter.h" +#include "cmPolicies.h" #include "cmState.h" #include "cmake.h" -class cmMakefile; -class cmGlobalGenerator; +#include <cm_kwiml.h> +#include <iosfwd> +#include <map> +#include <set> +#include <string.h> +#include <string> +#include <vector> + +class cmCustomCommandGenerator; class cmGeneratorTarget; -class cmTargetManifest; +class cmGlobalGenerator; +class cmMakefile; class cmSourceFile; -class cmCustomCommand; -class cmCustomCommandGenerator; /** \class cmLocalGenerator * \brief Create required build files for a directory. diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index d15ee220e9..6793f84507 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -12,16 +12,25 @@ ============================================================================*/ #include "cmLocalNinjaGenerator.h" +#include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" #include "cmGlobalNinjaGenerator.h" #include "cmMakefile.h" #include "cmNinjaTargetGenerator.h" #include "cmSourceFile.h" #include "cmState.h" +#include "cmSystemTools.h" #include "cmake.h" +#include <algorithm> #include <assert.h> +#include <iterator> +#include <sstream> +#include <stdio.h> +#include <utility> cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg, cmMakefile* mf) diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 6e6108793d..25539d4f1e 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -13,13 +13,27 @@ #ifndef cmLocalNinjaGenerator_h #define cmLocalNinjaGenerator_h -#include "cmLocalCommonGenerator.h" +#include <cmConfigure.h> +#include "cmLocalCommonGenerator.h" +#include "cmLocalGenerator.h" #include "cmNinjaTypes.h" +#include "cmOutputConverter.h" + +#include <iosfwd> +#include <map> +#include <set> +#include <string> +#include <vector> +class cmCustomCommand; class cmCustomCommandGenerator; -class cmGlobalNinjaGenerator; class cmGeneratedFileStream; +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmGlobalNinjaGenerator; +class cmMakefile; +class cmSourceFile; class cmake; /** diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 3c4841eca8..611c50281d 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -12,13 +12,20 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmAlgorithms.h" +#include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" #include "cmFileTimeComparison.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmMakefileTargetGenerator.h" +#include "cmOutputConverter.h" #include "cmSourceFile.h" +#include "cmState.h" +#include "cmSystemTools.h" #include "cmVersion.h" #include "cmake.h" @@ -30,11 +37,14 @@ #include "cmDependsJava.h" #endif +#include <algorithm> #include <cm_auto_ptr.hxx> +#include <cmsys/FStream.hxx> #include <cmsys/Terminal.h> - -#include <algorithm> -#include <queue> +#include <functional> +#include <sstream> +#include <stdio.h> +#include <utility> // Escape special characters in Makefile dependency lines class cmMakeSafe diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 3e90055a9f..bd32e10381 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -12,15 +12,22 @@ #ifndef cmLocalUnixMakefileGenerator3_h #define cmLocalUnixMakefileGenerator3_h -#include "cmLocalCommonGenerator.h" +#include <cmConfigure.h> -// for cmDepends::DependencyVector #include "cmDepends.h" +#include "cmLocalCommonGenerator.h" + +#include <iosfwd> +#include <map> +#include <set> +#include <string> +#include <vector> class cmCustomCommand; class cmCustomCommandGenerator; -class cmDepends; -class cmMakefileTargetGenerator; +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmMakefile; class cmSourceFile; /** \class cmLocalUnixMakefileGenerator3 diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index 37b5505f60..0fe7987bf5 100644 --- a/Source/cmLocalVisualStudio10Generator.cxx +++ b/Source/cmLocalVisualStudio10Generator.cxx @@ -11,10 +11,12 @@ ============================================================================*/ #include "cmLocalVisualStudio10Generator.h" +#include "cmGeneratorTarget.h" #include "cmGlobalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmVisualStudio10TargetGenerator.h" #include "cmXMLParser.h" + #include <cm_expat.h> class cmVS10XMLParser : public cmXMLParser diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index b492962222..d344dc5726 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -12,6 +12,7 @@ #include "cmLocalVisualStudioGenerator.h" #include "cmCustomCommandGenerator.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx index db8794690e..098779e3ef 100644 --- a/Source/cmLocalXCodeGenerator.cxx +++ b/Source/cmLocalXCodeGenerator.cxx @@ -11,6 +11,7 @@ ============================================================================*/ #include "cmLocalXCodeGenerator.h" +#include "cmGeneratorTarget.h" #include "cmGlobalXCodeGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index d1fddca272..11ccca122d 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -23,34 +23,35 @@ #include "cmGeneratorExpression.h" #include "cmGeneratorExpressionEvaluationFile.h" #include "cmGlobalGenerator.h" -#include "cmInstallGenerator.h" #include "cmListFileCache.h" -#include "cmMessenger.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" #include "cmState.h" #include "cmSystemTools.h" #include "cmTest.h" -#include "cmTestGenerator.h" #include "cmVersion.h" #include "cmake.h" +#include "cmInstallGenerator.h" // IWYU pragma: keep +#include "cmTestGenerator.h" // IWYU pragma: keep + #ifdef CMAKE_BUILD_WITH_CMAKE #include "cmVariableWatch.h" #endif +#include <algorithm> +#include <assert.h> #include <cm_auto_ptr.hxx> #include <cmsys/FStream.hxx> #include <cmsys/RegularExpression.hxx> - -#include <algorithm> -#include <assert.h> #include <ctype.h> #include <sstream> #include <stdlib.h> #include <string.h> #include <utility> +class cmMessenger; + // default is not to be building executables cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator, cmState::Snapshot const& snapshot) diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 4d137db671..eb382dfc6d 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -54,6 +54,7 @@ class cmFunctionBlocker; class cmGeneratorExpressionEvaluationFile; class cmGlobalGenerator; class cmInstallGenerator; +class cmMessenger; class cmSourceFile; class cmTest; class cmTestGenerator; @@ -892,10 +893,13 @@ private: void PopSnapshot(bool reportError = true); friend class cmCMakePolicyCommand; class IncludeScope; + friend class IncludeScope; class ListFileScope; + friend class ListFileScope; class BuildsystemFileScope; + friend class BuildsystemFileScope; // CMP0053 == old diff --git a/Source/cmMessenger.cxx b/Source/cmMessenger.cxx index 43fa15067e..fe67050640 100644 --- a/Source/cmMessenger.cxx +++ b/Source/cmMessenger.cxx @@ -11,14 +11,18 @@ ============================================================================*/ #include "cmMessenger.h" + +#include "cmAlgorithms.h" #include "cmDocumentationFormatter.h" -#include "cmMessenger.h" -#include "cmOutputConverter.h" +#include "cmState.h" +#include "cmSystemTools.h" #if defined(CMAKE_BUILD_WITH_CMAKE) #include <cmsys/SystemInformation.hxx> #endif +#include <sstream> + cmake::MessageType cmMessenger::ConvertMessageType(cmake::MessageType t) const { bool warningsAsErrors; diff --git a/Source/cmMessenger.h b/Source/cmMessenger.h index f15bf1392d..c69eb8ec07 100644 --- a/Source/cmMessenger.h +++ b/Source/cmMessenger.h @@ -13,10 +13,15 @@ #ifndef cmMessenger_h #define cmMessenger_h +#include <cmConfigure.h> // IWYU pragma: keep + #include "cmListFileCache.h" -#include "cmState.h" #include "cmake.h" +#include <string> + +class cmState; + class cmMessenger { public: diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx index dbfe6eb347..3ddcc9a8b1 100644 --- a/Source/cmOSXBundleGenerator.cxx +++ b/Source/cmOSXBundleGenerator.cxx @@ -11,12 +11,18 @@ ============================================================================*/ #include "cmOSXBundleGenerator.h" +#include <cmConfigure.h> + +#include "cmGeneratorTarget.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmSystemTools.h" #include "cmTarget.h" #include <cassert> +class cmSourceFile; + cmOSXBundleGenerator::cmOSXBundleGenerator(cmGeneratorTarget* target, const std::string& configName) : GT(target) diff --git a/Source/cmOSXBundleGenerator.h b/Source/cmOSXBundleGenerator.h index 2dc1e4a441..ff472eced1 100644 --- a/Source/cmOSXBundleGenerator.h +++ b/Source/cmOSXBundleGenerator.h @@ -12,19 +12,16 @@ #ifndef cmOSXBundleGenerator_h #define cmOSXBundleGenerator_h -#include <cmConfigure.h> - -#include "cmStandardIncludes.h" - -#include "cmSourceFile.h" +#include <cmConfigure.h> // IWYU pragma: keep #include <set> #include <string> +#include <vector> -class cmTarget; -class cmMakefile; -class cmLocalGenerator; class cmGeneratorTarget; +class cmLocalGenerator; +class cmMakefile; +class cmSourceFile; class cmOSXBundleGenerator { diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx index 20f224610a..d7ad83df73 100644 --- a/Source/cmOrderDirectories.cxx +++ b/Source/cmOrderDirectories.cxx @@ -12,13 +12,15 @@ #include "cmOrderDirectories.h" #include "cmAlgorithms.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmSystemTools.h" #include "cmake.h" -#include <assert.h> - #include <algorithm> +#include <assert.h> +#include <functional> +#include <sstream> /* Directory ordering computation. diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h index 13823a18bd..081e8a09b7 100644 --- a/Source/cmOrderDirectories.h +++ b/Source/cmOrderDirectories.h @@ -14,14 +14,16 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - #include <cmsys/RegularExpression.hxx> +#include <map> +#include <set> +#include <string> +#include <utility> +#include <vector> +class cmGeneratorTarget; class cmGlobalGenerator; class cmOrderDirectoriesConstraint; -class cmOrderDirectoriesConstraintLibrary; -class cmGeneratorTarget; /** \class cmOrderDirectories * \brief Compute a safe runtime path order for a set of shared libraries. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 630da42348..d44fbb7739 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -12,14 +12,14 @@ #include "cmOutputConverter.h" #include "cmAlgorithms.h" -#include "cmake.h" +#include "cmSystemTools.h" +#include <algorithm> #include <assert.h> +#include <ctype.h> +#include <set> #include <sstream> -#include <ctype.h> /* isalpha */ -#include <string.h> /* strlen */ - cmOutputConverter::cmOutputConverter(cmState::Snapshot snapshot) : StateSnapshot(snapshot) , LinkScriptShell(false) diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 02468c83ab..ac58ddc32d 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -12,13 +12,13 @@ #ifndef cmOutputConverter_h #define cmOutputConverter_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" - -#include "cmGlobalGenerator.h" #include "cmState.h" +#include <string> +#include <vector> + class cmOutputConverter { public: diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index f1da4d5d69..00f13705f7 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -13,19 +13,40 @@ #include "cmQtAutoGeneratorInitializer.h" +#include "cmAlgorithms.h" +#include "cmCustomCommandLines.h" #include "cmFilePathUuid.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" #include "cmSourceFile.h" - -#include <sys/stat.h> - -#include <cmsys/FStream.hxx> +#include "cmSourceFileLocation.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" #if defined(_WIN32) && !defined(__CYGWIN__) #include "cmGlobalVisualStudioGenerator.h" #endif +#include <algorithm> +#include <assert.h> +#include <cmConfigure.h> +#include <cmsys/FStream.hxx> +#include <cmsys/RegularExpression.hxx> +#include <iostream> +#include <map> +#include <set> +#include <sstream> +#include <string.h> +#include <string> +#include <sys/stat.h> +#include <utility> +#include <vector> + static std::string GetAutogenTargetName(cmGeneratorTarget const* target) { std::string autogenTargetName = target->GetName(); diff --git a/Source/cmQtAutoGeneratorInitializer.h b/Source/cmQtAutoGeneratorInitializer.h index c5a7aba723..fedb388168 100644 --- a/Source/cmQtAutoGeneratorInitializer.h +++ b/Source/cmQtAutoGeneratorInitializer.h @@ -14,15 +14,8 @@ #ifndef cmQtAutoGeneratorInitializer_h #define cmQtAutoGeneratorInitializer_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" - -#include <map> -#include <string> -#include <vector> - -class cmSourceFile; class cmGeneratorTarget; class cmLocalGenerator; diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index a261962a25..329c74281a 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -20,14 +20,21 @@ #include "cmOutputConverter.h" #include "cmState.h" #include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" -#include <sys/stat.h> - +#include <algorithm> #include <assert.h> +#include <cmConfigure.h> #include <cmsys/FStream.hxx> +#include <cmsys/RegularExpression.hxx> #include <cmsys/Terminal.h> - +#include <iostream> +#include <sstream> +#include <stdlib.h> #include <string.h> +#include <utility> + #if defined(__APPLE__) #include <unistd.h> #endif diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index ba439d462c..32975c2bf5 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -14,12 +14,11 @@ #ifndef cmQtAutoGenerators_h #define cmQtAutoGenerators_h -#include <cmConfigure.h> - -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep #include <list> #include <map> +#include <set> #include <string> #include <vector> diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index 10d1cda228..7f8092379a 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -14,8 +14,13 @@ #include "cmAlgorithms.h" #include "cmSystemTools.h" #include "cmVersion.h" + +#include <algorithm> #include <cmsys/FStream.hxx> #include <ctype.h> +#include <iterator> +#include <stddef.h> +#include <utility> cmRST::cmRST(std::ostream& os, std::string const& docroot) : OS(os) diff --git a/Source/cmRST.h b/Source/cmRST.h index 895901a7c9..f37af88465 100644 --- a/Source/cmRST.h +++ b/Source/cmRST.h @@ -12,11 +12,14 @@ #ifndef _cmRST_h #define _cmRST_h -#include <cmConfigure.h> - -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep #include <cmsys/RegularExpression.hxx> +#include <iosfwd> +#include <map> +#include <set> +#include <string> +#include <vector> /** \class cmRST * \brief Perform basic .rst processing for command-line help diff --git a/Source/cmScriptGenerator.cxx b/Source/cmScriptGenerator.cxx index a000258dc3..1ab70e23f7 100644 --- a/Source/cmScriptGenerator.cxx +++ b/Source/cmScriptGenerator.cxx @@ -13,6 +13,8 @@ #include "cmSystemTools.h" +#include <cmConfigure.h> + cmScriptGenerator::cmScriptGenerator( const std::string& config_var, std::vector<std::string> const& configurations) diff --git a/Source/cmScriptGenerator.h b/Source/cmScriptGenerator.h index 4f4dd9ed6b..abe9a1d2c7 100644 --- a/Source/cmScriptGenerator.h +++ b/Source/cmScriptGenerator.h @@ -12,9 +12,11 @@ #ifndef cmScriptGenerator_h #define cmScriptGenerator_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include <ostream> +#include <string> +#include <vector> class cmScriptGeneratorIndent { diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 5869a01be0..3aa4b92322 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -11,11 +11,16 @@ ============================================================================*/ #include "cmSourceFile.h" +#include "cmCustomCommand.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmProperty.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" +#include <sstream> + cmSourceFile::cmSourceFile(cmMakefile* mf, const std::string& name) : Location(mf, name) { diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h index a3808f7bac..2c6d831e9f 100644 --- a/Source/cmSourceFile.h +++ b/Source/cmSourceFile.h @@ -12,12 +12,16 @@ #ifndef cmSourceFile_h #define cmSourceFile_h -#include "cmSourceFileLocation.h" +#include <cmConfigure.h> -#include "cmCustomCommand.h" #include "cmPropertyMap.h" +#include "cmSourceFileLocation.h" + +#include <string> +#include <vector> -class cmake; +class cmCustomCommand; +class cmMakefile; /** \class cmSourceFile * \brief Represent a class loaded from a makefile. diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx index 099a6f07ae..e2a1552e21 100644 --- a/Source/cmSourceFileLocation.cxx +++ b/Source/cmSourceFileLocation.cxx @@ -11,12 +11,17 @@ ============================================================================*/ #include "cmSourceFileLocation.h" +#include <cmConfigure.h> + #include "cmAlgorithms.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmSystemTools.h" +#include "cmake.h" -#include "assert.h" +#include <algorithm> +#include <assert.h> +#include <vector> cmSourceFileLocation::cmSourceFileLocation() : Makefile(CM_NULLPTR) diff --git a/Source/cmSourceFileLocation.h b/Source/cmSourceFileLocation.h index d41f2bdfb9..e4e51161b0 100644 --- a/Source/cmSourceFileLocation.h +++ b/Source/cmSourceFileLocation.h @@ -12,9 +12,9 @@ #ifndef cmSourceFileLocation_h #define cmSourceFileLocation_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include <string> class cmMakefile; diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h index c7f093f20f..c5e63110e8 100644 --- a/Source/cmSourceGroup.h +++ b/Source/cmSourceGroup.h @@ -14,12 +14,12 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - #include <cmsys/RegularExpression.hxx> +#include <set> +#include <string> +#include <vector> class cmSourceFile; - class cmSourceGroupInternals; /** \class cmSourceGroup diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 21a50cba44..be0ee50531 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -12,20 +12,7 @@ #include "cmSystemTools.h" #include "cmAlgorithms.h" -#include <assert.h> -#include <ctype.h> -#include <errno.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> -#ifdef __QNX__ -#include <malloc.h> /* for malloc/free on QNX */ -#endif -#include <cmsys/Directory.hxx> -#include <cmsys/Encoding.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/RegularExpression.hxx> -#include <cmsys/System.h> + #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmArchiveWrite.h" #include "cmLocale.h" @@ -34,8 +21,38 @@ #define __LA_INT64_T la_int64_t #endif #endif + +#if defined(CMAKE_BUILD_WITH_CMAKE) +#include "cmCryptoHash.h" +#endif + +#if defined(CMAKE_USE_ELF_PARSER) +#include "cmELF.h" +#endif + +#if defined(CMAKE_USE_MACH_PARSER) +#include "cmMachO.h" +#endif + +#include <algorithm> +#include <assert.h> +#include <cmsys/Directory.hxx> +#include <cmsys/Encoding.hxx> #include <cmsys/FStream.hxx> +#include <cmsys/RegularExpression.hxx> +#include <cmsys/System.h> +#include <cmsys/SystemTools.hxx> #include <cmsys/Terminal.h> +#include <ctype.h> +#include <errno.h> +#include <iostream> +#include <set> +#include <sstream> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/stat.h> +#include <time.h> #if defined(_WIN32) #include <windows.h> @@ -43,33 +60,21 @@ #include <wincrypt.h> #else #include <sys/time.h> -#include <sys/types.h> -#include <sys/wait.h> #include <unistd.h> #include <utime.h> #endif -#if defined(__APPLE__) -#include <mach-o/dyld.h> -#endif - -#include <sys/stat.h> - #if defined(_WIN32) && \ (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__MINGW32__)) #include <io.h> #endif -#if defined(CMAKE_BUILD_WITH_CMAKE) -#include "cmCryptoHash.h" -#endif - -#if defined(CMAKE_USE_ELF_PARSER) -#include "cmELF.h" +#if defined(__APPLE__) +#include <mach-o/dyld.h> #endif -#if defined(CMAKE_USE_MACH_PARSER) -#include "cmMachO.h" +#ifdef __QNX__ +#include <malloc.h> /* for malloc/free on QNX */ #endif static bool cm_isspace(char c) @@ -142,6 +147,7 @@ private: }; #elif defined(__APPLE__) #include <crt_externs.h> + #define environ (*_NSGetEnviron()) #endif diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index cfc174e96d..090c9d6ef0 100644 --- a/Source/cmTestGenerator.cxx +++ b/Source/cmTestGenerator.cxx @@ -20,6 +20,7 @@ #include "cmState.h" #include "cmSystemTools.h" #include "cmTest.h" +#include "cm_auto_ptr.hxx" #include <map> #include <ostream> diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 701a5e5e1b..25f9e3a78f 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -12,33 +12,33 @@ #include "cmake.h" #include "cmAlgorithms.h" -#include "cmCommand.h" #include "cmCommands.h" +#include "cmDocumentation.h" +#include "cmDocumentationEntry.h" #include "cmDocumentationFormatter.h" #include "cmExternalMakefileProjectGenerator.h" #include "cmFileTimeComparison.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmGlobalGeneratorFactory.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmMessenger.h" -#include "cmSourceFile.h" #include "cmState.h" -#include "cmTest.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmTargetLinkLibraryType.h" #include "cmUtils.hxx" -#include "cmVersionMacros.h" +#include "cmVersionConfig.h" +#include "cm_auto_ptr.hxx" #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmGraphVizWriter.h" #include "cmVariableWatch.h" -#include <cmsys/SystemInformation.hxx> - -#include "cm_jsoncpp_value.h" -#include "cm_jsoncpp_writer.h" +#include <cm_jsoncpp_value.h> +#include <cm_jsoncpp_writer.h> #endif -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/RegularExpression.hxx> - // only build kdevelop generator on non-windows platforms // when not bootstrapping cmake #if !defined(_WIN32) @@ -69,6 +69,7 @@ #include "cmGlobalVisualStudio71Generator.h" #include "cmGlobalVisualStudio8Generator.h" #include "cmGlobalVisualStudio9Generator.h" + #define CMAKE_HAVE_VS_GENERATORS #endif #include "cmGlobalMSYSMakefileGenerator.h" @@ -98,11 +99,10 @@ #include "cmExtraEclipseCDT4Generator.h" #endif -#include <stdlib.h> // required for atoi - #if defined(__APPLE__) #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmGlobalXCodeGenerator.h" + #define CMAKE_USE_XCODE 1 #endif #include <sys/resource.h> @@ -113,7 +113,18 @@ // include sys/stat.h after sys/types.h #include <sys/stat.h> // struct stat -#include <list> +#include <algorithm> +#include <cmsys/FStream.hxx> +#include <cmsys/Glob.hxx> +#include <cmsys/RegularExpression.hxx> +#include <iostream> +#include <sstream> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <utility> + +class cmCommand; namespace { diff --git a/Source/cmake.h b/Source/cmake.h index 91a23cdaf3..9dc429d78e 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -15,25 +15,23 @@ #include <cmConfigure.h> -#include "cmStandardIncludes.h" - -#include "cmCacheManager.h" #include "cmInstalledFile.h" #include "cmListFileCache.h" #include "cmState.h" -#include "cmSystemTools.h" -class cmGlobalGeneratorFactory; +#include <map> +#include <set> +#include <string> +#include <vector> + +class cmExternalMakefileProjectGeneratorFactory; +class cmFileTimeComparison; class cmGlobalGenerator; -class cmLocalGenerator; +class cmGlobalGeneratorFactory; class cmMakefile; class cmMessenger; class cmVariableWatch; -class cmFileTimeComparison; -class cmExternalMakefileProjectGeneratorFactory; -class cmDocumentationSection; -class cmTarget; -class cmGeneratedFileStream; +struct cmDocumentationEntry; /** \brief Represents a cmake invocation. * diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index db6d51b3a7..1450949780 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -17,18 +17,23 @@ #endif #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmGlobalGenerator.h" -#include "cmListFileCache.h" -#include "cmLocalGenerator.h" #include "cmMakefile.h" -#include "cmSourceFile.h" #include "cmState.h" +#include "cmSystemTools.h" #include "cmake.h" #include "cmcmd.h" + +#include <cmConfigure.h> #include <cmsys/Encoding.hxx> +#include <iostream> +#include <string.h> +#include <string> +#include <vector> #ifdef CMAKE_USE_LIBUV -#include "cm_uv.h" +#include <cm_uv.h> #endif #ifdef CMAKE_BUILD_WITH_CMAKE diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index f25c085f69..c2e1d53af5 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -16,29 +16,37 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmQtAutoGenerators.h" +#include "cmState.h" +#include "cmSystemTools.h" #include "cmUtils.hxx" #include "cmVersion.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmDependsFortran.h" // For -E cmake_copy_f90_mod callback. #endif -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/Process.h> -#include <cmsys/Terminal.h> +#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(_WIN32) +#include "bindexplib.h" +#endif #if defined(CMAKE_BUILD_WITH_CMAKE) && defined(_WIN32) && !defined(__CYGWIN__) #include "cmVisualStudioWCEPlatformParser.h" #endif +#include <algorithm> +#include <cmConfigure.h> +#include <cmsys/Directory.hxx> +#include <cmsys/FStream.hxx> +#include <cmsys/Process.h> +#include <cmsys/Terminal.h> +#include <iostream> +#include <sstream> +#include <stdio.h> +#include <stdlib.h> #include <time.h> -#include <stdlib.h> // required for atoi -#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) -#include "bindexplib.h" -#endif - void CMakeCommandUsage(const char* program) { std::ostringstream errorStream; diff --git a/Source/cmcmd.h b/Source/cmcmd.h index 1096d0ce61..cd6222d2ff 100644 --- a/Source/cmcmd.h +++ b/Source/cmcmd.h @@ -13,9 +13,10 @@ #ifndef cmcmd_h #define cmcmd_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include <string> +#include <vector> class cmcmd { diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 38ff64f237..93a6ebb8dc 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -9,16 +9,21 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include "cmCTest.h" -#include "cmSystemTools.h" -// Need these for documentation support. -#include "cmDocumentation.h" -#include "cmake.h" +#include <cmConfigure.h> #include "CTest/cmCTestLaunch.h" #include "CTest/cmCTestScriptHandler.h" -#include "cmsys/Encoding.hxx" +#include "cmCTest.h" +#include "cmDocumentation.h" +#include "cmSystemTools.h" +#include "cmake.h" + +#include <cmsys/Encoding.hxx> +#include <iostream> +#include <string.h> +#include <string> +#include <vector> static const char* cmDocumentationName[][2] = { { CM_NULLPTR, " ctest - Testing driver provided by CMake." }, |