diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-11-25 21:10:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-11-28 19:06:40 (GMT) |
commit | 7b4244aceb44aad117dfaccfb2287fbddbe9eca7 (patch) | |
tree | 4c20dcad1bdaa5889577c43c80305211b13d3599 /Source | |
parent | aeff60e44c203dd67b316a6c6eab1454a408e1f7 (diff) | |
download | CMake-7b4244aceb44aad117dfaccfb2287fbddbe9eca7.zip CMake-7b4244aceb44aad117dfaccfb2287fbddbe9eca7.tar.gz CMake-7b4244aceb44aad117dfaccfb2287fbddbe9eca7.tar.bz2 |
iwyu: Fix more findings
Diffstat (limited to 'Source')
25 files changed, 155 insertions, 125 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx index 0098a4b..ba3248f 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx +++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx @@ -2,6 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackIFWInstaller.h" +#include <cmConfigure.h> +#include <sstream> +#include <stddef.h> +#include <utility> + #include "CPack/cmCPackGenerator.h" #include "CPack/cmCPackLog.h" #include "cmCPackIFWGenerator.h" @@ -12,9 +17,6 @@ #include "cmXMLParser.h" #include "cmXMLWriter.h" -#include <cmConfigure.h> -#include <utility> - #ifdef cmCPackLogger #undef cmCPackLogger #endif diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 09b9c0d..3878a32 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -2,24 +2,24 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackGenerator.h" +#include <algorithm> +#include <cmsys/FStream.hxx> +#include <cmsys/Glob.hxx> +#include <cmsys/RegularExpression.hxx> +#include <list> +#include <utility> + #include "cmCPackComponentGroup.h" #include "cmCPackLog.h" #include "cmCryptoHash.h" #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmStateTypes.h" +#include "cmStateSnapshot.h" #include "cmXMLSafe.h" #include "cm_auto_ptr.hxx" #include "cmake.h" -#include <algorithm> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/RegularExpression.hxx> -#include <list> -#include <utility> - #if defined(__HAIKU__) #include <FindDirectory.h> #include <StorageDefs.h> diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index f32dd70..b43bf8a 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -5,14 +5,15 @@ #include <cmConfigure.h> -#include "cmCPackComponentGroup.h" -#include "cmSystemTools.h" - #include <map> #include <sstream> #include <string> #include <vector> +#include "cmCPackComponentGroup.h" +#include "cmSystemTools.h" + +class cmCPackGenerator; class cmCPackLog; class cmInstalledFile; class cmMakefile; diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx index 2a0e65b..b012f01 100644 --- a/Source/CPack/cmCPackGeneratorFactory.cxx +++ b/Source/CPack/cmCPackGeneratorFactory.cxx @@ -2,9 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackGeneratorFactory.h" +#include <cmConfigure.h> +#include <ostream> +#include <utility> + #include "IFW/cmCPackIFWGenerator.h" +#include "cmAlgorithms.h" #include "cmCPack7zGenerator.h" #include "cmCPackGenerator.h" +#include "cmCPackLog.h" #include "cmCPackNSISGenerator.h" #include "cmCPackSTGZGenerator.h" #include "cmCPackTGZGenerator.h" @@ -36,12 +42,6 @@ #include "WiX/cmCPackWIXGenerator.h" #endif -#include "cmAlgorithms.h" -#include "cmCPackLog.h" - -#include <ostream> -#include <utility> - cmCPackGeneratorFactory::cmCPackGeneratorFactory() { if (cmCPackTGZGenerator::CanGenerate()) { diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h index 0a98f91..4ee0bc1 100644 --- a/Source/CPack/cmCPackGeneratorFactory.h +++ b/Source/CPack/cmCPackGeneratorFactory.h @@ -3,7 +3,7 @@ #ifndef cmCPackGeneratorFactory_h #define cmCPackGeneratorFactory_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep #include <map> #include <string> diff --git a/Source/CPack/cmCPackLog.cxx b/Source/CPack/cmCPackLog.cxx index 317f613..7d5c192 100644 --- a/Source/CPack/cmCPackLog.cxx +++ b/Source/CPack/cmCPackLog.cxx @@ -2,11 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackLog.h" +#include <cmConfigure.h> +#include <iostream> + #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" -#include <iostream> - cmCPackLog::cmCPackLog() { this->Verbose = false; diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h index 9ffe5c4..419c932 100644 --- a/Source/CPack/cmCPackLog.h +++ b/Source/CPack/cmCPackLog.h @@ -3,7 +3,7 @@ #ifndef cmCPackLog_h #define cmCPackLog_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep #include <ostream> #include <string.h> diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx index 9817327..8ec03c2 100644 --- a/Source/CPack/cmCPackRPMGenerator.cxx +++ b/Source/CPack/cmCPackRPMGenerator.cxx @@ -2,17 +2,18 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackRPMGenerator.h" -#include "cmCPackComponentGroup.h" -#include "cmCPackGenerator.h" -#include "cmCPackLog.h" -#include "cmSystemTools.h" - #include <algorithm> +#include <ctype.h> #include <map> #include <ostream> #include <utility> #include <vector> +#include "cmCPackComponentGroup.h" +#include "cmCPackGenerator.h" +#include "cmCPackLog.h" +#include "cmSystemTools.h" + cmCPackRPMGenerator::cmCPackRPMGenerator() { } diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx index 66ba9f6..682394e 100644 --- a/Source/CPack/cmCPackSTGZGenerator.cxx +++ b/Source/CPack/cmCPackSTGZGenerator.cxx @@ -2,10 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackSTGZGenerator.h" -#include "cmCPackGenerator.h" -#include "cmCPackLog.h" -#include "cmSystemTools.h" - #include <cmsys/FStream.hxx> #include <sstream> #include <stdio.h> @@ -16,6 +12,10 @@ // include sys/stat.h after sys/types.h #include <sys/stat.h> +#include "cmCPackGenerator.h" +#include "cmCPackLog.h" +#include "cmSystemTools.h" + cmCPackSTGZGenerator::cmCPackSTGZGenerator() { } diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 06472c6..fa526ae 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -2,6 +2,20 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include <cmConfigure.h> +#include <cmsys/CommandLineArguments.hxx> +#include <cmsys/Encoding.hxx> +#include <iostream> +#include <map> +#include <sstream> +#include <stddef.h> +#include <string> +#include <utility> +#include <vector> + +#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) +#include <cmsys/ConsoleBuf.hxx> +#endif + #include "cmCPackGenerator.h" #include "cmCPackGeneratorFactory.h" #include "cmCPackLog.h" @@ -10,24 +24,11 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmState.h" -#include "cmStateTypes.h" +#include "cmStateSnapshot.h" #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" #include "cmake.h" -#include <cmsys/CommandLineArguments.hxx> -#include <cmsys/Encoding.hxx> -#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) -#include <cmsys/ConsoleBuf.hxx> -#endif -#include <iostream> -#include <map> -#include <sstream> -#include <stddef.h> -#include <string> -#include <utility> -#include <vector> - static const char* cmDocumentationName[][2] = { { CM_NULLPTR, " cpack - Packaging driver provided by CMake." }, { CM_NULLPTR, CM_NULLPTR } diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx index 20512ea..d30f6b3 100644 --- a/Source/CTest/cmCTestGIT.cxx +++ b/Source/CTest/cmCTestGIT.cxx @@ -2,12 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestGIT.h" -#include "cmAlgorithms.h" -#include "cmCTest.h" -#include "cmCTestVC.h" -#include "cmProcessTools.h" -#include "cmSystemTools.h" - #include <cmsys/FStream.hxx> #include <cmsys/Process.h> #include <ctype.h> @@ -16,6 +10,13 @@ #include <time.h> #include <vector> +#include "cmAlgorithms.h" +#include "cmCTest.h" +#include "cmCTestVC.h" +#include "cmProcessOutput.h" +#include "cmProcessTools.h" +#include "cmSystemTools.h" + static unsigned int cmCTestGITVersion(unsigned int epic, unsigned int major, unsigned int minor, unsigned int fix) { diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx index c093cc6..7638f45 100644 --- a/Source/CTest/cmCTestGenericHandler.cxx +++ b/Source/CTest/cmCTestGenericHandler.cxx @@ -2,12 +2,13 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestGenericHandler.h" -#include "cmCTest.h" -#include "cmSystemTools.h" - +#include <cmConfigure.h> #include <sstream> #include <utility> +#include "cmCTest.h" +#include "cmSystemTools.h" + cmCTestGenericHandler::cmCTestGenericHandler() { this->HandlerVerbose = cmSystemTools::OUTPUT_NONE; diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h index 4176eb2..2ebbe70 100644 --- a/Source/CTest/cmCTestGenericHandler.h +++ b/Source/CTest/cmCTestGenericHandler.h @@ -3,16 +3,16 @@ #ifndef cmCTestGenericHandler_h #define cmCTestGenericHandler_h -#include <cmConfigure.h> - -#include "cmCTest.h" -#include "cmSystemTools.h" +#include <cmConfigure.h> // IWYU pragma: keep #include <map> #include <stddef.h> #include <string> #include <vector> +#include "cmCTest.h" +#include "cmSystemTools.h" + class cmCTestCommand; class cmGeneratedFileStream; class cmMakefile; diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index 43c0fef..03e0319 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -4,24 +4,24 @@ #include <cmConfigure.h> +#include <cmsys/FStream.hxx> +#include <cmsys/Process.h> +#include <cmsys/RegularExpression.hxx> +#include <iostream> +#include <stdlib.h> +#include <string.h> + #include "cmCryptoHash.h" #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmProcessOutput.h" -#include "cmStateTypes.h" +#include "cmStateSnapshot.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" +#include "cm_auto_ptr.hxx" #include "cmake.h" -#include <cm_auto_ptr.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/Process.h> -#include <cmsys/RegularExpression.hxx> -#include <iostream> -#include <stdlib.h> -#include <string.h> - #ifdef _WIN32 #include <fcntl.h> // for _O_BINARY #include <io.h> // for _setmode diff --git a/Source/CTest/cmCTestMemCheckCommand.cxx b/Source/CTest/cmCTestMemCheckCommand.cxx index 5e4c5ae..fd7c3a9 100644 --- a/Source/CTest/cmCTestMemCheckCommand.cxx +++ b/Source/CTest/cmCTestMemCheckCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestMemCheckCommand.h" +#include <sstream> +#include <vector> + #include "cmCTest.h" #include "cmCTestGenericHandler.h" #include "cmCTestMemCheckHandler.h" diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h index a10e271..ee4630a 100644 --- a/Source/CTest/cmCTestRunTest.h +++ b/Source/CTest/cmCTestRunTest.h @@ -5,11 +5,13 @@ #include <cmConfigure.h> // IWYU pragma: keep -#include <cmCTestTestHandler.h> +#include <set> #include <stddef.h> #include <string> #include <vector> +#include "cmCTestTestHandler.h" + class cmCTest; class cmProcess; diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 08ea4ee..b537242 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -2,6 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestScriptHandler.h" +#include <cmsys/Directory.hxx> +#include <cmsys/Process.h> +#include <map> +#include <sstream> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <utility> + #include "cmCTest.h" #include "cmCTestBuildCommand.h" #include "cmCTestCommand.h" @@ -23,19 +32,10 @@ #include "cmMakefile.h" #include "cmState.h" #include "cmStateDirectory.h" -#include "cmStateTypes.h" +#include "cmStateSnapshot.h" #include "cmSystemTools.h" #include "cmake.h" -#include <cmsys/Directory.hxx> -#include <cmsys/Process.h> -#include <map> -#include <sstream> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <utility> - #ifdef _WIN32 #include <windows.h> #else diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 2b2d207..0f13c1e 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -2,6 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestSubmitHandler.h" +#include <cm_curl.h> +#include <cm_jsoncpp_reader.h> +#include <cm_jsoncpp_value.h> +#include <cmsys/Process.h> +#include <sstream> +#include <stdio.h> +#include <stdlib.h> + #include "cmCTest.h" #include "cmCTestCurl.h" #include "cmCTestScriptHandler.h" @@ -9,19 +17,11 @@ #include "cmGeneratedFileStream.h" #include "cmProcessOutput.h" #include "cmState.h" -#include "cmStateTypes.h" #include "cmSystemTools.h" +#include "cmThirdParty.h" #include "cmXMLParser.h" #include "cmake.h" -#include <cm_curl.h> -#include <cm_jsoncpp_reader.h> -#include <cm_jsoncpp_value.h> -#include <cmsys/Process.h> -#include <sstream> -#include <stdio.h> -#include <stdlib.h> - #if defined(CTEST_USE_XMLRPC) #include "cmVersion.h" #include <cm_xmlrpc.h> diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 132d049..ab43dbc 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -2,21 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestTestHandler.h" -#include "cmCTest.h" -#include "cmCTestBatchTestHandler.h" -#include "cmCTestMultiProcessHandler.h" -#include "cmCommand.h" -#include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmMakefile.h" -#include "cmState.h" -#include "cmStateTypes.h" -#include "cmSystemTools.h" -#include "cmXMLWriter.h" -#include "cm_auto_ptr.hxx" -#include "cm_utf8.h" -#include "cmake.h" - #include <algorithm> #include <cmsys/Base64.h> #include <cmsys/Directory.hxx> @@ -32,6 +17,21 @@ #include <string.h> #include <time.h> +#include "cmCTest.h" +#include "cmCTestBatchTestHandler.h" +#include "cmCTestMultiProcessHandler.h" +#include "cmCommand.h" +#include "cmGeneratedFileStream.h" +#include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmState.h" +#include "cmStateSnapshot.h" +#include "cmSystemTools.h" +#include "cmXMLWriter.h" +#include "cm_auto_ptr.hxx" +#include "cm_utf8.h" +#include "cmake.h" + class cmExecutionStatus; class cmCTestSubdirCommand : public cmCommand diff --git a/Source/CTest/cmCTestUploadCommand.cxx b/Source/CTest/cmCTestUploadCommand.cxx index 9266bce..717117a 100644 --- a/Source/CTest/cmCTestUploadCommand.cxx +++ b/Source/CTest/cmCTestUploadCommand.cxx @@ -2,6 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestUploadCommand.h" +#include <sstream> +#include <vector> + #include "cmCTest.h" #include "cmCTestGenericHandler.h" #include "cmCTestUploadHandler.h" @@ -9,8 +12,6 @@ #include "cmSystemTools.h" #include "cmake.h" -#include <sstream> - cmCTestGenericHandler* cmCTestUploadCommand::InitializeHandler() { cmCTestGenericHandler* handler = diff --git a/Source/CTest/cmCTestVC.h b/Source/CTest/cmCTestVC.h index dd8b973..2681ba0 100644 --- a/Source/CTest/cmCTestVC.h +++ b/Source/CTest/cmCTestVC.h @@ -5,11 +5,12 @@ #include <cmConfigure.h> -#include "cmProcessTools.h" - #include <iosfwd> #include <string> +#include "cmProcessOutput.h" +#include "cmProcessTools.h" + class cmCTest; class cmXMLWriter; diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 4436327..8db2e5f 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -14,6 +14,7 @@ #include <time.h> #include <vector> +class cmCTest; class cmCTestGenericHandler; class cmCTestStartCommand; class cmGeneratedFileStream; diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h index 26d55b3..0b562da 100644 --- a/Source/cmCryptoHash.h +++ b/Source/cmCryptoHash.h @@ -3,12 +3,14 @@ #ifndef cmCryptoHash_h #define cmCryptoHash_h -#include <cmConfigure.h> +#include <cmConfigure.h> // IWYU pragma: keep -#include <cm_auto_ptr.hxx> +#include <stddef.h> #include <string> #include <vector> +#include "cm_auto_ptr.hxx" + /** * @brief Abstract base class for cryptographic hash generators */ diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index c2e37c1..2f6238b 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2,15 +2,39 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFileCommand.h" +#include <algorithm> +#include <assert.h> +#include <cm_kwiml.h> +#include <cmsys/Directory.hxx> +#include <cmsys/FStream.hxx> +#include <cmsys/Glob.hxx> +#include <cmsys/RegularExpression.hxx> +#include <cmsys/String.hxx> +#include <list> +#include <sstream> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include <sys/types.h> +// include sys/stat.h after sys/types.h +#include <sys/stat.h> + #include "cmAlgorithms.h" +#include "cmCommandArgumentsHelper.h" #include "cmCryptoHash.h" -#include "cmCryptoHash.h" +#include "cmFileLockPool.h" #include "cmFileTimeComparison.h" +#include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" #include "cmHexFileConverter.h" #include "cmInstallType.h" +#include "cmListFileCache.h" #include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmSystemTools.h" #include "cmTimestamp.h" +#include "cm_auto_ptr.hxx" #include "cmake.h" #if defined(CMAKE_BUILD_WITH_CMAKE) @@ -18,20 +42,7 @@ #include "cmFileLockResult.h" #endif -#undef GetCurrentDirectory -#include <assert.h> -#include <stdlib.h> - -#include <sys/types.h> -// include sys/stat.h after sys/types.h -#include <sys/stat.h> - -#include <cm_auto_ptr.hxx> -#include <cmsys/Directory.hxx> -#include <cmsys/Encoding.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/RegularExpression.hxx> +class cmSystemToolsFileTime; // Table of permissions flags. #if defined(_WIN32) && !defined(__CYGWIN__) diff --git a/Source/cmProcessOutput.h b/Source/cmProcessOutput.h index d7a5e98..6a4e7d5 100644 --- a/Source/cmProcessOutput.h +++ b/Source/cmProcessOutput.h @@ -5,6 +5,7 @@ #include <cmConfigure.h> // IWYU pragma: keep +#include <stddef.h> #include <string> #include <vector> |