diff options
author | Brad King <brad.king@kitware.com> | 2016-09-03 12:10:18 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-09-03 12:10:18 (GMT) |
commit | bfdf1322e7638687c96b323b1df20fd9c08b3044 (patch) | |
tree | c216079eb479d30f8dacd119dbdc5f487966b44e | |
parent | 4da61391eec301ab564ac8e3e5ee9dc7ffd4f8de (diff) | |
parent | efed6468eda950644014ccfada85300710e05009 (diff) | |
download | CMake-bfdf1322e7638687c96b323b1df20fd9c08b3044.zip CMake-bfdf1322e7638687c96b323b1df20fd9c08b3044.tar.gz CMake-bfdf1322e7638687c96b323b1df20fd9c08b3044.tar.bz2 |
Merge topic 'include-what-you-use'
efed6468 fix a load of include-what-you-use violations
bd3d0eaf cmCTest: don't redefine cout and cerr
3838a0d5 make sure to include cmConfigure.h before cmStandardIncludes.h
54140848 Tests/CMakeLib: include what you use
3f9c4cdf Tests/CMakeLib: use cmsys::ifstream
204 files changed, 1222 insertions, 415 deletions
diff --git a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h index acf1fa6..63a2ec0 100644 --- a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h +++ b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h @@ -13,6 +13,8 @@ #ifndef cmWIXRichTextFormatWriter_h #define cmWIXRichTextFormatWriter_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" #include <cmsys/FStream.hxx> diff --git a/Source/CPack/cmCPackComponentGroup.h b/Source/CPack/cmCPackComponentGroup.h index 01a9e76..78b81b3 100644 --- a/Source/CPack/cmCPackComponentGroup.h +++ b/Source/CPack/cmCPackComponentGroup.h @@ -13,6 +13,8 @@ #ifndef cmCPackComponentGroup_h #define cmCPackComponentGroup_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" class cmCPackComponentGroup; diff --git a/Source/CursesDialog/cmCursesStandardIncludes.h b/Source/CursesDialog/cmCursesStandardIncludes.h index 7b44df9..0953978 100644 --- a/Source/CursesDialog/cmCursesStandardIncludes.h +++ b/Source/CursesDialog/cmCursesStandardIncludes.h @@ -12,6 +12,8 @@ #ifndef cmCursesStandardIncludes_h #define cmCursesStandardIncludes_h +#include <cmConfigure.h> + #include "../cmStandardIncludes.h" #if defined(__sun__) && defined(__GNUC__) diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index ee3389c..5a8a5be 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/bindexplib.h b/Source/bindexplib.h index 8661a4a..715808a 100644 --- a/Source/bindexplib.h +++ b/Source/bindexplib.h @@ -13,6 +13,8 @@ #ifndef bindexplib_h #define bindexplib_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index ee803c8..a6c71d2 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -12,6 +12,8 @@ #ifndef cmAlgorithms_h #define cmAlgorithms_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" inline bool cmHasLiteralPrefixImpl(const std::string& str1, const char* str2, diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index b4ddc3e..6523e3e 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 b6657c9..a73cd83 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -13,18 +13,20 @@ #ifndef cmCTest_h #define cmCTest_h -#include "cmStandardIncludes.h" +#include <cmConfigure.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) \ @@ -43,16 +45,6 @@ class cmXMLWriter; cmCTestLog_msg.str().c_str(), suppress); \ } while (0) -#ifdef cerr -#undef cerr -#endif -#define cerr no_cerr_use_cmCTestLog - -#ifdef cout -#undef cout -#endif -#define cout no_cout_use_cmCTestLog - /** \class cmCTest * \brief Represents a ctest invocation. * diff --git a/Source/cmCallVisualStudioMacro.h b/Source/cmCallVisualStudioMacro.h index e516fe2..fd735cf 100644 --- a/Source/cmCallVisualStudioMacro.h +++ b/Source/cmCallVisualStudioMacro.h @@ -12,6 +12,8 @@ #ifndef cmCallVisualStudioMacro_h #define cmCallVisualStudioMacro_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" /** \class cmCallVisualStudioMacro diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 68111a0..6a2dfe8 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 97b706c..6faf12b 100644 --- a/Source/cmCommandArgumentParserHelper.h +++ b/Source/cmCommandArgumentParserHelper.h @@ -12,7 +12,10 @@ #ifndef cmCommandArgumentParserHelper_h #define cmCommandArgumentParserHelper_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#include <string> +#include <vector> #define YYSTYPE cmCommandArgumentParserHelper::ParserType #define YYSTYPE_IS_DECLARED diff --git a/Source/cmCommandArgumentsHelper.h b/Source/cmCommandArgumentsHelper.h index 9133148..19a6f8d 100644 --- a/Source/cmCommandArgumentsHelper.h +++ b/Source/cmCommandArgumentsHelper.h @@ -12,6 +12,8 @@ #ifndef cmCommandArgumentsHelper_h #define cmCommandArgumentsHelper_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" class cmCommandArgumentsHelper; diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index d7532b3..94f03e8 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/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index cb671dd..ccea22d 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -12,7 +12,7 @@ #ifndef cmConfigure_h #define cmConfigure_h -#include <cmsys/Configure.hxx> +#include <cmsys/Configure.hxx> // IWYU pragma: keep #ifdef _MSC_VER #pragma warning(disable : 4786) diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx index 8e2d87e..a3d3dd5 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 4e92b06..0be2918 100644 --- a/Source/cmCryptoHash.h +++ b/Source/cmCryptoHash.h @@ -12,9 +12,11 @@ #ifndef cmCryptoHash_h #define cmCryptoHash_h -#include "cmStandardIncludes.h" +#include <cmConfigure.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 5bc4f91..eec773f 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 26bf94e..6434f50 100644 --- a/Source/cmCurl.h +++ b/Source/cmCurl.h @@ -12,9 +12,10 @@ #ifndef cmCurl_h #define cmCurl_h -#include "cmStandardIncludes.h" +#include <cmConfigure.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 eaa49b0..89a04d1 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 34753f4..b855bb9 100644 --- a/Source/cmCustomCommand.h +++ b/Source/cmCustomCommand.h @@ -12,9 +12,15 @@ #ifndef cmCustomCommand_h #define cmCustomCommand_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 6165bcf..8b8579b 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 a361153..f4cd9fd 100644 --- a/Source/cmCustomCommandGenerator.h +++ b/Source/cmCustomCommandGenerator.h @@ -12,11 +12,14 @@ #ifndef cmCustomCommandGenerator_h #define cmCustomCommandGenerator_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#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 e0fb59b..fecc488 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 8f1813c..d1423ec 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -12,20 +12,23 @@ #ifndef cmDefinitions_h #define cmDefinitions_h -#include "cmStandardIncludes.h" +#include <cmConfigure.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 ce72eda..23ff3a4 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 0e1cbb9..5ed784d 100644 --- a/Source/cmDepends.h +++ b/Source/cmDepends.h @@ -12,7 +12,14 @@ #ifndef cmDepends_h #define cmDepends_h -#include "cmStandardIncludes.h" +#include <cmConfigure.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 928f7ec..fbbf42f 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 bde07b7..5606fb3 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 8c0acce..1eece98 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 f4385eb..b6de46f 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 a9130e6..18bc695 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 5bb3039..95265c5 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/cmDependsJavaLexer.cxx b/Source/cmDependsJavaLexer.cxx index f7676d9..5d644ce 100644 --- a/Source/cmDependsJavaLexer.cxx +++ b/Source/cmDependsJavaLexer.cxx @@ -1,3 +1,5 @@ +#include <cmConfigure.h> + #include "cmStandardIncludes.h" #line 2 "cmDependsJavaLexer.cxx" diff --git a/Source/cmDependsJavaParserHelper.cxx b/Source/cmDependsJavaParserHelper.cxx index 79c4669..8d77ca6 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 6ff0245..731bbcc 100644 --- a/Source/cmDependsJavaParserHelper.h +++ b/Source/cmDependsJavaParserHelper.h @@ -12,7 +12,10 @@ #ifndef cmDependsJavaParserHelper_h #define cmDependsJavaParserHelper_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#include <string> +#include <vector> #define YYSTYPE cmDependsJavaParserHelper::ParserType #define YYSTYPE_IS_DECLARED diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 5516cf1..13736b9 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 ac36c8b..7661eb7 100644 --- a/Source/cmDocumentation.h +++ b/Source/cmDocumentation.h @@ -12,15 +12,17 @@ #ifndef _cmDocumentation_h #define _cmDocumentation_h -#include "cmStandardIncludes.h" +#include <cmConfigure.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 4816bb9..5a718a2 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 7c4c35b..09fb20b 100644 --- a/Source/cmDocumentationFormatter.h +++ b/Source/cmDocumentationFormatter.h @@ -12,7 +12,9 @@ #ifndef _cmDocumentationFormatter_h #define _cmDocumentationFormatter_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#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 161a731..1d41070 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 f6841ad..762feee 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 58d9ae9..4f6ade5 100644 --- a/Source/cmDynamicLoader.h +++ b/Source/cmDynamicLoader.h @@ -17,7 +17,7 @@ #ifndef cmDynamicLoader_h #define cmDynamicLoader_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 150593b..6fff984 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 80832ad..a4c3456 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/cmExecutionStatus.h b/Source/cmExecutionStatus.h index 8006514..14e1454 100644 --- a/Source/cmExecutionStatus.h +++ b/Source/cmExecutionStatus.h @@ -12,6 +12,8 @@ #ifndef cmExecutionStatus_h #define cmExecutionStatus_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" /** \class cmExecutionStatus diff --git a/Source/cmExpandedCommandArgument.h b/Source/cmExpandedCommandArgument.h index 1f8e405..fa0eaa9 100644 --- a/Source/cmExpandedCommandArgument.h +++ b/Source/cmExpandedCommandArgument.h @@ -12,6 +12,8 @@ #ifndef cmExpandedCommandArgument_h #define cmExpandedCommandArgument_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" /** \class cmExpandedCommandArgument diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index 390477a..8f4dfd8 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 417e8c9..990824f 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 7f01196..23c77d9 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 9c96015..354994a 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 7747157..ceba69a 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 68960db..c693dc1 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 49f2cac..4f3c9d8 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 ac1c66e..42fb781 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 d2954e3..c3a55ba 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 2916e6b..a0aefb8 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 1d13711..27d5b3c 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/cmExprLexer.cxx b/Source/cmExprLexer.cxx index 4704f03..b16ec1a 100644 --- a/Source/cmExprLexer.cxx +++ b/Source/cmExprLexer.cxx @@ -1,3 +1,5 @@ +#include <cmConfigure.h> + #include "cmStandardIncludes.h" #line 2 "/home/andy/vtk/CMake-bin/Source/cmExprLexer.cxx" diff --git a/Source/cmExprParserHelper.cxx b/Source/cmExprParserHelper.cxx index 1a101ab..3a76367 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 af0b916..7402484 100644 --- a/Source/cmExprParserHelper.h +++ b/Source/cmExprParserHelper.h @@ -12,7 +12,10 @@ #ifndef cmExprParserHelper_h #define cmExprParserHelper_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#include <string> +#include <vector> #define YYSTYPE cmExprParserHelper::ParserType #define YYSTYPE_IS_DECLARED @@ -24,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 b01290c..e4d124f 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 6ae5533..b306f19 100644 --- a/Source/cmExternalMakefileProjectGenerator.h +++ b/Source/cmExternalMakefileProjectGenerator.h @@ -12,11 +12,13 @@ #ifndef cmExternalMakefileProjectGenerator_h #define cmExternalMakefileProjectGenerator_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep -#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 6eae26b..7eb3a74 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 b39080c..179be30 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 eda6867..a039f49 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 e20e745..f5765d8 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 945ee40..5a98e34 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 4b585c3..97b7bd7 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 4e72504..36ab5b3 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 3d16052..518dead 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 6e81ee1..8ee275a 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 c087825..ee2b253 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 538b716..90bb1b2 100644 --- a/Source/cmFileLock.h +++ b/Source/cmFileLock.h @@ -13,7 +13,9 @@ #ifndef cmFileLock_h #define cmFileLock_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#include <string> #if defined(_WIN32) #include <windows.h> // HANDLE diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h index dc42e6f..d1883e7 100644 --- a/Source/cmFileLockPool.h +++ b/Source/cmFileLockPool.h @@ -12,12 +12,13 @@ #ifndef cmFileLockPool_h #define cmFileLockPool_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 090fe60..de851bc 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 d5ac354..54b9626 100644 --- a/Source/cmFileLockResult.h +++ b/Source/cmFileLockResult.h @@ -13,7 +13,9 @@ #ifndef cmFileLockResult_h #define cmFileLockResult_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#include <string> #if defined(_WIN32) #include <windows.h> // DWORD diff --git a/Source/cmFilePathUuid.cxx b/Source/cmFilePathUuid.cxx index f99646c..b2def51 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 42e89b1..87cfcf8 100644 --- a/Source/cmFilePathUuid.h +++ b/Source/cmFilePathUuid.h @@ -13,8 +13,9 @@ #ifndef cmFilePathUuid_h #define cmFilePathUuid_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 1360b44..089d520 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 409bd64..ea5c47e 100644 --- a/Source/cmFileTimeComparison.h +++ b/Source/cmFileTimeComparison.h @@ -12,7 +12,7 @@ #ifndef cmFileTimeComparison_h #define cmFileTimeComparison_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep class cmFileTimeComparisonInternal; diff --git a/Source/cmFortranParser.h b/Source/cmFortranParser.h index 07e1b1c..5f1c7ac 100644 --- a/Source/cmFortranParser.h +++ b/Source/cmFortranParser.h @@ -13,6 +13,8 @@ #define cmFortranParser_h #if !defined(cmFortranLexer_cxx) && !defined(cmFortranParser_cxx) +#include <cmConfigure.h> + #include "cmStandardIncludes.h" #endif diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx index 30a33b4..71edf9f 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/cmFunctionBlocker.h b/Source/cmFunctionBlocker.h index c7e3b71..4a600e7 100644 --- a/Source/cmFunctionBlocker.h +++ b/Source/cmFunctionBlocker.h @@ -12,6 +12,8 @@ #ifndef cmFunctionBlocker_h #define cmFunctionBlocker_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" #include "cmExecutionStatus.h" diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index c35a1bc..9a83070 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 3480c5b..4c4f26b 100644 --- a/Source/cmGeneratedFileStream.h +++ b/Source/cmGeneratedFileStream.h @@ -12,9 +12,10 @@ #ifndef cmGeneratedFileStream_h #define cmGeneratedFileStream_h -#include "cmStandardIncludes.h" +#include <cmConfigure.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 6cd6439..b016d9e 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 2f91608..24233b3 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -13,22 +13,22 @@ #ifndef cmGeneratorExpression_h #define cmGeneratorExpression_h -#include "cmStandardIncludes.h" +#include <cmConfigure.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 8da6b50..77289d1 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 045ded1..c477443 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 6b7fe9a..c6d7281 100644 --- a/Source/cmGeneratorExpressionDAGChecker.h +++ b/Source/cmGeneratorExpressionDAGChecker.h @@ -12,9 +12,16 @@ #ifndef cmGeneratorExpressionDAGChecker_h #define cmGeneratorExpressionDAGChecker_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> -#include "cmGeneratorExpressionEvaluator.h" +#include "cmListFileCache.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 c01c4fc..aad9d1b 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 52ba2d8..3a668a2 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 b4b74c5..d21ab25 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 58e732b..5e8ebe0 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 72ad731..55836ac 100644 --- a/Source/cmGeneratorExpressionLexer.h +++ b/Source/cmGeneratorExpressionLexer.h @@ -12,8 +12,10 @@ #ifndef cmGeneratorExpressionLexer_h #define cmGeneratorExpressionLexer_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 12cf980..44e9ce1 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 3ee57eb..23f405b 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 f853f8d..c753f9b 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 b0e9ea4..4534d6b 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 8bd3b82..ee2907c 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 f9987aa..173f15d 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/cmGhsMultiGpj.h b/Source/cmGhsMultiGpj.h index b388455..4d8a757 100644 --- a/Source/cmGhsMultiGpj.h +++ b/Source/cmGhsMultiGpj.h @@ -12,6 +12,8 @@ #ifndef cmGhsMultiGpj_h #define cmGhsMultiGpj_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" class cmGeneratedFileStream; diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 3d35114..d3c9625 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 900b08e..d8ea317 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 a48ff4f..5bc16c3 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 50c5a42..ef8266f 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 089a637..1e1479a 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -13,15 +13,20 @@ #ifndef cmGlobalGenerator_h #define cmGlobalGenerator_h -#include "cmStandardIncludes.h" +#include <cmConfigure.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" @@ -32,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/cmGlobalGeneratorFactory.h b/Source/cmGlobalGeneratorFactory.h index 74d3145..26bc2c0 100644 --- a/Source/cmGlobalGeneratorFactory.h +++ b/Source/cmGlobalGeneratorFactory.h @@ -13,6 +13,10 @@ #ifndef cmGlobalGeneratorFactory_h #define cmGlobalGeneratorFactory_h +#include <cmConfigure.h> + +#include <cmConfigure.h> + #include "cmStandardIncludes.h" class cmake; diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 0ae913e..d75ebf8 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 daf7003..aaa1108 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 666527c..6a201b0 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 590f207..30a05a0 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 082ee3a..a0fad64 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 77fbbe9..d90ebf0 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 ceb4140..3724124 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 df831e5..819feb1 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 45d9522..ea008ad 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 67ac230..08be304 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 2c0168e..53a05a0 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 86fe6f2..d8f1d93 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 bc0d786..df1168e 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/cmGraphAdjacencyList.h b/Source/cmGraphAdjacencyList.h index 5666d48..65bed5e 100644 --- a/Source/cmGraphAdjacencyList.h +++ b/Source/cmGraphAdjacencyList.h @@ -12,6 +12,8 @@ #ifndef cmGraphAdjacencyList_h #define cmGraphAdjacencyList_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" /** diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index adb9936..2824f7e 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 c73d82d..f34e967 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -12,13 +12,19 @@ #ifndef CMGRAPHVIZWRITER_H #define CMGRAPHVIZWRITER_H -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#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/cmHexFileConverter.h b/Source/cmHexFileConverter.h index 56fa9b1..06616a2 100644 --- a/Source/cmHexFileConverter.h +++ b/Source/cmHexFileConverter.h @@ -12,6 +12,8 @@ #ifndef cmHexFileConverter_h #define cmHexFileConverter_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" /** \class cmHexFileConverter diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index fac7d4e..df0f82e 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -12,6 +12,8 @@ #ifndef cmIDEOptions_h #define cmIDEOptions_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" #include "cmIDEFlagTable.h" diff --git a/Source/cmInstallCommandArguments.h b/Source/cmInstallCommandArguments.h index 6ccb3e8..2ef421f 100644 --- a/Source/cmInstallCommandArguments.h +++ b/Source/cmInstallCommandArguments.h @@ -13,6 +13,8 @@ #ifndef cmInstallCommandArguments_h #define cmInstallCommandArguments_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" #include "cmCommandArgumentsHelper.h" diff --git a/Source/cmInstallDirectoryGenerator.cxx b/Source/cmInstallDirectoryGenerator.cxx index 469b119..3b4226d 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 93becf4..ed40785 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 72c4d1f..27628f4 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 22e661b..5539827 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 93a740c..1d0fadd 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 5cb09f4..1648976 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 e3d5bad..69120a8 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 ad9fc28..fa0bdd6 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 76d6b71..7871100 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 dc00359..609294f 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 4b2f40c..1ad59ff 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 b1c28b8..797e962 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 bfc5cf1..3ab7db0 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 00ff611..8bad5a5 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/cmLinkedTree.h b/Source/cmLinkedTree.h index 6b31074..466aaa7 100644 --- a/Source/cmLinkedTree.h +++ b/Source/cmLinkedTree.h @@ -12,6 +12,8 @@ #ifndef cmLinkedTree_h #define cmLinkedTree_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" #include <assert.h> diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index aad538c..14bb81e 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 cd44536..215f179 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -12,7 +12,11 @@ #ifndef cmListFileCache_h #define cmListFileCache_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#include <iosfwd> +#include <string> +#include <vector> #include "cmState.h" @@ -149,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 1383421..0e79293 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 0a8753d..9012afd 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 de9e1e5..cecf7b7 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 fa4bb30..a43a7d1 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -12,19 +12,27 @@ #ifndef cmLocalGenerator_h #define cmLocalGenerator_h -#include "cmStandardIncludes.h" +#include <cmConfigure.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 d15ee22..6793f84 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 6e61087..25539d4 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 3c4841e..611c502 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 3e90055..bd32e10 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 37b5505..0fe7987 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 b492962..d344dc5 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 db87946..098779e 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/cmLocale.h b/Source/cmLocale.h index f922c03..f9bc458 100644 --- a/Source/cmLocale.h +++ b/Source/cmLocale.h @@ -12,6 +12,8 @@ #ifndef cmLocale_h #define cmLocale_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" #include <locale.h> diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index d1fddca..11ccca1 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 4d137db..eb382df 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 43fa150..fe67050 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 f15bf13..c69eb8e 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/cmNinjaTypes.h b/Source/cmNinjaTypes.h index 82a5220..d3816bb 100644 --- a/Source/cmNinjaTypes.h +++ b/Source/cmNinjaTypes.h @@ -13,6 +13,8 @@ #ifndef cmNinjaTypes_h #define cmNinjaTypes_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" typedef std::vector<std::string> cmNinjaDeps; diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx index dbfe6eb..3ddcc9a 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 55a3c75..ff472ec 100644 --- a/Source/cmOSXBundleGenerator.h +++ b/Source/cmOSXBundleGenerator.h @@ -12,17 +12,16 @@ #ifndef cmOSXBundleGenerator_h #define cmOSXBundleGenerator_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/cmObject.h b/Source/cmObject.h index d883c52..cb683f6 100644 --- a/Source/cmObject.h +++ b/Source/cmObject.h @@ -12,6 +12,8 @@ #ifndef cmObject_h #define cmObject_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" /** \class cmObject diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx index 20f2246..d7ad83d 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 38e197c..081e8a0 100644 --- a/Source/cmOrderDirectories.h +++ b/Source/cmOrderDirectories.h @@ -12,14 +12,18 @@ #ifndef cmOrderDirectories_h #define cmOrderDirectories_h -#include "cmStandardIncludes.h" +#include <cmConfigure.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 630da42..d44fbb7 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 9af9659..ac58ddc 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -12,11 +12,13 @@ #ifndef cmOutputConverter_h #define cmOutputConverter_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep -#include "cmGlobalGenerator.h" #include "cmState.h" +#include <string> +#include <vector> + class cmOutputConverter { public: diff --git a/Source/cmPathLabel.h b/Source/cmPathLabel.h index 39fbec3..e065110 100644 --- a/Source/cmPathLabel.h +++ b/Source/cmPathLabel.h @@ -12,6 +12,8 @@ #ifndef cmPathLabel_h #define cmPathLabel_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" /** \class cmPathLabel diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index f1da4d5..00f1370 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 b411597..fedb388 100644 --- a/Source/cmQtAutoGeneratorInitializer.h +++ b/Source/cmQtAutoGeneratorInitializer.h @@ -14,13 +14,8 @@ #ifndef cmQtAutoGeneratorInitializer_h #define cmQtAutoGeneratorInitializer_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep -#include <map> -#include <string> -#include <vector> - -class cmSourceFile; class cmGeneratorTarget; class cmLocalGenerator; diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index a261962..329c742 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 fab2d19..32975c2 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -14,10 +14,11 @@ #ifndef cmQtAutoGenerators_h #define cmQtAutoGenerators_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 10d1cda..7f80923 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 0e379b6..f37af88 100644 --- a/Source/cmRST.h +++ b/Source/cmRST.h @@ -12,9 +12,14 @@ #ifndef _cmRST_h #define _cmRST_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 a000258..1ab70e2 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 ef0766f..abe9a1d 100644 --- a/Source/cmScriptGenerator.h +++ b/Source/cmScriptGenerator.h @@ -12,7 +12,11 @@ #ifndef cmScriptGenerator_h #define cmScriptGenerator_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#include <ostream> +#include <string> +#include <vector> class cmScriptGeneratorIndent { diff --git a/Source/cmSearchPath.h b/Source/cmSearchPath.h index 65f703f..7624d03 100644 --- a/Source/cmSearchPath.h +++ b/Source/cmSearchPath.h @@ -12,6 +12,8 @@ #ifndef cmSearchPath_h #define cmSearchPath_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" class cmFindCommon; diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 5869a01..3aa4b92 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 a3808f7..2c6d831 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 099a6f0..e2a1552 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 7989173..e4e5116 100644 --- a/Source/cmSourceFileLocation.h +++ b/Source/cmSourceFileLocation.h @@ -12,7 +12,9 @@ #ifndef cmSourceFileLocation_h #define cmSourceFileLocation_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#include <string> class cmMakefile; diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h index 1f5232e..c5e6311 100644 --- a/Source/cmSourceGroup.h +++ b/Source/cmSourceGroup.h @@ -12,12 +12,14 @@ #ifndef cmSourceGroup_h #define cmSourceGroup_h -#include "cmStandardIncludes.h" +#include <cmConfigure.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 21a50cb..be0ee50 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/cmTargetDepend.h b/Source/cmTargetDepend.h index 954d8f6..f30705d 100644 --- a/Source/cmTargetDepend.h +++ b/Source/cmTargetDepend.h @@ -12,6 +12,8 @@ #ifndef cmTargetDepend_h #define cmTargetDepend_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" class cmGeneratorTarget; diff --git a/Source/cmTargetExport.h b/Source/cmTargetExport.h index 2781337..b3882c4 100644 --- a/Source/cmTargetExport.h +++ b/Source/cmTargetExport.h @@ -12,6 +12,8 @@ #ifndef cmTargetExport_h #define cmTargetExport_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" class cmGeneratorTarget; diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index cfc174e..090c9d6 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/cmTimestamp.h b/Source/cmTimestamp.h index 77e1f7a..3a72caa 100644 --- a/Source/cmTimestamp.h +++ b/Source/cmTimestamp.h @@ -12,6 +12,8 @@ #ifndef cmTimestamp_h #define cmTimestamp_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" #include <string> diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 109a100..72a70df 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -12,6 +12,8 @@ #ifndef cmVisualStudioTargetGenerator_h #define cmVisualStudioTargetGenerator_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" class cmMakefile; diff --git a/Source/cmVisualStudioSlnData.h b/Source/cmVisualStudioSlnData.h index 4508370..982b976 100644 --- a/Source/cmVisualStudioSlnData.h +++ b/Source/cmVisualStudioSlnData.h @@ -12,6 +12,8 @@ #ifndef cmVisualStudioSlnData_h #define cmVisualStudioSlnData_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" class cmSlnProjectEntry diff --git a/Source/cmVisualStudioSlnParser.h b/Source/cmVisualStudioSlnParser.h index b9f8a92..62fd936 100644 --- a/Source/cmVisualStudioSlnParser.h +++ b/Source/cmVisualStudioSlnParser.h @@ -12,6 +12,8 @@ #ifndef cmVisualStudioSlnParser_h #define cmVisualStudioSlnParser_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" #include <bitset> diff --git a/Source/cmVisualStudioWCEPlatformParser.h b/Source/cmVisualStudioWCEPlatformParser.h index 2b20eba..ca58a9a 100644 --- a/Source/cmVisualStudioWCEPlatformParser.h +++ b/Source/cmVisualStudioWCEPlatformParser.h @@ -12,6 +12,8 @@ #ifndef cmVisualStudioWCEPlatformParser_h #define cmVisualStudioWCEPlatformParser_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" #include "cmXMLParser.h" diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h index ed917af..a0aa2b7 100644 --- a/Source/cmXCodeObject.h +++ b/Source/cmXCodeObject.h @@ -12,6 +12,8 @@ #ifndef cmXCodeObject_h #define cmXCodeObject_h +#include <cmConfigure.h> + #include "cmStandardIncludes.h" class cmGeneratorTarget; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 701a5e5..25f9e3a 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 dbe936b..9dc429d 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -13,25 +13,25 @@ #ifndef cmake_h #define cmake_h -#include "cmStandardIncludes.h" +#include <cmConfigure.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 db6d51b..1450949 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 f25c085..c2e1d53 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 8da2103..cd6222d 100644 --- a/Source/cmcmd.h +++ b/Source/cmcmd.h @@ -13,7 +13,10 @@ #ifndef cmcmd_h #define cmcmd_h -#include "cmStandardIncludes.h" +#include <cmConfigure.h> // IWYU pragma: keep + +#include <string> +#include <vector> class cmcmd { diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 38ff64f..93a6ebb 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." }, diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index 502ffe7..529c830 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -1,6 +1,6 @@ #include "cmSystemTools.h" -#include <fstream> +#include <cmsys/FStream.hxx> #include <iostream> #include <map> #include <stdlib.h> @@ -26,7 +26,10 @@ public: }; typedef std::vector<CommandType> TranslationUnitsType; - CompileCommandParser(std::ifstream* input) { this->Input = input; } + CompileCommandParser(std::istream& input) + : Input(input) + { + } void Parse() { @@ -109,8 +112,8 @@ private: void Next() { - this->C = char(Input->get()); - if (this->Input->bad()) { + this->C = char(Input.get()); + if (this->Input.bad()) { ErrorExit("Unexpected end of file."); } } @@ -131,13 +134,13 @@ private: TranslationUnitsType TranslationUnits; CommandType Command; std::string String; - std::ifstream* Input; + std::istream& Input; }; int main() { - std::ifstream file("compile_commands.json"); - CompileCommandParser parser(&file); + cmsys::ifstream file("compile_commands.json"); + CompileCommandParser parser(file); parser.Parse(); for (CompileCommandParser::TranslationUnitsType::const_iterator it = parser.GetTranslationUnits().begin(), diff --git a/Tests/CMakeLib/testGeneratedFileStream.cxx b/Tests/CMakeLib/testGeneratedFileStream.cxx index e5a2f4d..a31cc42 100644 --- a/Tests/CMakeLib/testGeneratedFileStream.cxx +++ b/Tests/CMakeLib/testGeneratedFileStream.cxx @@ -12,6 +12,9 @@ #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" +#include <iostream> +#include <string> + #define cmFailed(m1, m2) \ std::cout << "FAILED: " << m1 << m2 << "\n"; \ failed = 1 diff --git a/Tests/CMakeLib/testRST.cxx b/Tests/CMakeLib/testRST.cxx index e5a96c2..cc92693 100644 --- a/Tests/CMakeLib/testRST.cxx +++ b/Tests/CMakeLib/testRST.cxx @@ -10,9 +10,12 @@ See the License for more information. ============================================================================*/ #include "cmRST.h" - #include "cmSystemTools.h" +#include <cmsys/FStream.hxx> +#include <iostream> +#include <string> + void reportLine(std::ostream& os, bool ret, std::string const& line, bool eol) { if (ret) { @@ -52,8 +55,8 @@ int testRST(int argc, char* argv[]) } // Compare expected and actual outputs. - std::ifstream e_fin(e_name.c_str()); - std::ifstream a_fin(a_name.c_str()); + cmsys::ifstream e_fin(e_name.c_str()); + cmsys::ifstream a_fin(a_name.c_str()); if (!e_fin) { std::cerr << "Could not open input " << e_name << std::endl; return 1; diff --git a/Tests/CMakeLib/testUTF8.cxx b/Tests/CMakeLib/testUTF8.cxx index 019a2dd..c99a925 100644 --- a/Tests/CMakeLib/testUTF8.cxx +++ b/Tests/CMakeLib/testUTF8.cxx @@ -10,9 +10,7 @@ See the License for more information. ============================================================================*/ #include <cm_utf8.h> - #include <stdio.h> -#include <string.h> typedef char test_utf8_char[5]; diff --git a/Tests/CMakeLib/testXMLSafe.cxx b/Tests/CMakeLib/testXMLSafe.cxx index 4970ccc..356880c 100644 --- a/Tests/CMakeLib/testXMLSafe.cxx +++ b/Tests/CMakeLib/testXMLSafe.cxx @@ -9,9 +9,11 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include <cmXMLSafe.h> +#include "cmXMLSafe.h" -#include "cmStandardIncludes.h" +#include <sstream> +#include <stdio.h> +#include <string> struct test_pair { |