summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/IFW/cmCPackIFWCommon.cxx10
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.cxx6
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.h10
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx8
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.h4
-rw-r--r--Source/CPack/IFW/cmCPackIFWPackage.cxx10
-rw-r--r--Source/CPack/IFW/cmCPackIFWPackage.h4
-rw-r--r--Source/CPack/IFW/cmCPackIFWRepository.cxx4
-rw-r--r--Source/CPack/IFW/cmCPackIFWRepository.h4
-rw-r--r--Source/CPack/OSXScriptLauncher.cxx8
-rw-r--r--Source/CPack/WiX/cmCMakeToWixPath.cxx4
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx18
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.h7
-rw-r--r--Source/CPack/WiX/cmWIXAccessControlList.cxx1
-rw-r--r--Source/CPack/WiX/cmWIXAccessControlList.h3
-rw-r--r--Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h5
-rw-r--r--Source/CPack/WiX/cmWIXFeaturesSourceWriter.h3
-rw-r--r--Source/CPack/WiX/cmWIXFilesSourceWriter.cxx9
-rw-r--r--Source/CPack/WiX/cmWIXFilesSourceWriter.h6
-rw-r--r--Source/CPack/WiX/cmWIXPatch.h4
-rw-r--r--Source/CPack/WiX/cmWIXPatchParser.cxx4
-rw-r--r--Source/CPack/WiX/cmWIXPatchParser.h7
-rw-r--r--Source/CPack/WiX/cmWIXRichTextFormatWriter.h3
-rw-r--r--Source/CPack/WiX/cmWIXShortcut.h4
-rw-r--r--Source/CPack/WiX/cmWIXSourceWriter.cxx5
-rw-r--r--Source/CPack/WiX/cmWIXSourceWriter.h6
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx12
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.h6
-rw-r--r--Source/CPack/cmCPackComponentGroup.cxx4
-rw-r--r--Source/CPack/cmCPackCygwinBinaryGenerator.cxx4
-rw-r--r--Source/CPack/cmCPackCygwinSourceGenerator.cxx7
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx20
-rw-r--r--Source/CPack/cmCPackDebGenerator.h4
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx19
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.h3
-rw-r--r--Source/CPack/cmCPackExternalGenerator.cxx22
-rw-r--r--Source/CPack/cmCPackExternalGenerator.h6
-rw-r--r--Source/CPack/cmCPackFreeBSDGenerator.cxx10
-rw-r--r--Source/CPack/cmCPackFreeBSDGenerator.h4
-rw-r--r--Source/CPack/cmCPackGenerator.cxx7
-rw-r--r--Source/CPack/cmCPackLog.h3
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx19
-rw-r--r--Source/CPack/cmCPackNSISGenerator.h4
-rw-r--r--Source/CPack/cmCPackNuGetGenerator.cxx10
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.cxx5
-rw-r--r--Source/CPack/cmCPackRPMGenerator.h4
-rw-r--r--Source/CPack/cmCPackSTGZGenerator.cxx3
-rw-r--r--Source/CPack/cmCPackSTGZGenerator.h4
-rw-r--r--Source/CPack/cpack.cxx6
-rw-r--r--Source/CTest/cmCTestBZR.cxx18
-rw-r--r--Source/CTest/cmCTestBZR.h4
-rw-r--r--Source/CTest/cmCTestBuildAndTestHandler.cxx13
-rw-r--r--Source/CTest/cmCTestBuildAndTestHandler.h9
-rw-r--r--Source/CTest/cmCTestBuildCommand.cxx9
-rw-r--r--Source/CTest/cmCTestBuildCommand.h6
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx17
-rw-r--r--Source/CTest/cmCTestBuildHandler.h14
-rw-r--r--Source/CTest/cmCTestCVS.cxx14
-rw-r--r--Source/CTest/cmCTestCVS.h4
-rw-r--r--Source/CTest/cmCTestConfigureCommand.cxx11
-rw-r--r--Source/CTest/cmCTestConfigureCommand.h6
-rw-r--r--Source/CTest/cmCTestConfigureHandler.cxx8
-rw-r--r--Source/CTest/cmCTestCoverageCommand.cxx3
-rw-r--r--Source/CTest/cmCTestCoverageCommand.h6
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx29
-rw-r--r--Source/CTest/cmCTestCoverageHandler.h7
-rw-r--r--Source/CTest/cmCTestCurl.cxx6
-rw-r--r--Source/CTest/cmCTestCurl.h3
-rw-r--r--Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx4
-rw-r--r--Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h6
-rw-r--r--Source/CTest/cmCTestGIT.cxx5
-rw-r--r--Source/CTest/cmCTestGIT.h4
-rw-r--r--Source/CTest/cmCTestGenericHandler.h3
-rw-r--r--Source/CTest/cmCTestGlobalVC.cxx6
-rw-r--r--Source/CTest/cmCTestGlobalVC.h4
-rw-r--r--Source/CTest/cmCTestHG.cxx9
-rw-r--r--Source/CTest/cmCTestHG.h4
-rw-r--r--Source/CTest/cmCTestHandlerCommand.cxx13
-rw-r--r--Source/CTest/cmCTestHandlerCommand.h6
-rw-r--r--Source/CTest/cmCTestLaunch.cxx7
-rw-r--r--Source/CTest/cmCTestLaunch.h3
-rw-r--r--Source/CTest/cmCTestMemCheckCommand.cxx3
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx19
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.h4
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx41
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.h8
-rw-r--r--Source/CTest/cmCTestP4.cxx13
-rw-r--r--Source/CTest/cmCTestP4.h4
-rw-r--r--Source/CTest/cmCTestReadCustomFilesCommand.h6
-rw-r--r--Source/CTest/cmCTestRunScriptCommand.h6
-rw-r--r--Source/CTest/cmCTestRunTest.cxx19
-rw-r--r--Source/CTest/cmCTestRunTest.h3
-rw-r--r--Source/CTest/cmCTestSVN.cxx13
-rw-r--r--Source/CTest/cmCTestSVN.h4
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx22
-rw-r--r--Source/CTest/cmCTestScriptHandler.h6
-rw-r--r--Source/CTest/cmCTestSleepCommand.cxx4
-rw-r--r--Source/CTest/cmCTestSleepCommand.h6
-rw-r--r--Source/CTest/cmCTestStartCommand.cxx6
-rw-r--r--Source/CTest/cmCTestStartCommand.h6
-rw-r--r--Source/CTest/cmCTestSubmitCommand.cxx15
-rw-r--r--Source/CTest/cmCTestSubmitCommand.h4
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx7
-rw-r--r--Source/CTest/cmCTestSubmitHandler.h6
-rw-r--r--Source/CTest/cmCTestTestCommand.cxx11
-rw-r--r--Source/CTest/cmCTestTestCommand.h6
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx42
-rw-r--r--Source/CTest/cmCTestTestHandler.h14
-rw-r--r--Source/CTest/cmCTestUpdateCommand.h6
-rw-r--r--Source/CTest/cmCTestUpdateHandler.cxx10
-rw-r--r--Source/CTest/cmCTestUpdateHandler.h4
-rw-r--r--Source/CTest/cmCTestUploadCommand.cxx3
-rw-r--r--Source/CTest/cmCTestUploadCommand.h6
-rw-r--r--Source/CTest/cmCTestUploadHandler.cxx6
-rw-r--r--Source/CTest/cmCTestUploadHandler.h4
-rw-r--r--Source/CTest/cmCTestVC.cxx13
-rw-r--r--Source/CTest/cmParseBlanketJSCoverage.cxx9
-rw-r--r--Source/CTest/cmParseCacheCoverage.cxx15
-rw-r--r--Source/CTest/cmParseCacheCoverage.h4
-rw-r--r--Source/CTest/cmParseCoberturaCoverage.cxx9
-rw-r--r--Source/CTest/cmParseDelphiCoverage.cxx11
-rw-r--r--Source/CTest/cmParseGTMCoverage.cxx15
-rw-r--r--Source/CTest/cmParseGTMCoverage.h4
-rw-r--r--Source/CTest/cmParseJacocoCoverage.cxx13
-rw-r--r--Source/CTest/cmParseMumpsCoverage.cxx15
-rw-r--r--Source/CTest/cmParsePHPCoverage.cxx11
-rw-r--r--Source/CTest/cmProcess.cxx11
-rw-r--r--Source/CTest/cmProcess.h16
-rw-r--r--Source/CursesDialog/ccmake.cxx15
-rw-r--r--Source/CursesDialog/cmCursesBoolWidget.cxx4
-rw-r--r--Source/CursesDialog/cmCursesCacheEntryComposite.cxx12
-rw-r--r--Source/CursesDialog/cmCursesForm.h4
-rw-r--r--Source/CursesDialog/cmCursesLabelWidget.h4
-rw-r--r--Source/CursesDialog/cmCursesLongMessageForm.cxx6
-rw-r--r--Source/CursesDialog/cmCursesLongMessageForm.h6
-rw-r--r--Source/CursesDialog/cmCursesMainForm.cxx14
-rw-r--r--Source/CursesDialog/cmCursesMainForm.h10
-rw-r--r--Source/CursesDialog/cmCursesOptionsWidget.h6
-rw-r--r--Source/CursesDialog/cmCursesPathWidget.cxx4
-rw-r--r--Source/CursesDialog/cmCursesPathWidget.h4
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.cxx4
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.h4
-rw-r--r--Source/CursesDialog/cmCursesWidget.h4
-rw-r--r--Source/QtDialog/AddCacheEntry.h1
-rw-r--r--Source/QtDialog/CMakeSetup.cxx29
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx10
-rw-r--r--Source/QtDialog/CMakeSetupDialog.h4
-rw-r--r--Source/QtDialog/Compilers.h4
-rw-r--r--Source/QtDialog/FirstConfigure.cxx7
-rw-r--r--Source/QtDialog/QCMakeCacheView.cxx3
-rw-r--r--Source/QtDialog/QCMakeCacheView.h1
-rw-r--r--Source/QtDialog/QCMakeWidgets.cxx3
-rw-r--r--Source/QtDialog/RegexExplorer.h6
-rw-r--r--Source/QtDialog/WarningMessagesDialog.h2
-rw-r--r--Source/bindexplib.cxx9
-rw-r--r--Source/bindexplib.h3
-rw-r--r--Source/cmAffinity.cxx1
-rw-r--r--Source/cmAlgorithms.h6
-rw-r--r--Source/cmArchiveWrite.cxx20
-rw-r--r--Source/cmArgumentParser.h7
-rw-r--r--Source/cmAuxSourceDirectoryCommand.cxx3
-rw-r--r--Source/cmBinUtilsLinker.cxx1
-rw-r--r--Source/cmBinUtilsLinker.h4
-rw-r--r--Source/cmBinUtilsLinuxELFGetRuntimeDependenciesTool.cxx1
-rw-r--r--Source/cmBinUtilsLinuxELFLinker.cxx12
-rw-r--r--Source/cmBinUtilsLinuxELFLinker.h8
-rw-r--r--Source/cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.cxx9
-rw-r--r--Source/cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.h4
-rw-r--r--Source/cmBinUtilsMacOSMachOLinker.cxx10
-rw-r--r--Source/cmBinUtilsMacOSMachOLinker.h8
-rw-r--r--Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx6
-rw-r--r--Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.h4
-rw-r--r--Source/cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.cxx7
-rw-r--r--Source/cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.h4
-rw-r--r--Source/cmBinUtilsWindowsPEGetRuntimeDependenciesTool.cxx1
-rw-r--r--Source/cmBinUtilsWindowsPELinker.cxx10
-rw-r--r--Source/cmBinUtilsWindowsPELinker.h6
-rw-r--r--Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx7
-rw-r--r--Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.h4
-rw-r--r--Source/cmBuildNameCommand.cxx3
-rw-r--r--Source/cmCLocaleEnvironmentScope.cxx4
-rw-r--r--Source/cmCMakeHostSystemInformationCommand.cxx3
-rw-r--r--Source/cmCPackPropertiesGenerator.cxx6
-rw-r--r--Source/cmCPackPropertiesGenerator.h4
-rw-r--r--Source/cmCPluginAPI.cxx4
-rw-r--r--Source/cmCTest.cxx18
-rw-r--r--Source/cmCTest.h6
-rw-r--r--Source/cmCacheManager.cxx5
-rw-r--r--Source/cmCheckCustomOutputs.h4
-rw-r--r--Source/cmCommandArgumentParserHelper.cxx8
-rw-r--r--Source/cmCommands.cxx8
-rw-r--r--Source/cmComputeComponentGraph.cxx1
-rw-r--r--Source/cmComputeComponentGraph.h4
-rw-r--r--Source/cmComputeLinkDepends.cxx20
-rw-r--r--Source/cmComputeLinkDepends.h11
-rw-r--r--Source/cmComputeLinkInformation.cxx12
-rw-r--r--Source/cmComputeLinkInformation.h3
-rw-r--r--Source/cmComputeTargetDepends.cxx10
-rw-r--r--Source/cmComputeTargetDepends.h6
-rw-r--r--Source/cmConditionEvaluator.cxx3
-rw-r--r--Source/cmConnection.cxx7
-rw-r--r--Source/cmConnection.h7
-rw-r--r--Source/cmCoreTryCompile.cxx6
-rw-r--r--Source/cmCryptoHash.cxx7
-rw-r--r--Source/cmCryptoHash.h4
-rw-r--r--Source/cmCurl.h3
-rw-r--r--Source/cmCustomCommand.cxx4
-rw-r--r--Source/cmCustomCommand.h6
-rw-r--r--Source/cmCustomCommandGenerator.cxx8
-rw-r--r--Source/cmCustomCommandGenerator.h3
-rw-r--r--Source/cmDefinitions.cxx4
-rw-r--r--Source/cmDefinitions.h11
-rw-r--r--Source/cmDepends.cxx9
-rw-r--r--Source/cmDependsC.cxx3
-rw-r--r--Source/cmDependsC.h10
-rw-r--r--Source/cmDependsFortran.cxx3
-rw-r--r--Source/cmDependsJava.h4
-rw-r--r--Source/cmDependsJavaParserHelper.cxx12
-rw-r--r--Source/cmDocumentation.cxx15
-rw-r--r--Source/cmDocumentation.h6
-rw-r--r--Source/cmDocumentationFormatter.cxx6
-rw-r--r--Source/cmDocumentationSection.h6
-rw-r--r--Source/cmELF.cxx12
-rw-r--r--Source/cmExecProgramCommand.cxx3
-rw-r--r--Source/cmExecuteProcessCommand.cxx7
-rw-r--r--Source/cmExecutionStatus.h1
-rw-r--r--Source/cmExportBuildFileGenerator.cxx12
-rw-r--r--Source/cmExportBuildFileGenerator.h8
-rw-r--r--Source/cmExportCommand.cxx7
-rw-r--r--Source/cmExportFileGenerator.cxx17
-rw-r--r--Source/cmExportFileGenerator.h10
-rw-r--r--Source/cmExportInstallFileGenerator.cxx8
-rw-r--r--Source/cmExportInstallFileGenerator.h6
-rw-r--r--Source/cmExportLibraryDependenciesCommand.cxx3
-rw-r--r--Source/cmExportTryCompileFileGenerator.cxx8
-rw-r--r--Source/cmExportTryCompileFileGenerator.h4
-rw-r--r--Source/cmExprParserHelper.cxx6
-rw-r--r--Source/cmExprParserHelper.h4
-rw-r--r--Source/cmExternalMakefileProjectGenerator.cxx4
-rw-r--r--Source/cmExtraCodeBlocksGenerator.h4
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx15
-rw-r--r--Source/cmExtraCodeLiteGenerator.h4
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx3
-rw-r--r--Source/cmExtraEclipseCDT4Generator.h4
-rw-r--r--Source/cmExtraKateGenerator.cxx10
-rw-r--r--Source/cmExtraKateGenerator.h4
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx3
-rw-r--r--Source/cmExtraSublimeTextGenerator.h4
-rw-r--r--Source/cmFileAPI.cxx23
-rw-r--r--Source/cmFileAPI.h8
-rw-r--r--Source/cmFileAPICMakeFiles.cxx10
-rw-r--r--Source/cmFileAPICache.cxx12
-rw-r--r--Source/cmFileAPICodemodel.cxx30
-rw-r--r--Source/cmFileCommand.cxx15
-rw-r--r--Source/cmFileCopier.cxx5
-rw-r--r--Source/cmFileCopier.h7
-rw-r--r--Source/cmFileInstaller.cxx8
-rw-r--r--Source/cmFileInstaller.h7
-rw-r--r--Source/cmFileLock.cxx3
-rw-r--r--Source/cmFileLockUnix.cxx7
-rw-r--r--Source/cmFileLockWin32.cxx4
-rw-r--r--Source/cmFileMonitor.cxx7
-rw-r--r--Source/cmFilePathChecksum.cxx4
-rw-r--r--Source/cmFileTime.cxx3
-rw-r--r--Source/cmFileTimeCache.h3
-rw-r--r--Source/cmFileTimes.cxx3
-rw-r--r--Source/cmFindLibraryCommand.cxx3
-rw-r--r--Source/cmFindPackageCommand.cxx13
-rw-r--r--Source/cmFindPackageCommand.h3
-rw-r--r--Source/cmFortranParserImpl.cxx9
-rw-r--r--Source/cmGeneratedFileStream.h6
-rw-r--r--Source/cmGeneratorExpression.cxx5
-rw-r--r--Source/cmGeneratorExpression.h4
-rw-r--r--Source/cmGeneratorExpressionContext.h4
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.cxx8
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.h4
-rw-r--r--Source/cmGeneratorExpressionEvaluationFile.cxx3
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx6
-rw-r--r--Source/cmGeneratorExpressionNode.cxx35
-rw-r--r--Source/cmGeneratorExpressionParser.cxx6
-rw-r--r--Source/cmGeneratorTarget.cxx6
-rw-r--r--Source/cmGeneratorTarget.h10
-rw-r--r--Source/cmGetPipes.cxx5
-rw-r--r--Source/cmGhsMultiGpj.h1
-rw-r--r--Source/cmGhsMultiTargetGenerator.cxx14
-rw-r--r--Source/cmGhsMultiTargetGenerator.h4
-rw-r--r--Source/cmGlobVerificationManager.cxx3
-rw-r--r--Source/cmGlobVerificationManager.h4
-rw-r--r--Source/cmGlobalBorlandMakefileGenerator.h4
-rw-r--r--Source/cmGlobalCommonGenerator.cxx4
-rw-r--r--Source/cmGlobalCommonGenerator.h4
-rw-r--r--Source/cmGlobalGenerator.cxx10
-rw-r--r--Source/cmGlobalGenerator.h6
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx12
-rw-r--r--Source/cmGlobalGhsMultiGenerator.h9
-rw-r--r--Source/cmGlobalJOMMakefileGenerator.h4
-rw-r--r--Source/cmGlobalNMakeMakefileGenerator.h4
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx10
-rw-r--r--Source/cmGlobalNinjaGenerator.h3
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx15
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx17
-rw-r--r--Source/cmGlobalVisualStudio7Generator.h3
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx9
-rw-r--r--Source/cmGlobalWatcomWMakeGenerator.cxx4
-rw-r--r--Source/cmGlobalWatcomWMakeGenerator.h6
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx3
-rw-r--r--Source/cmGraphAdjacencyList.h4
-rw-r--r--Source/cmGraphVizWriter.h7
-rw-r--r--Source/cmHexFileConverter.h1
-rw-r--r--Source/cmIDEOptions.cxx4
-rw-r--r--Source/cmIfCommand.cxx6
-rw-r--r--Source/cmInstallCommand.cxx9
-rw-r--r--Source/cmInstallCommandArguments.cxx7
-rw-r--r--Source/cmInstallDirectoryGenerator.h6
-rw-r--r--Source/cmInstallExportGenerator.h6
-rw-r--r--Source/cmInstallFilesGenerator.h6
-rw-r--r--Source/cmInstallGenerator.cxx4
-rw-r--r--Source/cmInstallGenerator.h6
-rw-r--r--Source/cmInstallScriptGenerator.h6
-rw-r--r--Source/cmInstallSubdirectoryGenerator.cxx6
-rw-r--r--Source/cmInstallSubdirectoryGenerator.h4
-rw-r--r--Source/cmInstallTargetGenerator.h8
-rw-r--r--Source/cmInstalledFile.cxx4
-rw-r--r--Source/cmJsonObjects.cxx24
-rw-r--r--Source/cmJsonObjects.h4
-rw-r--r--Source/cmLDConfigLDConfigTool.cxx13
-rw-r--r--Source/cmLDConfigLDConfigTool.h4
-rw-r--r--Source/cmLinkItem.cxx4
-rw-r--r--Source/cmListCommand.cxx3
-rw-r--r--Source/cmListFileCache.cxx10
-rw-r--r--Source/cmLoadCacheCommand.cxx3
-rw-r--r--Source/cmLoadCommandCommand.cxx5
-rw-r--r--Source/cmLocalGenerator.cxx7
-rw-r--r--Source/cmLocalGenerator.h3
-rw-r--r--Source/cmLocalGhsMultiGenerator.cxx6
-rw-r--r--Source/cmLocalGhsMultiGenerator.h4
-rw-r--r--Source/cmLocalNinjaGenerator.cxx3
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx5
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.h6
-rw-r--r--Source/cmLocalVisualStudio10Generator.cxx4
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx15
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx3
-rw-r--r--Source/cmMachO.cxx7
-rw-r--r--Source/cmMakefile.cxx12
-rw-r--r--Source/cmMakefile.h3
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.h4
-rw-r--r--Source/cmMathCommand.cxx7
-rw-r--r--Source/cmMessageCommand.cxx4
-rw-r--r--Source/cmMessenger.h4
-rw-r--r--Source/cmNinjaNormalTargetGenerator.h6
-rw-r--r--Source/cmNinjaTargetGenerator.cxx5
-rw-r--r--Source/cmNinjaTargetGenerator.h12
-rw-r--r--Source/cmNinjaUtilityTargetGenerator.cxx14
-rw-r--r--Source/cmOSXBundleGenerator.cxx6
-rw-r--r--Source/cmOrderDirectories.cxx12
-rw-r--r--Source/cmOrderDirectories.h3
-rw-r--r--Source/cmOutputConverter.h4
-rw-r--r--Source/cmOutputRequiredFilesCommand.cxx5
-rw-r--r--Source/cmParseArgumentsCommand.cxx3
-rw-r--r--Source/cmPipeConnection.h5
-rw-r--r--Source/cmPolicies.cxx14
-rw-r--r--Source/cmProcessTools.cxx6
-rw-r--r--Source/cmProcessTools.h3
-rw-r--r--Source/cmProjectCommand.cxx3
-rw-r--r--Source/cmPropertyDefinition.h4
-rw-r--r--Source/cmPropertyDefinitionMap.h6
-rw-r--r--Source/cmQtAutoGen.cxx17
-rw-r--r--Source/cmQtAutoGen.h4
-rw-r--r--Source/cmQtAutoGenGlobalInitializer.cxx8
-rw-r--r--Source/cmQtAutoGenGlobalInitializer.h4
-rw-r--r--Source/cmQtAutoGenInitializer.cxx41
-rw-r--r--Source/cmQtAutoGenInitializer.h9
-rw-r--r--Source/cmQtAutoGenerator.cxx6
-rw-r--r--Source/cmQtAutoGenerator.h13
-rw-r--r--Source/cmQtAutoMocUic.cxx34
-rw-r--r--Source/cmQtAutoRcc.cxx8
-rw-r--r--Source/cmRST.cxx15
-rw-r--r--Source/cmRST.h3
-rw-r--r--Source/cmRuntimeDependencyArchive.cxx3
-rw-r--r--Source/cmRuntimeDependencyArchive.h8
-rw-r--r--Source/cmScriptGenerator.cxx4
-rw-r--r--Source/cmServer.cxx24
-rw-r--r--Source/cmServer.h12
-rw-r--r--Source/cmServerConnection.cxx6
-rw-r--r--Source/cmServerProtocol.cxx21
-rw-r--r--Source/cmServerProtocol.h7
-rw-r--r--Source/cmSourceFile.h8
-rw-r--r--Source/cmSourceFileLocation.cxx4
-rw-r--r--Source/cmSourceGroup.cxx4
-rw-r--r--Source/cmSourceGroup.h3
-rw-r--r--Source/cmState.cxx3
-rw-r--r--Source/cmString.hxx7
-rw-r--r--Source/cmStringAlgorithms.h8
-rw-r--r--Source/cmStringCommand.cxx3
-rw-r--r--Source/cmStringReplaceHelper.cxx3
-rw-r--r--Source/cmStringReplaceHelper.h4
-rw-r--r--Source/cmSubcommandTable.h8
-rw-r--r--Source/cmSystemTools.cxx25
-rw-r--r--Source/cmSystemTools.h15
-rw-r--r--Source/cmTarget.cxx3
-rw-r--r--Source/cmTargetPrecompileHeadersCommand.cxx4
-rw-r--r--Source/cmTest.h6
-rw-r--r--Source/cmTestGenerator.h4
-rw-r--r--Source/cmTryRunCommand.cxx3
-rw-r--r--Source/cmUVProcessChain.cxx12
-rw-r--r--Source/cmUVProcessChain.h4
-rw-r--r--Source/cmUVStreambuf.h8
-rw-r--r--Source/cmUuid.cxx4
-rw-r--r--Source/cmVSSetupHelper.cxx5
-rw-r--r--Source/cmVSSetupHelper.h4
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx13
-rw-r--r--Source/cmVisualStudioSlnParser.cxx9
-rw-r--r--Source/cmVisualStudioSlnParser.h3
-rw-r--r--Source/cmVisualStudioWCEPlatformParser.h3
-rw-r--r--Source/cmWhileCommand.cxx6
-rw-r--r--Source/cmWorkerPool.cxx13
-rw-r--r--Source/cmWorkingDirectory.cxx4
-rw-r--r--Source/cmWriteFileCommand.cxx4
-rw-r--r--Source/cmXCodeObject.cxx3
-rw-r--r--Source/cmXMLParser.cxx6
-rw-r--r--Source/cmXMLSafe.cxx4
-rw-r--r--Source/cmXMLWriter.cxx3
-rw-r--r--Source/cmXMLWriter.h4
-rw-r--r--Source/cm_codecvt.cxx3
-rw-r--r--Source/cm_static_string_view.hxx4
-rw-r--r--Source/cmake.cxx10
-rw-r--r--Source/cmakemain.cxx4
-rw-r--r--Source/cmcldeps.cxx8
-rw-r--r--Source/cmcmd.cxx15
-rw-r--r--Source/cmcmd.h3
-rw-r--r--Source/ctest.cxx7
431 files changed, 1715 insertions, 1498 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWCommon.cxx b/Source/CPack/IFW/cmCPackIFWCommon.cxx
index aa9a457..9fa74be 100644
--- a/Source/CPack/IFW/cmCPackIFWCommon.cxx
+++ b/Source/CPack/IFW/cmCPackIFWCommon.cxx
@@ -2,6 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackIFWCommon.h"
+#include <cstddef>
+#include <sstream>
+#include <utility>
+#include <vector>
+
#include "cmCPackGenerator.h"
#include "cmCPackIFWGenerator.h"
#include "cmCPackLog.h" // IWYU pragma: keep
@@ -11,11 +16,6 @@
#include "cmVersionConfig.h"
#include "cmXMLWriter.h"
-#include <cstddef>
-#include <sstream>
-#include <utility>
-#include <vector>
-
cmCPackIFWCommon::cmCPackIFWCommon()
: Generator(nullptr)
{
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
index 94530c1..509ac65 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
@@ -2,6 +2,9 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackIFWGenerator.h"
+#include <sstream>
+#include <utility>
+
#include "cmCPackComponentGroup.h"
#include "cmCPackGenerator.h"
#include "cmCPackIFWCommon.h"
@@ -14,9 +17,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <sstream>
-#include <utility>
-
cmCPackIFWGenerator::cmCPackIFWGenerator()
{
this->Generator = this;
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h
index ee3c166..86a73c8 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.h
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.h
@@ -5,6 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+
#include "cmCPackComponentGroup.h"
#include "cmCPackGenerator.h"
#include "cmCPackIFWCommon.h"
@@ -12,11 +17,6 @@
#include "cmCPackIFWPackage.h"
#include "cmCPackIFWRepository.h"
-#include <map>
-#include <set>
-#include <string>
-#include <vector>
-
/** \class cmCPackIFWGenerator
* \brief A generator for Qt Installer Framework tools
*
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 2393279..4bad598 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -2,6 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackIFWInstaller.h"
+#include <cstddef>
+#include <sstream>
+#include <utility>
+
#include "cmCPackIFWCommon.h"
#include "cmCPackIFWGenerator.h"
#include "cmCPackIFWPackage.h"
@@ -13,10 +17,6 @@
#include "cmXMLParser.h"
#include "cmXMLWriter.h"
-#include <cstddef>
-#include <sstream>
-#include <utility>
-
cmCPackIFWInstaller::cmCPackIFWInstaller() = default;
void cmCPackIFWInstaller::printSkippedOptionWarning(
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h
index 467779e..8b3f96a 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.h
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCPackIFWCommon.h"
-
#include <map>
#include <string>
#include <vector>
+#include "cmCPackIFWCommon.h"
+
class cmCPackIFWPackage;
class cmCPackIFWRepository;
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx
index 9f2a443..9a9cd56 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.cxx
+++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx
@@ -2,6 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackIFWPackage.h"
+#include <cstddef>
+#include <map>
+#include <sstream>
+#include <utility>
+
#include "cmCPackComponentGroup.h"
#include "cmCPackIFWCommon.h"
#include "cmCPackIFWGenerator.h"
@@ -13,11 +18,6 @@
#include "cmTimestamp.h"
#include "cmXMLWriter.h"
-#include <cstddef>
-#include <map>
-#include <sstream>
-#include <utility>
-
//---------------------------------------------------------- CompareStruct ---
cmCPackIFWPackage::CompareStruct::CompareStruct()
: Type(cmCPackIFWPackage::CompareNone)
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.h b/Source/CPack/IFW/cmCPackIFWPackage.h
index ae41146..6a4a170 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.h
+++ b/Source/CPack/IFW/cmCPackIFWPackage.h
@@ -5,13 +5,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCPackIFWCommon.h"
-
#include <map>
#include <set>
#include <string>
#include <vector>
+#include "cmCPackIFWCommon.h"
+
class cmCPackComponent;
class cmCPackComponentGroup;
class cmCPackIFWInstaller;
diff --git a/Source/CPack/IFW/cmCPackIFWRepository.cxx b/Source/CPack/IFW/cmCPackIFWRepository.cxx
index 82ddbdb..a696549 100644
--- a/Source/CPack/IFW/cmCPackIFWRepository.cxx
+++ b/Source/CPack/IFW/cmCPackIFWRepository.cxx
@@ -2,14 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackIFWRepository.h"
+#include <cstddef>
+
#include "cmCPackIFWGenerator.h"
#include "cmGeneratedFileStream.h"
#include "cmSystemTools.h"
#include "cmXMLParser.h"
#include "cmXMLWriter.h"
-#include <cstddef>
-
cmCPackIFWRepository::cmCPackIFWRepository()
: Update(cmCPackIFWRepository::None)
{
diff --git a/Source/CPack/IFW/cmCPackIFWRepository.h b/Source/CPack/IFW/cmCPackIFWRepository.h
index 585334c..c293981 100644
--- a/Source/CPack/IFW/cmCPackIFWRepository.h
+++ b/Source/CPack/IFW/cmCPackIFWRepository.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCPackIFWCommon.h"
-
#include <string>
#include <vector>
+#include "cmCPackIFWCommon.h"
+
class cmXMLWriter;
/** \class cmCPackIFWRepository
diff --git a/Source/CPack/OSXScriptLauncher.cxx b/Source/CPack/OSXScriptLauncher.cxx
index b8f12fd..21d27a0 100644
--- a/Source/CPack/OSXScriptLauncher.cxx
+++ b/Source/CPack/OSXScriptLauncher.cxx
@@ -1,9 +1,5 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#include "cmsys/FStream.hxx"
-#include "cmsys/Process.h"
-#include "cmsys/SystemTools.hxx"
-
#include <cstddef>
#include <iostream>
#include <string>
@@ -11,6 +7,10 @@
#include <CoreFoundation/CoreFoundation.h>
+#include "cmsys/FStream.hxx"
+#include "cmsys/Process.h"
+#include "cmsys/SystemTools.hxx"
+
// For the PATH_MAX constant
#include <sys/syslimits.h>
diff --git a/Source/CPack/WiX/cmCMakeToWixPath.cxx b/Source/CPack/WiX/cmCMakeToWixPath.cxx
index 630a8f8..8738501 100644
--- a/Source/CPack/WiX/cmCMakeToWixPath.cxx
+++ b/Source/CPack/WiX/cmCMakeToWixPath.cxx
@@ -2,11 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCMakeToWixPath.h"
-#include "cmStringAlgorithms.h"
-
#include <string>
#include <vector>
+#include "cmStringAlgorithms.h"
+
#ifdef __CYGWIN__
# include <sys/cygwin.h>
std::string CMakeToWixPath(const std::string& cygpath)
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index 683f275..5fdbeab 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -2,6 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackWIXGenerator.h"
+#include <algorithm>
+
+#include <cm/string_view>
+
+#include "cmsys/Directory.hxx"
+#include "cmsys/Encoding.hxx"
+#include "cmsys/FStream.hxx"
+#include "cmsys/SystemTools.hxx"
+
#include "cmAlgorithms.h"
#include "cmCPackComponentGroup.h"
#include "cmCPackLog.h"
@@ -11,21 +20,12 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmUuid.h"
-
-#include <algorithm>
-#include <cm/string_view>
-
#include "cmWIXDirectoriesSourceWriter.h"
#include "cmWIXFeaturesSourceWriter.h"
#include "cmWIXFilesSourceWriter.h"
#include "cmWIXRichTextFormatWriter.h"
#include "cmWIXSourceWriter.h"
-#include "cmsys/Directory.hxx"
-#include "cmsys/Encoding.hxx"
-#include "cmsys/FStream.hxx"
-#include "cmsys/SystemTools.hxx"
-
#ifdef _WIN32
# include <rpc.h> // for GUID generation (windows only)
#else
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.h b/Source/CPack/WiX/cmCPackWIXGenerator.h
index 3b72e38..d193348 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.h
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.h
@@ -3,14 +3,13 @@
#ifndef cmCPackWIXGenerator_h
#define cmCPackWIXGenerator_h
-#include "cmCPackGenerator.h"
+#include <map>
+#include <string>
+#include "cmCPackGenerator.h"
#include "cmWIXPatch.h"
#include "cmWIXShortcut.h"
-#include <map>
-#include <string>
-
class cmWIXSourceWriter;
class cmWIXDirectoriesSourceWriter;
class cmWIXFilesSourceWriter;
diff --git a/Source/CPack/WiX/cmWIXAccessControlList.cxx b/Source/CPack/WiX/cmWIXAccessControlList.cxx
index b5e287d..3668b46 100644
--- a/Source/CPack/WiX/cmWIXAccessControlList.cxx
+++ b/Source/CPack/WiX/cmWIXAccessControlList.cxx
@@ -3,7 +3,6 @@
#include "cmWIXAccessControlList.h"
#include "cmCPackGenerator.h"
-
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
diff --git a/Source/CPack/WiX/cmWIXAccessControlList.h b/Source/CPack/WiX/cmWIXAccessControlList.h
index 2a23f2f..64f9a13 100644
--- a/Source/CPack/WiX/cmWIXAccessControlList.h
+++ b/Source/CPack/WiX/cmWIXAccessControlList.h
@@ -3,10 +3,9 @@
#ifndef cmWIXAccessControlList_h
#define cmWIXAccessControlList_h
-#include "cmWIXSourceWriter.h"
-
#include "cmCPackLog.h"
#include "cmInstalledFile.h"
+#include "cmWIXSourceWriter.h"
class cmWIXAccessControlList
{
diff --git a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h
index 8233331..a907d6d 100644
--- a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h
+++ b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h
@@ -3,11 +3,10 @@
#ifndef cmWIXDirectoriesSourceWriter_h
#define cmWIXDirectoriesSourceWriter_h
-#include "cmWIXSourceWriter.h"
+#include <string>
#include "cmCPackGenerator.h"
-
-#include <string>
+#include "cmWIXSourceWriter.h"
/** \class cmWIXDirectoriesSourceWriter
* \brief Helper class to generate directories.wxs
diff --git a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h
index e751ca7..e03e87b 100644
--- a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h
+++ b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h
@@ -3,11 +3,10 @@
#ifndef cmWIXFeaturesSourceWriter_h
#define cmWIXFeaturesSourceWriter_h
+#include "cmCPackGenerator.h"
#include "cmWIXPatch.h"
#include "cmWIXSourceWriter.h"
-#include "cmCPackGenerator.h"
-
/** \class cmWIXFeaturesSourceWriter
* \brief Helper class to generate features.wxs
*/
diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
index 7705d83..c0d879a 100644
--- a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
@@ -2,16 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmWIXFilesSourceWriter.h"
-#include "cmWIXAccessControlList.h"
+#include "cm_sys_stat.h"
+#include "cmCMakeToWixPath.h"
#include "cmInstalledFile.h"
-
#include "cmSystemTools.h"
#include "cmUuid.h"
-
-#include "cmCMakeToWixPath.h"
-
-#include "cm_sys_stat.h"
+#include "cmWIXAccessControlList.h"
cmWIXFilesSourceWriter::cmWIXFilesSourceWriter(cmCPackLog* logger,
std::string const& filename,
diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.h b/Source/CPack/WiX/cmWIXFilesSourceWriter.h
index dc9c636..8cc98f5 100644
--- a/Source/CPack/WiX/cmWIXFilesSourceWriter.h
+++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.h
@@ -3,12 +3,10 @@
#ifndef cmWIXFilesSourceWriter_h
#define cmWIXFilesSourceWriter_h
-#include "cmWIXSourceWriter.h"
-
+#include "cmCPackGenerator.h"
#include "cmWIXPatch.h"
#include "cmWIXShortcut.h"
-
-#include "cmCPackGenerator.h"
+#include "cmWIXSourceWriter.h"
/** \class cmWIXFilesSourceWriter
* \brief Helper class to generate files.wxs
diff --git a/Source/CPack/WiX/cmWIXPatch.h b/Source/CPack/WiX/cmWIXPatch.h
index a4c9e71..31a60f4 100644
--- a/Source/CPack/WiX/cmWIXPatch.h
+++ b/Source/CPack/WiX/cmWIXPatch.h
@@ -3,11 +3,11 @@
#ifndef cmWIXPatch_h
#define cmWIXPatch_h
+#include <string>
+
#include "cmWIXPatchParser.h"
#include "cmWIXSourceWriter.h"
-#include <string>
-
/** \class cmWIXPatch
* \brief Class that maintains and applies patch fragments
*/
diff --git a/Source/CPack/WiX/cmWIXPatchParser.cxx b/Source/CPack/WiX/cmWIXPatchParser.cxx
index c6ca944..fd9103b 100644
--- a/Source/CPack/WiX/cmWIXPatchParser.cxx
+++ b/Source/CPack/WiX/cmWIXPatchParser.cxx
@@ -2,10 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmWIXPatchParser.h"
-#include "cmCPackGenerator.h"
-
#include "cm_expat.h"
+#include "cmCPackGenerator.h"
+
cmWIXPatchNode::Type cmWIXPatchText::type()
{
return cmWIXPatchNode::TEXT;
diff --git a/Source/CPack/WiX/cmWIXPatchParser.h b/Source/CPack/WiX/cmWIXPatchParser.h
index e0e3470..87dd892 100644
--- a/Source/CPack/WiX/cmWIXPatchParser.h
+++ b/Source/CPack/WiX/cmWIXPatchParser.h
@@ -3,13 +3,12 @@
#ifndef cmCPackWIXPatchParser_h
#define cmCPackWIXPatchParser_h
-#include "cmCPackLog.h"
-
-#include "cmXMLParser.h"
-
#include <map>
#include <vector>
+#include "cmCPackLog.h"
+#include "cmXMLParser.h"
+
struct cmWIXPatchNode
{
enum Type
diff --git a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h
index 21be8ee..a879f3d 100644
--- a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h
+++ b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h
@@ -5,9 +5,10 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmsys/FStream.hxx"
#include <string>
+#include "cmsys/FStream.hxx"
+
/** \class cmWIXRichtTextFormatWriter
* \brief Helper class to generate Rich Text Format (RTF) documents
* from plain text (e.g. for license and welcome text)
diff --git a/Source/CPack/WiX/cmWIXShortcut.h b/Source/CPack/WiX/cmWIXShortcut.h
index d9eecdf..c67baf3 100644
--- a/Source/CPack/WiX/cmWIXShortcut.h
+++ b/Source/CPack/WiX/cmWIXShortcut.h
@@ -3,13 +3,13 @@
#ifndef cmWIXShortcut_h
#define cmWIXShortcut_h
-#include "cmInstalledFile.h"
-
#include <map>
#include <set>
#include <string>
#include <vector>
+#include "cmInstalledFile.h"
+
class cmWIXFilesSourceWriter;
struct cmWIXShortcut
diff --git a/Source/CPack/WiX/cmWIXSourceWriter.cxx b/Source/CPack/WiX/cmWIXSourceWriter.cxx
index 6adf80b..8e9bfdf 100644
--- a/Source/CPack/WiX/cmWIXSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXSourceWriter.cxx
@@ -2,12 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmWIXSourceWriter.h"
-#include "cmCPackGenerator.h"
+#include <windows.h>
+#include "cmCPackGenerator.h"
#include "cmUuid.h"
-#include <windows.h>
-
cmWIXSourceWriter::cmWIXSourceWriter(cmCPackLog* logger,
std::string const& filename,
GuidType componentGuidType,
diff --git a/Source/CPack/WiX/cmWIXSourceWriter.h b/Source/CPack/WiX/cmWIXSourceWriter.h
index 4af1ed6..8cc2070 100644
--- a/Source/CPack/WiX/cmWIXSourceWriter.h
+++ b/Source/CPack/WiX/cmWIXSourceWriter.h
@@ -3,12 +3,12 @@
#ifndef cmWIXSourceWriter_h
#define cmWIXSourceWriter_h
-#include "cmCPackLog.h"
+#include <string>
+#include <vector>
#include "cmsys/FStream.hxx"
-#include <string>
-#include <vector>
+#include "cmCPackLog.h"
/** \class cmWIXSourceWriter
* \brief Helper class to generate XML WiX source files
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index 1271b08..43f2946 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -2,6 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackArchiveGenerator.h"
+#include <cstring>
+#include <map>
+#include <ostream>
+#include <utility>
+#include <vector>
+
#include "cmCPackComponentGroup.h"
#include "cmCPackGenerator.h"
#include "cmCPackLog.h"
@@ -10,12 +16,6 @@
#include "cmSystemTools.h"
#include "cmWorkingDirectory.h"
-#include <cstring>
-#include <map>
-#include <ostream>
-#include <utility>
-#include <vector>
-
cmCPackGenerator* cmCPackArchiveGenerator::Create7ZGenerator()
{
return new cmCPackArchiveGenerator(cmArchiveWrite::CompressNone, "7zip",
diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h
index 461df66..8d67720 100644
--- a/Source/CPack/cmCPackArchiveGenerator.h
+++ b/Source/CPack/cmCPackArchiveGenerator.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmArchiveWrite.h"
-#include "cmCPackGenerator.h"
-
#include <iosfwd>
#include <string>
+#include "cmArchiveWrite.h"
+#include "cmCPackGenerator.h"
+
class cmCPackComponent;
/** \class cmCPackArchiveGenerator
diff --git a/Source/CPack/cmCPackComponentGroup.cxx b/Source/CPack/cmCPackComponentGroup.cxx
index 9e05d86..d40e5fc 100644
--- a/Source/CPack/cmCPackComponentGroup.cxx
+++ b/Source/CPack/cmCPackComponentGroup.cxx
@@ -2,11 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackComponentGroup.h"
+#include <string>
+
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <string>
-
unsigned long cmCPackComponent::GetInstalledSize(
const std::string& installDir) const
{
diff --git a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx
index 22385055..b5abd5a 100644
--- a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx
+++ b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx
@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackCygwinBinaryGenerator.h"
+#include "cmsys/SystemTools.hxx"
+
#include "cmCPackLog.h"
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
@@ -9,8 +11,6 @@
#include "cmSystemTools.h"
#include "cmake.h"
-#include "cmsys/SystemTools.hxx"
-
cmCPackCygwinBinaryGenerator::cmCPackCygwinBinaryGenerator()
: cmCPackArchiveGenerator(cmArchiveWrite::CompressBZip2, "paxr", ".tar.bz2")
{
diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.cxx b/Source/CPack/cmCPackCygwinSourceGenerator.cxx
index 5f6aab0..64a88eb 100644
--- a/Source/CPack/cmCPackCygwinSourceGenerator.cxx
+++ b/Source/CPack/cmCPackCygwinSourceGenerator.cxx
@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackCygwinSourceGenerator.h"
+#include "cmsys/SystemTools.hxx"
+
#include "cmCPackLog.h"
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
@@ -9,14 +11,13 @@
#include "cmSystemTools.h"
#include "cmake.h"
-#include "cmsys/SystemTools.hxx"
-
// Includes needed for implementation of RenameFile. This is not in
// system tools because it is not implemented robustly enough to move
// files across directories.
#ifdef _WIN32
-# include "cm_sys_stat.h"
# include <windows.h>
+
+# include "cm_sys_stat.h"
#endif
cmCPackCygwinSourceGenerator::cmCPackCygwinSourceGenerator()
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 4f299f7..5b7d8fb 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -2,6 +2,16 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackDebGenerator.h"
+#include <cstring>
+#include <map>
+#include <ostream>
+#include <set>
+#include <utility>
+
+#include "cmsys/Glob.hxx"
+
+#include "cm_sys_stat.h"
+
#include "cmArchiveWrite.h"
#include "cmCPackComponentGroup.h"
#include "cmCPackGenerator.h"
@@ -11,16 +21,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include "cmsys/Glob.hxx"
-
-#include "cm_sys_stat.h"
-
-#include <cstring>
-#include <map>
-#include <ostream>
-#include <set>
-#include <utility>
-
namespace {
class DebGenerator
diff --git a/Source/CPack/cmCPackDebGenerator.h b/Source/CPack/cmCPackDebGenerator.h
index 2244fe7..ce77e08 100644
--- a/Source/CPack/cmCPackDebGenerator.h
+++ b/Source/CPack/cmCPackDebGenerator.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCPackGenerator.h"
-
#include <string>
#include <vector>
+#include "cmCPackGenerator.h"
+
/** \class cmCPackDebGenerator
* \brief A generator for Debian packages
*
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index bedbfa8..ea71007 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -2,15 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackDragNDropGenerator.h"
-#include "cmCPackGenerator.h"
-#include "cmCPackLog.h"
-#include "cmDuration.h"
-#include "cmGeneratedFileStream.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-
-#include "cmsys/FStream.hxx"
-#include "cmsys/RegularExpression.hxx"
#include <algorithm>
#include <cstdlib>
#include <iomanip>
@@ -18,6 +9,16 @@
#include <CoreFoundation/CoreFoundation.h>
+#include "cmsys/FStream.hxx"
+#include "cmsys/RegularExpression.hxx"
+
+#include "cmCPackGenerator.h"
+#include "cmCPackLog.h"
+#include "cmDuration.h"
+#include "cmGeneratedFileStream.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+
#ifdef HAVE_CoreServices
// For the old LocaleStringToLangAndRegionCodes() function, to convert
// to the old Script Manager RegionCode values needed for the 'LPic' data
diff --git a/Source/CPack/cmCPackDragNDropGenerator.h b/Source/CPack/cmCPackDragNDropGenerator.h
index d8c5c83..f8c86c0 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.h
+++ b/Source/CPack/cmCPackDragNDropGenerator.h
@@ -6,10 +6,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
#include <sstream>
-#include <stddef.h>
#include <string>
#include <vector>
+#include <stddef.h>
+
#include "cmCPackGenerator.h"
class cmGeneratedFileStream;
diff --git a/Source/CPack/cmCPackExternalGenerator.cxx b/Source/CPack/cmCPackExternalGenerator.cxx
index 05e5c21..142eb6f 100644
--- a/Source/CPack/cmCPackExternalGenerator.cxx
+++ b/Source/CPack/cmCPackExternalGenerator.cxx
@@ -2,23 +2,23 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackExternalGenerator.h"
-#include "cmCPackComponentGroup.h"
-#include "cmCPackLog.h"
-#include "cmMakefile.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-
-#include "cm_jsoncpp_value.h"
-#include "cm_jsoncpp_writer.h"
-
-#include "cmsys/FStream.hxx"
-
#include <map>
#include <utility>
#include <vector>
#include <cm/memory>
+#include "cmsys/FStream.hxx"
+
+#include "cm_jsoncpp_value.h"
+#include "cm_jsoncpp_writer.h"
+
+#include "cmCPackComponentGroup.h"
+#include "cmCPackLog.h"
+#include "cmMakefile.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+
int cmCPackExternalGenerator::InitializeInternal()
{
this->SetOption("CPACK_EXTERNAL_KNOWN_VERSIONS", "1.0");
diff --git a/Source/CPack/cmCPackExternalGenerator.h b/Source/CPack/cmCPackExternalGenerator.h
index b77e45b..80011fd 100644
--- a/Source/CPack/cmCPackExternalGenerator.h
+++ b/Source/CPack/cmCPackExternalGenerator.h
@@ -3,12 +3,12 @@
#ifndef cmCPackExternalGenerator_h
#define cmCPackExternalGenerator_h
-#include "cmCPackGenerator.h"
+#include <memory>
+#include <string>
#include "cm_sys_stat.h"
-#include <memory>
-#include <string>
+#include "cmCPackGenerator.h"
class cmGlobalGenerator;
namespace Json {
diff --git a/Source/CPack/cmCPackFreeBSDGenerator.cxx b/Source/CPack/cmCPackFreeBSDGenerator.cxx
index b3cb2ad..e3cc352 100644
--- a/Source/CPack/cmCPackFreeBSDGenerator.cxx
+++ b/Source/CPack/cmCPackFreeBSDGenerator.cxx
@@ -10,16 +10,16 @@
#include "cmSystemTools.h"
// Needed for ::open() and ::stat()
-#include <fcntl.h>
-#include <sys/stat.h>
-
-#include <pkg.h>
-
#include <algorithm>
#include <ostream>
#include <utility>
#include <vector>
+#include <fcntl.h>
+#include <pkg.h>
+
+#include <sys/stat.h>
+
cmCPackFreeBSDGenerator::cmCPackFreeBSDGenerator()
: cmCPackArchiveGenerator(cmArchiveWrite::CompressXZ, "paxr", ".txz")
{
diff --git a/Source/CPack/cmCPackFreeBSDGenerator.h b/Source/CPack/cmCPackFreeBSDGenerator.h
index 9c8a934..a18b72f 100644
--- a/Source/CPack/cmCPackFreeBSDGenerator.h
+++ b/Source/CPack/cmCPackFreeBSDGenerator.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <string>
+
#include "cmCPackArchiveGenerator.h"
#include "cmCPackGenerator.h"
-#include <string>
-
class cmGeneratedFileStream;
/** \class cmCPackFreeBSDGenerator
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index a96c1c8..153f328 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -2,14 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackGenerator.h"
-#include "cmsys/FStream.hxx"
-#include "cmsys/Glob.hxx"
-#include "cmsys/RegularExpression.hxx"
#include <algorithm>
#include <cstring>
#include <memory>
#include <utility>
+#include "cmsys/FStream.hxx"
+#include "cmsys/Glob.hxx"
+#include "cmsys/RegularExpression.hxx"
+
#include "cmCPackComponentGroup.h"
#include "cmCPackLog.h"
#include "cmCryptoHash.h"
diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h
index 65281e3..1cb1643 100644
--- a/Source/CPack/cmCPackLog.h
+++ b/Source/CPack/cmCPackLog.h
@@ -6,9 +6,10 @@
#include "cmConfigure.h" // IWYU pragma: keep
#include <ostream>
-#include <string.h>
#include <string>
+#include <string.h>
+
#define cmCPack_Log(ctSelf, logType, msg) \
do { \
std::ostringstream cmCPackLog_msg; \
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 3f53186..adea8ec 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -2,6 +2,16 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackNSISGenerator.h"
+#include <algorithm>
+#include <cstdlib>
+#include <cstring>
+#include <map>
+#include <sstream>
+#include <utility>
+
+#include "cmsys/Directory.hxx"
+#include "cmsys/RegularExpression.hxx"
+
#include "cmAlgorithms.h"
#include "cmCPackComponentGroup.h"
#include "cmCPackGenerator.h"
@@ -11,15 +21,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include "cmsys/Directory.hxx"
-#include "cmsys/RegularExpression.hxx"
-#include <algorithm>
-#include <cstdlib>
-#include <cstring>
-#include <map>
-#include <sstream>
-#include <utility>
-
/* NSIS uses different command line syntax on Windows and others */
#ifdef _WIN32
# define NSIS_OPT "/"
diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h
index fc9ad9a..0af37af 100644
--- a/Source/CPack/cmCPackNSISGenerator.h
+++ b/Source/CPack/cmCPackNSISGenerator.h
@@ -5,13 +5,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCPackGenerator.h"
-
#include <iosfwd>
#include <set>
#include <string>
#include <vector>
+#include "cmCPackGenerator.h"
+
class cmCPackComponent;
class cmCPackComponentGroup;
diff --git a/Source/CPack/cmCPackNuGetGenerator.cxx b/Source/CPack/cmCPackNuGetGenerator.cxx
index 19a3a0a..60faecd 100644
--- a/Source/CPack/cmCPackNuGetGenerator.cxx
+++ b/Source/CPack/cmCPackNuGetGenerator.cxx
@@ -2,11 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackNuGetGenerator.h"
-#include "cmCPackComponentGroup.h"
-#include "cmCPackLog.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-
#include <algorithm>
#include <iterator>
#include <map>
@@ -15,6 +10,11 @@
#include <utility>
#include <vector>
+#include "cmCPackComponentGroup.h"
+#include "cmCPackLog.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+
bool cmCPackNuGetGenerator::SupportsComponentInstallation() const
{
return IsOn("CPACK_NUGET_COMPONENT_INSTALL");
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx
index 7be6a7d..c5ba726 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.cxx
+++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx
@@ -2,8 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackPackageMakerGenerator.h"
-#include "cmsys/FStream.hxx"
-#include "cmsys/RegularExpression.hxx"
#include <cassert>
#include <cstdio>
#include <cstdlib>
@@ -11,6 +9,9 @@
#include <sstream>
#include <string>
+#include "cmsys/FStream.hxx"
+#include "cmsys/RegularExpression.hxx"
+
#include "cmCPackComponentGroup.h"
#include "cmCPackLog.h"
#include "cmDuration.h"
diff --git a/Source/CPack/cmCPackRPMGenerator.h b/Source/CPack/cmCPackRPMGenerator.h
index 27d3b63..075ce84 100644
--- a/Source/CPack/cmCPackRPMGenerator.h
+++ b/Source/CPack/cmCPackRPMGenerator.h
@@ -5,10 +5,10 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCPackGenerator.h"
-
#include <string>
+#include "cmCPackGenerator.h"
+
/** \class cmCPackRPMGenerator
* \brief A generator for RPM packages
* The idea of the CPack RPM generator is to use
diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx
index eb1e24c..bb0ed4f 100644
--- a/Source/CPack/cmCPackSTGZGenerator.cxx
+++ b/Source/CPack/cmCPackSTGZGenerator.cxx
@@ -2,12 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackSTGZGenerator.h"
-#include "cmsys/FStream.hxx"
#include <cstdio>
#include <sstream>
#include <string>
#include <vector>
+#include "cmsys/FStream.hxx"
+
#include "cm_sys_stat.h"
#include "cmArchiveWrite.h"
diff --git a/Source/CPack/cmCPackSTGZGenerator.h b/Source/CPack/cmCPackSTGZGenerator.h
index 55e4779..79d7035 100644
--- a/Source/CPack/cmCPackSTGZGenerator.h
+++ b/Source/CPack/cmCPackSTGZGenerator.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <iosfwd>
+
#include "cmCPackArchiveGenerator.h"
#include "cmCPackGenerator.h"
-#include <iosfwd>
-
/** \class cmCPackSTGZGenerator
* \brief A generator for Self extractable TGZ files
*
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index ce41d40..5895652 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -1,6 +1,9 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
+#include "cmsys/CommandLineArguments.hxx"
+#include "cmsys/Encoding.hxx"
+
#include "cmCPackGenerator.h"
#include "cmCPackGeneratorFactory.h"
#include "cmCPackLog.h"
@@ -15,9 +18,6 @@
#include "cmSystemTools.h"
#include "cmake.h"
-#include "cmsys/CommandLineArguments.hxx"
-#include "cmsys/Encoding.hxx"
-
#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
# include "cmsys/ConsoleBuf.hxx"
#endif
diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx
index 4ea0c88..8640c46 100644
--- a/Source/CTest/cmCTestBZR.cxx
+++ b/Source/CTest/cmCTestBZR.cxx
@@ -2,6 +2,16 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestBZR.h"
+#include <cstdlib>
+#include <list>
+#include <map>
+#include <ostream>
+#include <vector>
+
+#include "cmsys/RegularExpression.hxx"
+
+#include "cm_expat.h"
+
#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmCTestVC.h"
@@ -9,14 +19,6 @@
#include "cmSystemTools.h"
#include "cmXMLParser.h"
-#include "cm_expat.h"
-#include "cmsys/RegularExpression.hxx"
-#include <cstdlib>
-#include <list>
-#include <map>
-#include <ostream>
-#include <vector>
-
extern "C" int cmBZRXMLParserUnknownEncodingHandler(void* /*unused*/,
const XML_Char* name,
XML_Encoding* info)
diff --git a/Source/CTest/cmCTestBZR.h b/Source/CTest/cmCTestBZR.h
index d5c78c7..d7c6321 100644
--- a/Source/CTest/cmCTestBZR.h
+++ b/Source/CTest/cmCTestBZR.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestGlobalVC.h"
-
#include <iosfwd>
#include <string>
+#include "cmCTestGlobalVC.h"
+
class cmCTest;
/** \class cmCTestBZR
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx
index 0f79670..2ad661c 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.cxx
+++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx
@@ -2,6 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestBuildAndTestHandler.h"
+#include <chrono>
+#include <cstdlib>
+#include <cstring>
+#include <ratio>
+
+#include "cmsys/Process.h"
+
#include "cmCTest.h"
#include "cmCTestTestHandler.h"
#include "cmGlobalGenerator.h"
@@ -12,12 +19,6 @@
#include "cmWorkingDirectory.h"
#include "cmake.h"
-#include "cmsys/Process.h"
-#include <chrono>
-#include <cstdlib>
-#include <cstring>
-#include <ratio>
-
cmCTestBuildAndTestHandler::cmCTestBuildAndTestHandler()
{
this->BuildTwoConfig = false;
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.h b/Source/CTest/cmCTestBuildAndTestHandler.h
index d5240aa..0c8a040 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.h
+++ b/Source/CTest/cmCTestBuildAndTestHandler.h
@@ -5,14 +5,15 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestGenericHandler.h"
-#include "cmDuration.h"
-
#include <sstream>
-#include <stddef.h>
#include <string>
#include <vector>
+#include <stddef.h>
+
+#include "cmCTestGenericHandler.h"
+#include "cmDuration.h"
+
class cmake;
/** \class cmCTestBuildAndTestHandler
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index ce690f9..18df214 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -2,6 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestBuildCommand.h"
+#include <cstring>
+#include <sstream>
+
+#include "cm_static_string_view.hxx"
+
#include "cmCTest.h"
#include "cmCTestBuildHandler.h"
#include "cmGlobalGenerator.h"
@@ -9,12 +14,8 @@
#include "cmMessageType.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include "cm_static_string_view.hxx"
#include "cmake.h"
-#include <cstring>
-#include <sstream>
-
class cmExecutionStatus;
void cmCTestBuildCommand::BindArguments()
diff --git a/Source/CTest/cmCTestBuildCommand.h b/Source/CTest/cmCTestBuildCommand.h
index 791e1f0..da00a43 100644
--- a/Source/CTest/cmCTestBuildCommand.h
+++ b/Source/CTest/cmCTestBuildCommand.h
@@ -5,15 +5,15 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestHandlerCommand.h"
-#include "cmCommand.h"
-
#include <string>
#include <utility>
#include <vector>
#include <cm/memory>
+#include "cmCTestHandlerCommand.h"
+#include "cmCommand.h"
+
class cmCTestBuildHandler;
class cmCTestGenericHandler;
class cmExecutionStatus;
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 86abb12..9cb5449 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -2,6 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestBuildHandler.h"
+#include <cstdlib>
+#include <cstring>
+#include <set>
+#include <utility>
+
+#include "cmsys/Directory.hxx"
+#include "cmsys/FStream.hxx"
+#include "cmsys/Process.h"
+
#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmDuration.h"
@@ -14,14 +23,6 @@
#include "cmSystemTools.h"
#include "cmXMLWriter.h"
-#include "cmsys/Directory.hxx"
-#include "cmsys/FStream.hxx"
-#include "cmsys/Process.h"
-#include <cstdlib>
-#include <cstring>
-#include <set>
-#include <utility>
-
static const char* cmCTestErrorMatches[] = {
"^[Bb]us [Ee]rror",
"^[Ss]egmentation [Vv]iolation",
diff --git a/Source/CTest/cmCTestBuildHandler.h b/Source/CTest/cmCTestBuildHandler.h
index ce1d343..a5193f6 100644
--- a/Source/CTest/cmCTestBuildHandler.h
+++ b/Source/CTest/cmCTestBuildHandler.h
@@ -5,18 +5,20 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestGenericHandler.h"
-
-#include "cmDuration.h"
-#include "cmProcessOutput.h"
-#include "cmsys/RegularExpression.hxx"
#include <chrono>
#include <deque>
#include <iosfwd>
-#include <stddef.h>
#include <string>
#include <vector>
+#include <stddef.h>
+
+#include "cmsys/RegularExpression.hxx"
+
+#include "cmCTestGenericHandler.h"
+#include "cmDuration.h"
+#include "cmProcessOutput.h"
+
class cmMakefile;
class cmStringReplaceHelper;
class cmXMLWriter;
diff --git a/Source/CTest/cmCTestCVS.cxx b/Source/CTest/cmCTestCVS.cxx
index 5baeecd..45ec390 100644
--- a/Source/CTest/cmCTestCVS.cxx
+++ b/Source/CTest/cmCTestCVS.cxx
@@ -2,19 +2,19 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestCVS.h"
+#include <utility>
+
+#include <cm/string_view>
+
+#include "cmsys/FStream.hxx"
+#include "cmsys/RegularExpression.hxx"
+
#include "cmCTest.h"
#include "cmProcessTools.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmXMLWriter.h"
-#include "cmsys/FStream.hxx"
-#include "cmsys/RegularExpression.hxx"
-
-#include <cm/string_view>
-
-#include <utility>
-
cmCTestCVS::cmCTestCVS(cmCTest* ct, std::ostream& log)
: cmCTestVC(ct, log)
{
diff --git a/Source/CTest/cmCTestCVS.h b/Source/CTest/cmCTestCVS.h
index 77fc3cc..7d33d8f 100644
--- a/Source/CTest/cmCTestCVS.h
+++ b/Source/CTest/cmCTestCVS.h
@@ -5,13 +5,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestVC.h"
-
#include <iosfwd>
#include <map>
#include <string>
#include <vector>
+#include "cmCTestVC.h"
+
class cmCTest;
class cmXMLWriter;
diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx
index 948b9fb..f2f42b4 100644
--- a/Source/CTest/cmCTestConfigureCommand.cxx
+++ b/Source/CTest/cmCTestConfigureCommand.cxx
@@ -2,19 +2,20 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestConfigureCommand.h"
+#include <cstring>
+#include <sstream>
+#include <vector>
+
+#include "cm_static_string_view.hxx"
+
#include "cmCTest.h"
#include "cmCTestConfigureHandler.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include "cm_static_string_view.hxx"
#include "cmake.h"
-#include <cstring>
-#include <sstream>
-#include <vector>
-
void cmCTestConfigureCommand::BindArguments()
{
this->cmCTestHandlerCommand::BindArguments();
diff --git a/Source/CTest/cmCTestConfigureCommand.h b/Source/CTest/cmCTestConfigureCommand.h
index 0bc7848..3f5944a 100644
--- a/Source/CTest/cmCTestConfigureCommand.h
+++ b/Source/CTest/cmCTestConfigureCommand.h
@@ -5,14 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestHandlerCommand.h"
-#include "cmCommand.h"
-
#include <string>
#include <utility>
#include <cm/memory>
+#include "cmCTestHandlerCommand.h"
+#include "cmCommand.h"
+
class cmCTestGenericHandler;
/** \class cmCTestConfigure
diff --git a/Source/CTest/cmCTestConfigureHandler.cxx b/Source/CTest/cmCTestConfigureHandler.cxx
index 7e93189..914930e 100644
--- a/Source/CTest/cmCTestConfigureHandler.cxx
+++ b/Source/CTest/cmCTestConfigureHandler.cxx
@@ -2,15 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestConfigureHandler.h"
+#include <chrono>
+#include <ostream>
+#include <string>
+
#include "cmCTest.h"
#include "cmDuration.h"
#include "cmGeneratedFileStream.h"
#include "cmXMLWriter.h"
-#include <chrono>
-#include <ostream>
-#include <string>
-
cmCTestConfigureHandler::cmCTestConfigureHandler() = default;
void cmCTestConfigureHandler::Initialize()
diff --git a/Source/CTest/cmCTestCoverageCommand.cxx b/Source/CTest/cmCTestCoverageCommand.cxx
index b66bba7..d6e6be3 100644
--- a/Source/CTest/cmCTestCoverageCommand.cxx
+++ b/Source/CTest/cmCTestCoverageCommand.cxx
@@ -4,10 +4,11 @@
#include <set>
+#include "cm_static_string_view.hxx"
+
#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmCTestCoverageHandler.h"
-#include "cm_static_string_view.hxx"
class cmCTestGenericHandler;
diff --git a/Source/CTest/cmCTestCoverageCommand.h b/Source/CTest/cmCTestCoverageCommand.h
index fcffa75..76aaf46 100644
--- a/Source/CTest/cmCTestCoverageCommand.h
+++ b/Source/CTest/cmCTestCoverageCommand.h
@@ -5,15 +5,15 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestHandlerCommand.h"
-#include "cmCommand.h"
-
#include <string>
#include <utility>
#include <vector>
#include <cm/memory>
+#include "cmCTestHandlerCommand.h"
+#include "cmCommand.h"
+
class cmCTestGenericHandler;
/** \class cmCTestCoverage
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 4d76387..4cd783f 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -2,6 +2,21 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestCoverageHandler.h"
+#include <algorithm>
+#include <chrono>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <iomanip>
+#include <iterator>
+#include <sstream>
+#include <utility>
+
+#include "cmsys/FStream.hxx"
+#include "cmsys/Glob.hxx"
+#include "cmsys/Process.h"
+#include "cmsys/RegularExpression.hxx"
+
#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmDuration.h"
@@ -18,20 +33,6 @@
#include "cmWorkingDirectory.h"
#include "cmXMLWriter.h"
-#include "cmsys/FStream.hxx"
-#include "cmsys/Glob.hxx"
-#include "cmsys/Process.h"
-#include "cmsys/RegularExpression.hxx"
-#include <algorithm>
-#include <chrono>
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <iomanip>
-#include <iterator>
-#include <sstream>
-#include <utility>
-
class cmMakefile;
#define SAFEDIV(x, y) (((y) != 0) ? ((x) / (y)) : (0))
diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h
index 06aaef7..991b89d 100644
--- a/Source/CTest/cmCTestCoverageHandler.h
+++ b/Source/CTest/cmCTestCoverageHandler.h
@@ -5,15 +5,16 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestGenericHandler.h"
-
-#include "cmsys/RegularExpression.hxx"
#include <iosfwd>
#include <map>
#include <set>
#include <string>
#include <vector>
+#include "cmsys/RegularExpression.hxx"
+
+#include "cmCTestGenericHandler.h"
+
class cmGeneratedFileStream;
class cmMakefile;
class cmXMLWriter;
diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx
index 8793260..ccac832 100644
--- a/Source/CTest/cmCTestCurl.cxx
+++ b/Source/CTest/cmCTestCurl.cxx
@@ -2,15 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestCurl.h"
+#include <cstdio>
+#include <ostream>
+
#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmCurl.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <cstdio>
-#include <ostream>
-
cmCTestCurl::cmCTestCurl(cmCTest* ctest)
{
this->CTest = ctest;
diff --git a/Source/CTest/cmCTestCurl.h b/Source/CTest/cmCTestCurl.h
index 6186af8..9c5ba66 100644
--- a/Source/CTest/cmCTestCurl.h
+++ b/Source/CTest/cmCTestCurl.h
@@ -5,10 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cm_curl.h"
#include <string>
#include <vector>
+#include "cm_curl.h"
+
class cmCTest;
class cmCTestCurl
diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
index f4531a1..051c117 100644
--- a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
+++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
@@ -2,10 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestEmptyBinaryDirectoryCommand.h"
-#include "cmCTestScriptHandler.h"
-
#include <sstream>
+#include "cmCTestScriptHandler.h"
+
class cmExecutionStatus;
bool cmCTestEmptyBinaryDirectoryCommand::InitialPass(
diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h
index 4232b9e..ac96a4e 100644
--- a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h
+++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h
@@ -5,15 +5,15 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestCommand.h"
-#include "cmCommand.h"
-
#include <string>
#include <utility>
#include <vector>
#include <cm/memory>
+#include "cmCTestCommand.h"
+#include "cmCommand.h"
+
class cmExecutionStatus;
/** \class cmCTestEmptyBinaryDirectory
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index 9fd3a62..3f3c107 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -2,14 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestGIT.h"
-#include "cmsys/FStream.hxx"
-#include "cmsys/Process.h"
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <vector>
+#include "cmsys/FStream.hxx"
+#include "cmsys/Process.h"
+
#include "cmCTest.h"
#include "cmCTestVC.h"
#include "cmProcessOutput.h"
diff --git a/Source/CTest/cmCTestGIT.h b/Source/CTest/cmCTestGIT.h
index ade430f..3103d84 100644
--- a/Source/CTest/cmCTestGIT.h
+++ b/Source/CTest/cmCTestGIT.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestGlobalVC.h"
-
#include <iosfwd>
#include <string>
+#include "cmCTestGlobalVC.h"
+
class cmCTest;
/** \class cmCTestGIT
diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h
index 793829e..94e5418 100644
--- a/Source/CTest/cmCTestGenericHandler.h
+++ b/Source/CTest/cmCTestGenericHandler.h
@@ -6,10 +6,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
#include <map>
-#include <stddef.h>
#include <string>
#include <vector>
+#include <stddef.h>
+
#include "cmCTest.h"
#include "cmSystemTools.h"
diff --git a/Source/CTest/cmCTestGlobalVC.cxx b/Source/CTest/cmCTestGlobalVC.cxx
index 54ebd4f..5f05efb 100644
--- a/Source/CTest/cmCTestGlobalVC.cxx
+++ b/Source/CTest/cmCTestGlobalVC.cxx
@@ -2,13 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestGlobalVC.h"
+#include <ostream>
+#include <utility>
+
#include "cmCTest.h"
#include "cmSystemTools.h"
#include "cmXMLWriter.h"
-#include <ostream>
-#include <utility>
-
cmCTestGlobalVC::cmCTestGlobalVC(cmCTest* ct, std::ostream& log)
: cmCTestVC(ct, log)
{
diff --git a/Source/CTest/cmCTestGlobalVC.h b/Source/CTest/cmCTestGlobalVC.h
index 9c57215..ff86591 100644
--- a/Source/CTest/cmCTestGlobalVC.h
+++ b/Source/CTest/cmCTestGlobalVC.h
@@ -5,14 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestVC.h"
-
#include <iosfwd>
#include <list>
#include <map>
#include <string>
#include <vector>
+#include "cmCTestVC.h"
+
class cmCTest;
class cmXMLWriter;
diff --git a/Source/CTest/cmCTestHG.cxx b/Source/CTest/cmCTestHG.cxx
index 297077e..3265498 100644
--- a/Source/CTest/cmCTestHG.cxx
+++ b/Source/CTest/cmCTestHG.cxx
@@ -2,6 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestHG.h"
+#include <ostream>
+#include <vector>
+
+#include "cmsys/RegularExpression.hxx"
+
#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmCTestVC.h"
@@ -9,10 +14,6 @@
#include "cmSystemTools.h"
#include "cmXMLParser.h"
-#include "cmsys/RegularExpression.hxx"
-#include <ostream>
-#include <vector>
-
cmCTestHG::cmCTestHG(cmCTest* ct, std::ostream& log)
: cmCTestGlobalVC(ct, log)
{
diff --git a/Source/CTest/cmCTestHG.h b/Source/CTest/cmCTestHG.h
index c12d618..2900139 100644
--- a/Source/CTest/cmCTestHG.h
+++ b/Source/CTest/cmCTestHG.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestGlobalVC.h"
-
#include <iosfwd>
#include <string>
+#include "cmCTestGlobalVC.h"
+
class cmCTest;
/** \class cmCTestHG
diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx
index 3f9ce4e..b1034c9 100644
--- a/Source/CTest/cmCTestHandlerCommand.cxx
+++ b/Source/CTest/cmCTestHandlerCommand.cxx
@@ -2,6 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestHandlerCommand.h"
+#include <algorithm>
+#include <cstdlib>
+#include <cstring>
+#include <sstream>
+
+#include "cm_static_string_view.hxx"
+
#include "cmCTest.h"
#include "cmCTestGenericHandler.h"
#include "cmExecutionStatus.h"
@@ -10,12 +17,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmWorkingDirectory.h"
-#include "cm_static_string_view.hxx"
-
-#include <algorithm>
-#include <cstdlib>
-#include <cstring>
-#include <sstream>
namespace {
// class to save and restore the error state for ctest_* commands
diff --git a/Source/CTest/cmCTestHandlerCommand.h b/Source/CTest/cmCTestHandlerCommand.h
index 5bbc569..a20d607 100644
--- a/Source/CTest/cmCTestHandlerCommand.h
+++ b/Source/CTest/cmCTestHandlerCommand.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmArgumentParser.h"
-#include "cmCTestCommand.h"
-
#include <string>
#include <vector>
+#include "cmArgumentParser.h"
+#include "cmCTestCommand.h"
+
class cmCTestGenericHandler;
class cmExecutionStatus;
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx
index ba49c29..647f5ff 100644
--- a/Source/CTest/cmCTestLaunch.cxx
+++ b/Source/CTest/cmCTestLaunch.cxx
@@ -2,13 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestLaunch.h"
-#include "cmsys/FStream.hxx"
-#include "cmsys/Process.h"
-#include "cmsys/RegularExpression.hxx"
#include <cstdlib>
#include <cstring>
#include <iostream>
+#include "cmsys/FStream.hxx"
+#include "cmsys/Process.h"
+#include "cmsys/RegularExpression.hxx"
+
#include "cmCryptoHash.h"
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
diff --git a/Source/CTest/cmCTestLaunch.h b/Source/CTest/cmCTestLaunch.h
index 107fd61..79a7712 100644
--- a/Source/CTest/cmCTestLaunch.h
+++ b/Source/CTest/cmCTestLaunch.h
@@ -5,11 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmsys/RegularExpression.hxx"
#include <set>
#include <string>
#include <vector>
+#include "cmsys/RegularExpression.hxx"
+
class cmXMLElement;
/** \class cmCTestLaunch
diff --git a/Source/CTest/cmCTestMemCheckCommand.cxx b/Source/CTest/cmCTestMemCheckCommand.cxx
index abad5fc..39dec6d 100644
--- a/Source/CTest/cmCTestMemCheckCommand.cxx
+++ b/Source/CTest/cmCTestMemCheckCommand.cxx
@@ -2,10 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestMemCheckCommand.h"
+#include "cm_static_string_view.hxx"
+
#include "cmCTest.h"
#include "cmCTestMemCheckHandler.h"
#include "cmMakefile.h"
-#include "cm_static_string_view.hxx"
void cmCTestMemCheckCommand::BindArguments()
{
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index ba196f0..a5ec1ae 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -2,21 +2,22 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestMemCheckHandler.h"
-#include "cmCTest.h"
-#include "cmDuration.h"
-#include "cmSystemTools.h"
-#include "cmXMLParser.h"
-#include "cmXMLWriter.h"
-
-#include "cmsys/FStream.hxx"
-#include "cmsys/Glob.hxx"
-#include "cmsys/RegularExpression.hxx"
#include <chrono>
#include <cstring>
#include <iostream>
#include <sstream>
#include <utility>
+#include "cmsys/FStream.hxx"
+#include "cmsys/Glob.hxx"
+#include "cmsys/RegularExpression.hxx"
+
+#include "cmCTest.h"
+#include "cmDuration.h"
+#include "cmSystemTools.h"
+#include "cmXMLParser.h"
+#include "cmXMLWriter.h"
+
struct CatToErrorType
{
const char* ErrorCategory;
diff --git a/Source/CTest/cmCTestMemCheckHandler.h b/Source/CTest/cmCTestMemCheckHandler.h
index 4bc655b..eda65f7 100644
--- a/Source/CTest/cmCTestMemCheckHandler.h
+++ b/Source/CTest/cmCTestMemCheckHandler.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestTestHandler.h"
-
#include <string>
#include <vector>
+#include "cmCTestTestHandler.h"
+
class cmMakefile;
class cmXMLWriter;
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index f79ba2e..1902500 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -2,27 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestMultiProcessHandler.h"
-#include "cmAffinity.h"
-#include "cmAlgorithms.h"
-#include "cmCTest.h"
-#include "cmCTestRunTest.h"
-#include "cmCTestTestHandler.h"
-#include "cmDuration.h"
-#include "cmListFileCache.h"
-#include "cmRange.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-#include "cmWorkingDirectory.h"
-
-#include "cm_jsoncpp_value.h"
-#include "cm_jsoncpp_writer.h"
-#include "cm_uv.h"
-
-#include "cmUVSignalHackRAII.h" // IWYU pragma: keep
-
-#include "cmsys/FStream.hxx"
-#include "cmsys/SystemInformation.hxx"
-
#include <algorithm>
#include <chrono>
#include <cmath>
@@ -38,6 +17,26 @@
#include <utility>
#include <vector>
+#include "cmsys/FStream.hxx"
+#include "cmsys/SystemInformation.hxx"
+
+#include "cm_jsoncpp_value.h"
+#include "cm_jsoncpp_writer.h"
+#include "cm_uv.h"
+
+#include "cmAffinity.h"
+#include "cmAlgorithms.h"
+#include "cmCTest.h"
+#include "cmCTestRunTest.h"
+#include "cmCTestTestHandler.h"
+#include "cmDuration.h"
+#include "cmListFileCache.h"
+#include "cmRange.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+#include "cmUVSignalHackRAII.h" // IWYU pragma: keep
+#include "cmWorkingDirectory.h"
+
namespace cmsys {
class RegularExpression;
}
diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h
index 93bb880..be31c75 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.h
+++ b/Source/CTest/cmCTestMultiProcessHandler.h
@@ -5,16 +5,18 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestTestHandler.h"
#include <map>
#include <set>
-#include <stddef.h>
#include <string>
#include <vector>
-#include "cmUVHandlePtr.h"
+#include <stddef.h>
+
#include "cm_uv.h"
+#include "cmCTestTestHandler.h"
+#include "cmUVHandlePtr.h"
+
class cmCTest;
class cmCTestRunTest;
diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx
index a6aea85..e2063e1 100644
--- a/Source/CTest/cmCTestP4.cxx
+++ b/Source/CTest/cmCTestP4.cxx
@@ -2,6 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestP4.h"
+#include <algorithm>
+#include <ctime>
+#include <ostream>
+#include <utility>
+
+#include "cmsys/RegularExpression.hxx"
+
#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmCTestVC.h"
@@ -10,12 +17,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include "cmsys/RegularExpression.hxx"
-#include <algorithm>
-#include <ctime>
-#include <ostream>
-#include <utility>
-
cmCTestP4::cmCTestP4(cmCTest* ct, std::ostream& log)
: cmCTestGlobalVC(ct, log)
{
diff --git a/Source/CTest/cmCTestP4.h b/Source/CTest/cmCTestP4.h
index b14edf7..e19472e 100644
--- a/Source/CTest/cmCTestP4.h
+++ b/Source/CTest/cmCTestP4.h
@@ -5,13 +5,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestGlobalVC.h"
-
#include <iosfwd>
#include <map>
#include <string>
#include <vector>
+#include "cmCTestGlobalVC.h"
+
class cmCTest;
/** \class cmCTestP4
diff --git a/Source/CTest/cmCTestReadCustomFilesCommand.h b/Source/CTest/cmCTestReadCustomFilesCommand.h
index 8199cbc..cbb9390 100644
--- a/Source/CTest/cmCTestReadCustomFilesCommand.h
+++ b/Source/CTest/cmCTestReadCustomFilesCommand.h
@@ -5,15 +5,15 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestCommand.h"
-#include "cmCommand.h"
-
#include <string>
#include <utility>
#include <vector>
#include <cm/memory>
+#include "cmCTestCommand.h"
+#include "cmCommand.h"
+
class cmExecutionStatus;
/** \class cmCTestReadCustomFiles
diff --git a/Source/CTest/cmCTestRunScriptCommand.h b/Source/CTest/cmCTestRunScriptCommand.h
index d262a83..2d8bde1 100644
--- a/Source/CTest/cmCTestRunScriptCommand.h
+++ b/Source/CTest/cmCTestRunScriptCommand.h
@@ -5,15 +5,15 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestCommand.h"
-#include "cmCommand.h"
-
#include <string>
#include <utility>
#include <vector>
#include <cm/memory>
+#include "cmCTestCommand.h"
+#include "cmCommand.h"
+
class cmExecutionStatus;
/** \class cmCTestRunScript
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index d8a5923..0188fe0 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -2,15 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestRunTest.h"
-#include "cmCTest.h"
-#include "cmCTestMemCheckHandler.h"
-#include "cmCTestMultiProcessHandler.h"
-#include "cmProcess.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-#include "cmWorkingDirectory.h"
-
-#include "cmsys/RegularExpression.hxx"
#include <chrono>
#include <cstdint>
#include <cstdio>
@@ -22,6 +13,16 @@
#include <cm/memory>
+#include "cmsys/RegularExpression.hxx"
+
+#include "cmCTest.h"
+#include "cmCTestMemCheckHandler.h"
+#include "cmCTestMultiProcessHandler.h"
+#include "cmProcess.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+#include "cmWorkingDirectory.h"
+
cmCTestRunTest::cmCTestRunTest(cmCTestMultiProcessHandler& multiHandler)
: MultiTestHandler(multiHandler)
{
diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h
index 43dfe8e..c770bac 100644
--- a/Source/CTest/cmCTestRunTest.h
+++ b/Source/CTest/cmCTestRunTest.h
@@ -7,10 +7,11 @@
#include <memory>
#include <set>
-#include <stddef.h>
#include <string>
#include <vector>
+#include <stddef.h>
+
#include "cmCTestTestHandler.h"
#include "cmDuration.h"
#include "cmProcess.h"
diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index 6e5b5e7..34395c9 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -2,6 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestSVN.h"
+#include <cstdlib>
+#include <cstring>
+#include <map>
+#include <ostream>
+
+#include "cmsys/RegularExpression.hxx"
+
#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmCTestVC.h"
@@ -11,12 +18,6 @@
#include "cmXMLParser.h"
#include "cmXMLWriter.h"
-#include "cmsys/RegularExpression.hxx"
-#include <cstdlib>
-#include <cstring>
-#include <map>
-#include <ostream>
-
struct cmCTestSVN::Revision : public cmCTestVC::Revision
{
cmCTestSVN::SVNInfo* SVNInfo;
diff --git a/Source/CTest/cmCTestSVN.h b/Source/CTest/cmCTestSVN.h
index 5c8505d..b74dc12 100644
--- a/Source/CTest/cmCTestSVN.h
+++ b/Source/CTest/cmCTestSVN.h
@@ -5,13 +5,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestGlobalVC.h"
-
#include <iosfwd>
#include <list>
#include <string>
#include <vector>
+#include "cmCTestGlobalVC.h"
+
class cmCTest;
class cmXMLWriter;
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index c988e3a..60facbd 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -2,11 +2,20 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestScriptHandler.h"
-#include "cmsys/Directory.hxx"
-#include "cmsys/Process.h"
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <map>
+#include <memory>
+#include <ratio>
+#include <sstream>
+#include <utility>
#include <cm/memory>
+#include "cmsys/Directory.hxx"
+#include "cmsys/Process.h"
+
#include "cmCTest.h"
#include "cmCTestBuildCommand.h"
#include "cmCTestCommand.h"
@@ -34,15 +43,6 @@
#include "cmSystemTools.h"
#include "cmake.h"
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <map>
-#include <memory>
-#include <ratio>
-#include <sstream>
-#include <utility>
-
#ifdef _WIN32
# include <windows.h>
#else
diff --git a/Source/CTest/cmCTestScriptHandler.h b/Source/CTest/cmCTestScriptHandler.h
index 4a08ad9..d003199 100644
--- a/Source/CTest/cmCTestScriptHandler.h
+++ b/Source/CTest/cmCTestScriptHandler.h
@@ -5,14 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestGenericHandler.h"
-#include "cmDuration.h"
-
#include <chrono>
#include <memory>
#include <string>
#include <vector>
+#include "cmCTestGenericHandler.h"
+#include "cmDuration.h"
+
class cmCTest;
class cmCTestCommand;
class cmGlobalGenerator;
diff --git a/Source/CTest/cmCTestSleepCommand.cxx b/Source/CTest/cmCTestSleepCommand.cxx
index bc4470c..623d3b6 100644
--- a/Source/CTest/cmCTestSleepCommand.cxx
+++ b/Source/CTest/cmCTestSleepCommand.cxx
@@ -2,10 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestSleepCommand.h"
-#include "cmCTestScriptHandler.h"
-
#include <cstdlib>
+#include "cmCTestScriptHandler.h"
+
class cmExecutionStatus;
bool cmCTestSleepCommand::InitialPass(std::vector<std::string> const& args,
diff --git a/Source/CTest/cmCTestSleepCommand.h b/Source/CTest/cmCTestSleepCommand.h
index b98079d..1c3b8a1 100644
--- a/Source/CTest/cmCTestSleepCommand.h
+++ b/Source/CTest/cmCTestSleepCommand.h
@@ -5,15 +5,15 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestCommand.h"
-#include "cmCommand.h"
-
#include <string>
#include <utility>
#include <vector>
#include <cm/memory>
+#include "cmCTestCommand.h"
+#include "cmCommand.h"
+
class cmExecutionStatus;
/** \class cmCTestSleep
diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx
index 844f2ca..fe68406 100644
--- a/Source/CTest/cmCTestStartCommand.cxx
+++ b/Source/CTest/cmCTestStartCommand.cxx
@@ -2,15 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestStartCommand.h"
+#include <cstddef>
+#include <sstream>
+
#include "cmCTest.h"
#include "cmCTestVC.h"
#include "cmGeneratedFileStream.h"
#include "cmMakefile.h"
#include "cmSystemTools.h"
-#include <cstddef>
-#include <sstream>
-
class cmExecutionStatus;
cmCTestStartCommand::cmCTestStartCommand()
diff --git a/Source/CTest/cmCTestStartCommand.h b/Source/CTest/cmCTestStartCommand.h
index 598c937..b30b1bb 100644
--- a/Source/CTest/cmCTestStartCommand.h
+++ b/Source/CTest/cmCTestStartCommand.h
@@ -5,9 +5,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestCommand.h"
-#include "cmCommand.h"
-
#include <iosfwd>
#include <string>
#include <utility>
@@ -15,6 +12,9 @@
#include <cm/memory>
+#include "cmCTestCommand.h"
+#include "cmCommand.h"
+
class cmExecutionStatus;
/** \class cmCTestStart
diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx
index 706b45a..46b00b1 100644
--- a/Source/CTest/cmCTestSubmitCommand.cxx
+++ b/Source/CTest/cmCTestSubmitCommand.cxx
@@ -2,6 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestSubmitCommand.h"
+#include <set>
+#include <sstream>
+#include <utility>
+
+#include <cm/memory>
+
+#include "cm_static_string_view.hxx"
+
#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmCTestSubmitHandler.h"
@@ -11,13 +19,6 @@
#include "cmRange.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include "cm_static_string_view.hxx"
-
-#include <set>
-#include <sstream>
-#include <utility>
-
-#include <cm/memory>
class cmExecutionStatus;
diff --git a/Source/CTest/cmCTestSubmitCommand.h b/Source/CTest/cmCTestSubmitCommand.h
index 249f844..9060771 100644
--- a/Source/CTest/cmCTestSubmitCommand.h
+++ b/Source/CTest/cmCTestSubmitCommand.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestHandlerCommand.h"
-
#include <memory>
#include <string>
#include <vector>
+#include "cmCTestHandlerCommand.h"
+
class cmCommand;
class cmCTestGenericHandler;
class cmExecutionStatus;
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index ca7fd2c..2ac5af6 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -2,14 +2,15 @@
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 <chrono>
#include <cstdio>
#include <cstdlib>
#include <sstream>
+#include "cm_curl.h"
+#include "cm_jsoncpp_reader.h"
+#include "cm_jsoncpp_value.h"
+
#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmCTestCurl.h"
diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h
index 31b747b..304daaa 100644
--- a/Source/CTest/cmCTestSubmitHandler.h
+++ b/Source/CTest/cmCTestSubmitHandler.h
@@ -5,14 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTest.h"
-#include "cmCTestGenericHandler.h"
-
#include <iosfwd>
#include <set>
#include <string>
#include <vector>
+#include "cmCTest.h"
+#include "cmCTestGenericHandler.h"
+
/** \class cmCTestSubmitHandler
* \brief Helper class for CTest
*
diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx
index c277db8..d200b40 100644
--- a/Source/CTest/cmCTestTestCommand.cxx
+++ b/Source/CTest/cmCTestTestCommand.cxx
@@ -2,17 +2,18 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestTestCommand.h"
+#include <chrono>
+#include <cstdlib>
+#include <sstream>
+
+#include "cm_static_string_view.hxx"
+
#include "cmCTest.h"
#include "cmCTestGenericHandler.h"
#include "cmCTestTestHandler.h"
#include "cmDuration.h"
#include "cmMakefile.h"
#include "cmStringAlgorithms.h"
-#include "cm_static_string_view.hxx"
-
-#include <chrono>
-#include <cstdlib>
-#include <sstream>
void cmCTestTestCommand::BindArguments()
{
diff --git a/Source/CTest/cmCTestTestCommand.h b/Source/CTest/cmCTestTestCommand.h
index edd21b7..cb65c0b 100644
--- a/Source/CTest/cmCTestTestCommand.h
+++ b/Source/CTest/cmCTestTestCommand.h
@@ -5,14 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestHandlerCommand.h"
-#include "cmCommand.h"
-
#include <string>
#include <utility>
#include <cm/memory>
+#include "cmCTestHandlerCommand.h"
+#include "cmCommand.h"
+
class cmCTestGenericHandler;
/** \class cmCTestTest
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index ee0d8c8..67d16af 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -2,8 +2,30 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestTestHandler.h"
+#include <algorithm>
+#include <chrono>
+#include <cmath>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+#include <functional>
+#include <iomanip>
+#include <iterator>
+#include <set>
+#include <sstream>
+#include <utility>
+
#include <cm/memory>
+#include "cmsys/FStream.hxx"
+#include <cmsys/Base64.h>
+#include <cmsys/Directory.hxx>
+#include <cmsys/RegularExpression.hxx>
+
+#include "cm_utf8.h"
+
#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmCTestMultiProcessHandler.h"
@@ -18,27 +40,7 @@
#include "cmSystemTools.h"
#include "cmWorkingDirectory.h"
#include "cmXMLWriter.h"
-#include "cm_utf8.h"
#include "cmake.h"
-#include "cmsys/FStream.hxx"
-
-#include <algorithm>
-#include <chrono>
-#include <cmath>
-#include <cmsys/Base64.h>
-#include <cmsys/Directory.hxx>
-#include <cmsys/RegularExpression.hxx>
-#include <cstddef>
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <ctime>
-#include <functional>
-#include <iomanip>
-#include <iterator>
-#include <set>
-#include <sstream>
-#include <utility>
namespace {
diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h
index 8f1dafc..1807a5c 100644
--- a/Source/CTest/cmCTestTestHandler.h
+++ b/Source/CTest/cmCTestTestHandler.h
@@ -5,21 +5,23 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestGenericHandler.h"
-#include "cmDuration.h"
-#include "cmListFileCache.h"
-
-#include "cmsys/RegularExpression.hxx"
#include <chrono>
#include <cstdint>
#include <iosfwd>
#include <map>
#include <set>
-#include <stddef.h>
#include <string>
#include <utility>
#include <vector>
+#include <stddef.h>
+
+#include "cmsys/RegularExpression.hxx"
+
+#include "cmCTestGenericHandler.h"
+#include "cmDuration.h"
+#include "cmListFileCache.h"
+
class cmCTest;
class cmMakefile;
class cmXMLWriter;
diff --git a/Source/CTest/cmCTestUpdateCommand.h b/Source/CTest/cmCTestUpdateCommand.h
index a4798a5..5555c16 100644
--- a/Source/CTest/cmCTestUpdateCommand.h
+++ b/Source/CTest/cmCTestUpdateCommand.h
@@ -5,14 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestHandlerCommand.h"
-#include "cmCommand.h"
-
#include <string>
#include <utility>
#include <cm/memory>
+#include "cmCTestHandlerCommand.h"
+#include "cmCommand.h"
+
class cmCTestGenericHandler;
/** \class cmCTestUpdate
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx
index c4cb233..f30ba2b 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -2,6 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestUpdateHandler.h"
+#include <chrono>
+#include <sstream>
+
+#include <cm/memory>
+
#include "cmCLocaleEnvironmentScope.h"
#include "cmCTest.h"
#include "cmCTestBZR.h"
@@ -17,11 +22,6 @@
#include "cmVersion.h"
#include "cmXMLWriter.h"
-#include <chrono>
-#include <sstream>
-
-#include <cm/memory>
-
static const char* cmCTestUpdateHandlerUpdateStrings[] = {
"Unknown", "CVS", "SVN", "BZR", "GIT", "HG", "P4"
};
diff --git a/Source/CTest/cmCTestUpdateHandler.h b/Source/CTest/cmCTestUpdateHandler.h
index 57b952d..afc0e3d 100644
--- a/Source/CTest/cmCTestUpdateHandler.h
+++ b/Source/CTest/cmCTestUpdateHandler.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestGenericHandler.h"
-
#include <string>
#include <utility>
#include <vector>
+#include "cmCTestGenericHandler.h"
+
/** \class cmCTestUpdateHandler
* \brief A class that handles ctest -S invocations
*
diff --git a/Source/CTest/cmCTestUploadCommand.cxx b/Source/CTest/cmCTestUploadCommand.cxx
index 9180821..d0e3848 100644
--- a/Source/CTest/cmCTestUploadCommand.cxx
+++ b/Source/CTest/cmCTestUploadCommand.cxx
@@ -6,13 +6,14 @@
#include <sstream>
#include <vector>
+#include "cm_static_string_view.hxx"
+
#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmCTestUploadHandler.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
#include "cmSystemTools.h"
-#include "cm_static_string_view.hxx"
void cmCTestUploadCommand::BindArguments()
{
diff --git a/Source/CTest/cmCTestUploadCommand.h b/Source/CTest/cmCTestUploadCommand.h
index f78f0ec..8334a9e 100644
--- a/Source/CTest/cmCTestUploadCommand.h
+++ b/Source/CTest/cmCTestUploadCommand.h
@@ -5,15 +5,15 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestHandlerCommand.h"
-#include "cmCommand.h"
-
#include <string>
#include <utility>
#include <vector>
#include <cm/memory>
+#include "cmCTestHandlerCommand.h"
+#include "cmCommand.h"
+
class cmCTestGenericHandler;
/** \class cmCTestUpload
diff --git a/Source/CTest/cmCTestUploadHandler.cxx b/Source/CTest/cmCTestUploadHandler.cxx
index 9efdf70..9d92aad 100644
--- a/Source/CTest/cmCTestUploadHandler.cxx
+++ b/Source/CTest/cmCTestUploadHandler.cxx
@@ -2,14 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestUploadHandler.h"
+#include <ostream>
+#include <string>
+
#include "cmCTest.h"
#include "cmGeneratedFileStream.h"
#include "cmVersion.h"
#include "cmXMLWriter.h"
-#include <ostream>
-#include <string>
-
cmCTestUploadHandler::cmCTestUploadHandler()
{
this->Initialize();
diff --git a/Source/CTest/cmCTestUploadHandler.h b/Source/CTest/cmCTestUploadHandler.h
index ff69c6e..dde14df 100644
--- a/Source/CTest/cmCTestUploadHandler.h
+++ b/Source/CTest/cmCTestUploadHandler.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCTestGenericHandler.h"
-
#include <set>
#include <string>
+#include "cmCTestGenericHandler.h"
+
/** \class cmCTestUploadHandler
* \brief Helper class for CTest
*
diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx
index 00919e5..6026c69 100644
--- a/Source/CTest/cmCTestVC.cxx
+++ b/Source/CTest/cmCTestVC.cxx
@@ -2,17 +2,18 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestVC.h"
-#include "cmCTest.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-#include "cmXMLWriter.h"
-
-#include "cmsys/Process.h"
#include <cstdio>
#include <ctime>
#include <sstream>
#include <vector>
+#include "cmsys/Process.h"
+
+#include "cmCTest.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+#include "cmXMLWriter.h"
+
cmCTestVC::cmCTestVC(cmCTest* ct, std::ostream& log)
: CTest(ct)
, Log(log)
diff --git a/Source/CTest/cmParseBlanketJSCoverage.cxx b/Source/CTest/cmParseBlanketJSCoverage.cxx
index 8c87700..409025f 100644
--- a/Source/CTest/cmParseBlanketJSCoverage.cxx
+++ b/Source/CTest/cmParseBlanketJSCoverage.cxx
@@ -2,14 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmParseBlanketJSCoverage.h"
+#include <cstdio>
+#include <cstdlib>
+
+#include "cmsys/FStream.hxx"
+
#include "cmCTest.h"
#include "cmCTestCoverageHandler.h"
#include "cmSystemTools.h"
-#include "cmsys/FStream.hxx"
-#include <cstdio>
-#include <cstdlib>
-
class cmParseBlanketJSCoverage::JSONParser
{
public:
diff --git a/Source/CTest/cmParseCacheCoverage.cxx b/Source/CTest/cmParseCacheCoverage.cxx
index da48610..8c4da75 100644
--- a/Source/CTest/cmParseCacheCoverage.cxx
+++ b/Source/CTest/cmParseCacheCoverage.cxx
@@ -1,17 +1,18 @@
#include "cmParseCacheCoverage.h"
-#include "cmCTest.h"
-#include "cmCTestCoverageHandler.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-
-#include "cmsys/Directory.hxx"
-#include "cmsys/FStream.hxx"
#include <cstdio>
#include <cstdlib>
#include <map>
#include <utility>
+#include "cmsys/Directory.hxx"
+#include "cmsys/FStream.hxx"
+
+#include "cmCTest.h"
+#include "cmCTestCoverageHandler.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+
cmParseCacheCoverage::cmParseCacheCoverage(
cmCTestCoverageHandlerContainer& cont, cmCTest* ctest)
: cmParseMumpsCoverage(cont, ctest)
diff --git a/Source/CTest/cmParseCacheCoverage.h b/Source/CTest/cmParseCacheCoverage.h
index 081f5fa..e89b9e4 100644
--- a/Source/CTest/cmParseCacheCoverage.h
+++ b/Source/CTest/cmParseCacheCoverage.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmParseMumpsCoverage.h"
-
#include <string>
#include <vector>
+#include "cmParseMumpsCoverage.h"
+
class cmCTest;
class cmCTestCoverageHandlerContainer;
diff --git a/Source/CTest/cmParseCoberturaCoverage.cxx b/Source/CTest/cmParseCoberturaCoverage.cxx
index 7c00d00..05da84e 100644
--- a/Source/CTest/cmParseCoberturaCoverage.cxx
+++ b/Source/CTest/cmParseCoberturaCoverage.cxx
@@ -1,15 +1,16 @@
#include "cmParseCoberturaCoverage.h"
+#include <cstdlib>
+#include <cstring>
+
+#include "cmsys/FStream.hxx"
+
#include "cmCTest.h"
#include "cmCTestCoverageHandler.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmXMLParser.h"
-#include "cmsys/FStream.hxx"
-#include <cstdlib>
-#include <cstring>
-
class cmParseCoberturaCoverage::XMLParser : public cmXMLParser
{
public:
diff --git a/Source/CTest/cmParseDelphiCoverage.cxx b/Source/CTest/cmParseDelphiCoverage.cxx
index 22c756c..016e90c 100644
--- a/Source/CTest/cmParseDelphiCoverage.cxx
+++ b/Source/CTest/cmParseDelphiCoverage.cxx
@@ -1,13 +1,14 @@
#include "cmParseDelphiCoverage.h"
-#include "cmCTest.h"
-#include "cmCTestCoverageHandler.h"
-#include "cmSystemTools.h"
+#include <cstdio>
+#include <cstdlib>
#include "cmsys/FStream.hxx"
#include "cmsys/Glob.hxx"
-#include <cstdio>
-#include <cstdlib>
+
+#include "cmCTest.h"
+#include "cmCTestCoverageHandler.h"
+#include "cmSystemTools.h"
class cmParseDelphiCoverage::HTMLParser
{
diff --git a/Source/CTest/cmParseGTMCoverage.cxx b/Source/CTest/cmParseGTMCoverage.cxx
index 1f2181b..1dc5b70 100644
--- a/Source/CTest/cmParseGTMCoverage.cxx
+++ b/Source/CTest/cmParseGTMCoverage.cxx
@@ -1,17 +1,18 @@
#include "cmParseGTMCoverage.h"
-#include "cmCTest.h"
-#include "cmCTestCoverageHandler.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-
-#include "cmsys/Directory.hxx"
-#include "cmsys/FStream.hxx"
#include <cstdio>
#include <cstdlib>
#include <map>
#include <vector>
+#include "cmsys/Directory.hxx"
+#include "cmsys/FStream.hxx"
+
+#include "cmCTest.h"
+#include "cmCTestCoverageHandler.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+
cmParseGTMCoverage::cmParseGTMCoverage(cmCTestCoverageHandlerContainer& cont,
cmCTest* ctest)
: cmParseMumpsCoverage(cont, ctest)
diff --git a/Source/CTest/cmParseGTMCoverage.h b/Source/CTest/cmParseGTMCoverage.h
index 13afbbc..fe0ae0b 100644
--- a/Source/CTest/cmParseGTMCoverage.h
+++ b/Source/CTest/cmParseGTMCoverage.h
@@ -5,10 +5,10 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmParseMumpsCoverage.h"
-
#include <string>
+#include "cmParseMumpsCoverage.h"
+
class cmCTest;
class cmCTestCoverageHandlerContainer;
diff --git a/Source/CTest/cmParseJacocoCoverage.cxx b/Source/CTest/cmParseJacocoCoverage.cxx
index be6348a..9cf30df 100644
--- a/Source/CTest/cmParseJacocoCoverage.cxx
+++ b/Source/CTest/cmParseJacocoCoverage.cxx
@@ -1,17 +1,18 @@
#include "cmParseJacocoCoverage.h"
+#include <cstdlib>
+#include <cstring>
+
+#include "cmsys/Directory.hxx"
+#include "cmsys/FStream.hxx"
+#include "cmsys/Glob.hxx"
+
#include "cmCTest.h"
#include "cmCTestCoverageHandler.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmXMLParser.h"
-#include "cmsys/Directory.hxx"
-#include "cmsys/FStream.hxx"
-#include "cmsys/Glob.hxx"
-#include <cstdlib>
-#include <cstring>
-
class cmParseJacocoCoverage::XMLParser : public cmXMLParser
{
public:
diff --git a/Source/CTest/cmParseMumpsCoverage.cxx b/Source/CTest/cmParseMumpsCoverage.cxx
index 596b72e..b16f101 100644
--- a/Source/CTest/cmParseMumpsCoverage.cxx
+++ b/Source/CTest/cmParseMumpsCoverage.cxx
@@ -1,17 +1,18 @@
#include "cmParseMumpsCoverage.h"
-#include "cmCTest.h"
-#include "cmCTestCoverageHandler.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-
-#include "cmsys/FStream.hxx"
-#include "cmsys/Glob.hxx"
#include <map>
#include <string>
#include <utility>
#include <vector>
+#include "cmsys/FStream.hxx"
+#include "cmsys/Glob.hxx"
+
+#include "cmCTest.h"
+#include "cmCTestCoverageHandler.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+
cmParseMumpsCoverage::cmParseMumpsCoverage(
cmCTestCoverageHandlerContainer& cont, cmCTest* ctest)
: Coverage(cont)
diff --git a/Source/CTest/cmParsePHPCoverage.cxx b/Source/CTest/cmParsePHPCoverage.cxx
index 8f0404d..a494b92 100644
--- a/Source/CTest/cmParsePHPCoverage.cxx
+++ b/Source/CTest/cmParsePHPCoverage.cxx
@@ -1,15 +1,16 @@
#include "cmParsePHPCoverage.h"
+#include <cstdlib>
+#include <cstring>
+
+#include "cmsys/Directory.hxx"
+#include "cmsys/FStream.hxx"
+
#include "cmCTest.h"
#include "cmCTestCoverageHandler.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include "cmsys/Directory.hxx"
-#include "cmsys/FStream.hxx"
-#include <cstdlib>
-#include <cstring>
-
/*
To setup coverage for php.
diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx
index 9c63a59..87f7147 100644
--- a/Source/CTest/cmProcess.cxx
+++ b/Source/CTest/cmProcess.cxx
@@ -2,17 +2,18 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmProcess.h"
+#include <csignal>
+#include <iostream>
+#include <string>
+
+#include "cmsys/Process.h"
+
#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmCTestRunTest.h"
#include "cmCTestTestHandler.h"
#include "cmGetPipes.h"
#include "cmStringAlgorithms.h"
-#include "cmsys/Process.h"
-
-#include <csignal>
-#include <iostream>
-#include <string>
#if defined(_WIN32)
# include "cm_kwiml.h"
#endif
diff --git a/Source/CTest/cmProcess.h b/Source/CTest/cmProcess.h
index a0a4b6b..2c24f2d 100644
--- a/Source/CTest/cmProcess.h
+++ b/Source/CTest/cmProcess.h
@@ -4,18 +4,20 @@
#define cmProcess_h
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmDuration.h"
-
-#include "cmProcessOutput.h"
-#include "cmUVHandlePtr.h"
-#include "cm_uv.h"
#include <chrono>
-#include <stddef.h>
-#include <stdint.h>
#include <string>
#include <vector>
+#include <stddef.h>
+#include <stdint.h>
+
+#include "cm_uv.h"
+
+#include "cmDuration.h"
+#include "cmProcessOutput.h"
+#include "cmUVHandlePtr.h"
+
class cmCTestRunTest;
/** \class cmProcess
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx
index 567b4f4..9e9dfbd 100644
--- a/Source/CursesDialog/ccmake.cxx
+++ b/Source/CursesDialog/ccmake.cxx
@@ -1,6 +1,14 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
+#include <csignal>
+#include <cstring>
+#include <iostream>
+#include <string>
+#include <vector>
+
+#include "cmsys/Encoding.hxx"
+
#include "cmCursesForm.h"
#include "cmCursesMainForm.h"
#include "cmCursesStandardIncludes.h"
@@ -10,13 +18,6 @@
#include "cmSystemTools.h"
#include "cmake.h"
-#include "cmsys/Encoding.hxx"
-#include <csignal>
-#include <cstring>
-#include <iostream>
-#include <string>
-#include <vector>
-
static const char* cmDocumentationName[][2] = {
{ nullptr, " ccmake - Curses Interface for CMake." },
{ nullptr, nullptr }
diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx
index 80a5b5b..97b0811 100644
--- a/Source/CursesDialog/cmCursesBoolWidget.cxx
+++ b/Source/CursesDialog/cmCursesBoolWidget.cxx
@@ -2,11 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCursesBoolWidget.h"
+#include <string>
+
#include "cmCursesWidget.h"
#include "cmStateTypes.h"
-#include <string>
-
cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, int left,
int top)
: cmCursesWidget(width, height, left, top)
diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
index 561784c..4d3131b 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
@@ -2,6 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCursesCacheEntryComposite.h"
+#include <cassert>
+#include <utility>
+#include <vector>
+
+#include <cm/memory>
+
#include "cmCursesBoolWidget.h"
#include "cmCursesFilePathWidget.h"
#include "cmCursesLabelWidget.h"
@@ -14,12 +20,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <cm/memory>
-
-#include <cassert>
-#include <utility>
-#include <vector>
-
cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
const std::string& key, int labelwidth, int entrywidth)
: Key(key)
diff --git a/Source/CursesDialog/cmCursesForm.h b/Source/CursesDialog/cmCursesForm.h
index 7842905..e3626e6 100644
--- a/Source/CursesDialog/cmCursesForm.h
+++ b/Source/CursesDialog/cmCursesForm.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCursesStandardIncludes.h"
+#include <string>
#include "cmsys/FStream.hxx"
-#include <string>
+#include "cmCursesStandardIncludes.h"
class cmCursesForm
{
diff --git a/Source/CursesDialog/cmCursesLabelWidget.h b/Source/CursesDialog/cmCursesLabelWidget.h
index 2ee9cfc..9e75681 100644
--- a/Source/CursesDialog/cmCursesLabelWidget.h
+++ b/Source/CursesDialog/cmCursesLabelWidget.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <string>
+
#include "cmCursesStandardIncludes.h"
#include "cmCursesWidget.h"
-#include <string>
-
class cmCursesMainForm;
class cmCursesLabelWidget : public cmCursesWidget
diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx
index 028cc26..e2d8d06 100644
--- a/Source/CursesDialog/cmCursesLongMessageForm.cxx
+++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx
@@ -2,14 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCursesLongMessageForm.h"
+#include <cstdio>
+#include <cstring>
+
#include "cmCursesForm.h"
#include "cmCursesMainForm.h"
#include "cmCursesStandardIncludes.h"
#include "cmVersion.h"
-#include <cstdio>
-#include <cstring>
-
inline int ctrl(int z)
{
return (z & 037);
diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h
index 466b4e1..42f9c71 100644
--- a/Source/CursesDialog/cmCursesLongMessageForm.h
+++ b/Source/CursesDialog/cmCursesLongMessageForm.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCursesForm.h"
-#include "cmCursesStandardIncludes.h"
-
#include <string>
#include <vector>
+#include "cmCursesForm.h"
+#include "cmCursesStandardIncludes.h"
+
class cmCursesLongMessageForm : public cmCursesForm
{
public:
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index 219771b..ad3debb 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -2,6 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCursesMainForm.h"
+#include <algorithm>
+#include <cstdio>
+#include <cstring>
+#include <utility>
+
+#include <cm/memory>
+
#include "cmCursesCacheEntryComposite.h"
#include "cmCursesDummyWidget.h"
#include "cmCursesForm.h"
@@ -17,13 +24,6 @@
#include "cmVersion.h"
#include "cmake.h"
-#include <cm/memory>
-
-#include <algorithm>
-#include <cstdio>
-#include <cstring>
-#include <utility>
-
inline int ctrl(int z)
{
return (z & 037);
diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h
index 48d1791..b8769b7 100644
--- a/Source/CursesDialog/cmCursesMainForm.h
+++ b/Source/CursesDialog/cmCursesMainForm.h
@@ -5,16 +5,16 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCursesCacheEntryComposite.h"
-#include "cmCursesForm.h"
-#include "cmCursesStandardIncludes.h"
-#include "cmStateTypes.h"
-
#include <cstddef>
#include <memory>
#include <string>
#include <vector>
+#include "cmCursesCacheEntryComposite.h"
+#include "cmCursesForm.h"
+#include "cmCursesStandardIncludes.h"
+#include "cmStateTypes.h"
+
class cmake;
/** \class cmCursesMainForm
diff --git a/Source/CursesDialog/cmCursesOptionsWidget.h b/Source/CursesDialog/cmCursesOptionsWidget.h
index 0128d6a..0de8e64 100644
--- a/Source/CursesDialog/cmCursesOptionsWidget.h
+++ b/Source/CursesDialog/cmCursesOptionsWidget.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCursesStandardIncludes.h"
-#include "cmCursesWidget.h"
-
#include <string>
#include <vector>
+#include "cmCursesStandardIncludes.h"
+#include "cmCursesWidget.h"
+
class cmCursesMainForm;
class cmCursesOptionsWidget : public cmCursesWidget
diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx
index 05c3279..bb3808e 100644
--- a/Source/CursesDialog/cmCursesPathWidget.cxx
+++ b/Source/CursesDialog/cmCursesPathWidget.cxx
@@ -2,13 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCursesPathWidget.h"
+#include <vector>
+
#include "cmCursesMainForm.h"
#include "cmCursesStringWidget.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
-#include <vector>
-
cmCursesPathWidget::cmCursesPathWidget(int width, int height, int left,
int top)
: cmCursesStringWidget(width, height, left, top)
diff --git a/Source/CursesDialog/cmCursesPathWidget.h b/Source/CursesDialog/cmCursesPathWidget.h
index 1eace03..fb365e9 100644
--- a/Source/CursesDialog/cmCursesPathWidget.h
+++ b/Source/CursesDialog/cmCursesPathWidget.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <string>
+
#include "cmCursesStandardIncludes.h"
#include "cmCursesStringWidget.h"
-#include <string>
-
class cmCursesMainForm;
class cmCursesPathWidget : public cmCursesStringWidget
diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx
index d3a05e8..6296af2 100644
--- a/Source/CursesDialog/cmCursesStringWidget.cxx
+++ b/Source/CursesDialog/cmCursesStringWidget.cxx
@@ -2,14 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCursesStringWidget.h"
+#include <cstdio>
+
#include "cmCursesForm.h"
#include "cmCursesMainForm.h"
#include "cmCursesStandardIncludes.h"
#include "cmCursesWidget.h"
#include "cmStateTypes.h"
-#include <cstdio>
-
inline int ctrl(int z)
{
return (z & 037);
diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h
index a41f0e8..ce06c6d 100644
--- a/Source/CursesDialog/cmCursesStringWidget.h
+++ b/Source/CursesDialog/cmCursesStringWidget.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <string>
+
#include "cmCursesStandardIncludes.h"
#include "cmCursesWidget.h"
-#include <string>
-
class cmCursesMainForm;
/** \class cmCursesStringWidget
diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h
index f761f6d..9d03c6e 100644
--- a/Source/CursesDialog/cmCursesWidget.h
+++ b/Source/CursesDialog/cmCursesWidget.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <string>
+
#include "cmCursesStandardIncludes.h"
#include "cmStateTypes.h"
-#include <string>
-
class cmCursesMainForm;
class cmCursesWidget
diff --git a/Source/QtDialog/AddCacheEntry.h b/Source/QtDialog/AddCacheEntry.h
index 65e11c0..e7a60dd 100644
--- a/Source/QtDialog/AddCacheEntry.h
+++ b/Source/QtDialog/AddCacheEntry.h
@@ -4,7 +4,6 @@
#define AddCacheEntry_h
#include "QCMake.h"
-
#include <QCheckBox>
#include <QStringList>
#include <QWidget>
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index ad18cfe..ee81a7d 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -1,17 +1,8 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#include "QCMake.h" // include to disable MS warnings
+#include <iostream>
-#include "CMakeSetupDialog.h"
-#include "cmAlgorithms.h"
-#include "cmDocumentation.h"
-#include "cmDocumentationEntry.h"
-#include "cmStringAlgorithms.h"
-#include "cmVersion.h"
-#include "cmake.h"
-#include "cmsys/CommandLineArguments.hxx"
-#include "cmsys/Encoding.hxx"
-#include "cmsys/SystemTools.hxx"
+#include "QCMake.h" // include to disable MS warnings
#include <QApplication>
#include <QDir>
#include <QLocale>
@@ -19,9 +10,19 @@
#include <QTextCodec>
#include <QTranslator>
#include <QtPlugin>
-#include <iostream>
+#include "cmsys/CommandLineArguments.hxx"
+#include "cmsys/Encoding.hxx"
+#include "cmsys/SystemTools.hxx"
+
+#include "CMakeSetupDialog.h"
+#include "cmAlgorithms.h"
+#include "cmDocumentation.h"
+#include "cmDocumentationEntry.h"
+#include "cmStringAlgorithms.h"
#include "cmSystemTools.h" // IWYU pragma: keep
+#include "cmVersion.h"
+#include "cmake.h"
static const char* cmDocumentationName[][2] = { { nullptr,
" cmake-gui - CMake GUI." },
@@ -228,10 +229,12 @@ int main(int argc, char** argv)
}
#if defined(Q_OS_MAC)
-# include "cm_sys_stat.h"
# include <cerrno>
# include <cstring>
+
# include <unistd.h>
+
+# include "cm_sys_stat.h"
static bool cmOSXInstall(std::string const& dir, std::string const& tool)
{
if (tool.empty()) {
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index e98cdcf..436a904 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -26,15 +26,17 @@
# include <QWinTaskbarProgress>
#endif
-#include "AddCacheEntry.h"
-#include "FirstConfigure.h"
#include "QCMake.h"
#include "QCMakeCacheView.h"
-#include "RegexExplorer.h"
-#include "WarningMessagesDialog.h"
+
#include "cmSystemTools.h"
#include "cmVersion.h"
+#include "AddCacheEntry.h"
+#include "FirstConfigure.h"
+#include "RegexExplorer.h"
+#include "WarningMessagesDialog.h"
+
QCMakeThread::QCMakeThread(QObject* p)
: QThread(p)
, CMakeInstance(nullptr)
diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h
index 39c1053..f23aee6 100644
--- a/Source/QtDialog/CMakeSetupDialog.h
+++ b/Source/QtDialog/CMakeSetupDialog.h
@@ -4,12 +4,12 @@
#define CMakeSetupDialog_h
#include "QCMake.h"
-
-#include "ui_CMakeSetupDialog.h"
#include <QEventLoop>
#include <QMainWindow>
#include <QThread>
+#include "ui_CMakeSetupDialog.h"
+
class QCMakeThread;
class CMakeCacheModel;
class QProgressBar;
diff --git a/Source/QtDialog/Compilers.h b/Source/QtDialog/Compilers.h
index 96770e3..931c935 100644
--- a/Source/QtDialog/Compilers.h
+++ b/Source/QtDialog/Compilers.h
@@ -5,10 +5,10 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include <QWidget>
-
#include <ui_Compilers.h>
+#include <QWidget>
+
class Compilers
: public QWidget
, public Ui::Compilers
diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx
index 0f09d7c..ca28b19 100644
--- a/Source/QtDialog/FirstConfigure.cxx
+++ b/Source/QtDialog/FirstConfigure.cxx
@@ -1,14 +1,15 @@
#include "FirstConfigure.h"
-#include "Compilers.h"
-#include "cmStringAlgorithms.h"
-
#include <QComboBox>
#include <QRadioButton>
#include <QSettings>
#include <QVBoxLayout>
+#include "cmStringAlgorithms.h"
+
+#include "Compilers.h"
+
StartCompilerSetup::StartCompilerSetup(QWidget* p)
: QWizardPage(p)
{
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx
index 5e8636a..3e6a49e 100644
--- a/Source/QtDialog/QCMakeCacheView.cxx
+++ b/Source/QtDialog/QCMakeCacheView.cxx
@@ -2,6 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "QCMakeCacheView.h"
+#include "QCMakeWidgets.h"
#include <QApplication>
#include <QEvent>
#include <QHBoxLayout>
@@ -11,8 +12,6 @@
#include <QSortFilterProxyModel>
#include <QStyle>
-#include "QCMakeWidgets.h"
-
// filter for searches
class QCMakeSearchFilter : public QSortFilterProxyModel
{
diff --git a/Source/QtDialog/QCMakeCacheView.h b/Source/QtDialog/QCMakeCacheView.h
index c1debf5..bea1965 100644
--- a/Source/QtDialog/QCMakeCacheView.h
+++ b/Source/QtDialog/QCMakeCacheView.h
@@ -4,7 +4,6 @@
#define QCMakeCacheView_h
#include "QCMake.h"
-
#include <QItemDelegate>
#include <QSet>
#include <QStandardItemModel>
diff --git a/Source/QtDialog/QCMakeWidgets.cxx b/Source/QtDialog/QCMakeWidgets.cxx
index eab418f..332a770 100644
--- a/Source/QtDialog/QCMakeWidgets.cxx
+++ b/Source/QtDialog/QCMakeWidgets.cxx
@@ -2,12 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "QCMakeWidgets.h"
+#include <utility>
+
#include <QDirModel>
#include <QFileDialog>
#include <QFileInfo>
#include <QResizeEvent>
#include <QToolButton>
-#include <utility>
QCMakeFileEditor::QCMakeFileEditor(QWidget* p, QString var)
: QLineEdit(p)
diff --git a/Source/QtDialog/RegexExplorer.h b/Source/QtDialog/RegexExplorer.h
index c7dbb76..1a1d770 100644
--- a/Source/QtDialog/RegexExplorer.h
+++ b/Source/QtDialog/RegexExplorer.h
@@ -3,10 +3,12 @@
#ifndef RegexExplorer_h
#define RegexExplorer_h
-#include "cmsys/RegularExpression.hxx"
-#include <QDialog>
#include <string>
+#include <QDialog>
+
+#include "cmsys/RegularExpression.hxx"
+
#include "ui_RegexExplorer.h"
class QString;
diff --git a/Source/QtDialog/WarningMessagesDialog.h b/Source/QtDialog/WarningMessagesDialog.h
index 9b29ad6..f209dbd 100644
--- a/Source/QtDialog/WarningMessagesDialog.h
+++ b/Source/QtDialog/WarningMessagesDialog.h
@@ -3,10 +3,10 @@
#ifndef WarningMessagesDialog_h
#define WarningMessagesDialog_h
+#include "QCMake.h"
#include <QDialog>
#include <QWidget>
-#include "QCMake.h"
#include "ui_WarningMessagesDialog.h"
/**
diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx
index 7e5db26..b85cc33 100644
--- a/Source/bindexplib.cxx
+++ b/Source/bindexplib.cxx
@@ -64,14 +64,17 @@
*/
#include "bindexplib.h"
-#include "cmSystemTools.h"
-#include "cmsys/Encoding.hxx"
-#include "cmsys/FStream.hxx"
#include <iostream>
#include <sstream>
#include <vector>
+
#include <windows.h>
+#include "cmsys/Encoding.hxx"
+#include "cmsys/FStream.hxx"
+
+#include "cmSystemTools.h"
+
#ifndef IMAGE_FILE_MACHINE_ARM
# define IMAGE_FILE_MACHINE_ARM 0x01c0 // ARM Little-Endian
#endif
diff --git a/Source/bindexplib.h b/Source/bindexplib.h
index 6c066c5..538177d 100644
--- a/Source/bindexplib.h
+++ b/Source/bindexplib.h
@@ -6,9 +6,10 @@
#include "cmConfigure.h" // IWYU pragma: keep
#include <set>
-#include <stdio.h>
#include <string>
+#include <stdio.h>
+
class bindexplib
{
public:
diff --git a/Source/cmAffinity.cxx b/Source/cmAffinity.cxx
index 33768a9..8f9fe2a 100644
--- a/Source/cmAffinity.cxx
+++ b/Source/cmAffinity.cxx
@@ -16,6 +16,7 @@
# include <cstring> // IWYU pragma: keep
# if defined(__FreeBSD__)
# include <pthread_np.h>
+
# include <sys/cpuset.h>
# include <sys/param.h>
# endif
diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h
index 06ea9f6..e0d27ee 100644
--- a/Source/cmAlgorithms.h
+++ b/Source/cmAlgorithms.h
@@ -5,8 +5,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmRange.h"
-#include "cm_kwiml.h"
#include <algorithm>
#include <functional>
#include <iterator>
@@ -14,6 +12,10 @@
#include <utility>
#include <vector>
+#include "cm_kwiml.h"
+
+#include "cmRange.h"
+
template <std::size_t N>
struct cmOverloadPriority : cmOverloadPriority<N - 1>
{
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
index c45edaf..e5eea79 100644
--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -2,20 +2,22 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmArchiveWrite.h"
-#include "cmLocale.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-#include "cm_get_date.h"
-#include "cm_libarchive.h"
-#include "cmsys/Directory.hxx"
-#include "cmsys/Encoding.hxx"
-#include "cmsys/FStream.hxx"
-
#include <cstring>
#include <ctime>
#include <iostream>
#include <sstream>
+#include "cmsys/Directory.hxx"
+#include "cmsys/Encoding.hxx"
+#include "cmsys/FStream.hxx"
+
+#include "cm_get_date.h"
+#include "cm_libarchive.h"
+
+#include "cmLocale.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+
#ifndef __LA_SSIZE_T
# define __LA_SSIZE_T la_ssize_t
#endif
diff --git a/Source/cmArgumentParser.h b/Source/cmArgumentParser.h
index 9be2488..9426537 100644
--- a/Source/cmArgumentParser.h
+++ b/Source/cmArgumentParser.h
@@ -5,15 +5,16 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cm_static_string_view.hxx"
-#include <cm/string_view>
-
#include <cassert>
#include <functional>
#include <string>
#include <utility>
#include <vector>
+#include <cm/string_view>
+
+#include "cm_static_string_view.hxx"
+
namespace ArgumentParser {
using StringList = std::vector<std::string>;
diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx
index 111bc41..289bb72 100644
--- a/Source/cmAuxSourceDirectoryCommand.cxx
+++ b/Source/cmAuxSourceDirectoryCommand.cxx
@@ -2,11 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmAuxSourceDirectoryCommand.h"
-#include "cmsys/Directory.hxx"
#include <algorithm>
#include <cstddef>
#include <utility>
+#include "cmsys/Directory.hxx"
+
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
diff --git a/Source/cmBinUtilsLinker.cxx b/Source/cmBinUtilsLinker.cxx
index 3dac85c..a9f4d91 100644
--- a/Source/cmBinUtilsLinker.cxx
+++ b/Source/cmBinUtilsLinker.cxx
@@ -2,6 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmBinUtilsLinker.h"
+
#include "cmRuntimeDependencyArchive.h"
cmBinUtilsLinker::cmBinUtilsLinker(cmRuntimeDependencyArchive* archive)
diff --git a/Source/cmBinUtilsLinker.h b/Source/cmBinUtilsLinker.h
index 29853a5..78d517b 100644
--- a/Source/cmBinUtilsLinker.h
+++ b/Source/cmBinUtilsLinker.h
@@ -4,10 +4,10 @@
#ifndef cmBinUtilsLinker_h
#define cmBinUtilsLinker_h
-#include "cmStateTypes.h"
-
#include <string>
+#include "cmStateTypes.h"
+
class cmRuntimeDependencyArchive;
class cmBinUtilsLinker
diff --git a/Source/cmBinUtilsLinuxELFGetRuntimeDependenciesTool.cxx b/Source/cmBinUtilsLinuxELFGetRuntimeDependenciesTool.cxx
index 40de592..abd1209 100644
--- a/Source/cmBinUtilsLinuxELFGetRuntimeDependenciesTool.cxx
+++ b/Source/cmBinUtilsLinuxELFGetRuntimeDependenciesTool.cxx
@@ -2,6 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmBinUtilsLinuxELFGetRuntimeDependenciesTool.h"
+
#include "cmRuntimeDependencyArchive.h"
cmBinUtilsLinuxELFGetRuntimeDependenciesTool::
diff --git a/Source/cmBinUtilsLinuxELFLinker.cxx b/Source/cmBinUtilsLinuxELFLinker.cxx
index a1125a9..0dea825 100644
--- a/Source/cmBinUtilsLinuxELFLinker.cxx
+++ b/Source/cmBinUtilsLinuxELFLinker.cxx
@@ -3,6 +3,12 @@
#include "cmBinUtilsLinuxELFLinker.h"
+#include <sstream>
+
+#include <cm/memory>
+
+#include <cmsys/RegularExpression.hxx>
+
#include "cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.h"
#include "cmLDConfigLDConfigTool.h"
#include "cmMakefile.h"
@@ -11,12 +17,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <cmsys/RegularExpression.hxx>
-
-#include <sstream>
-
-#include <cm/memory>
-
static std::string ReplaceOrigin(const std::string& rpath,
const std::string& origin)
{
diff --git a/Source/cmBinUtilsLinuxELFLinker.h b/Source/cmBinUtilsLinuxELFLinker.h
index e209637..b17df11 100644
--- a/Source/cmBinUtilsLinuxELFLinker.h
+++ b/Source/cmBinUtilsLinuxELFLinker.h
@@ -4,15 +4,15 @@
#ifndef cmBinUtilsLinuxELFLinker_h
#define cmBinUtilsLinuxELFLinker_h
+#include <memory>
+#include <string>
+#include <vector>
+
#include "cmBinUtilsLinker.h"
#include "cmBinUtilsLinuxELFGetRuntimeDependenciesTool.h"
#include "cmLDConfigTool.h"
#include "cmStateTypes.h"
-#include <memory>
-#include <string>
-#include <vector>
-
class cmRuntimeDependencyArchive;
class cmBinUtilsLinuxELFLinker : public cmBinUtilsLinker
diff --git a/Source/cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.cxx b/Source/cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.cxx
index 3bf7bf8..566e4a4 100644
--- a/Source/cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.cxx
+++ b/Source/cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.cxx
@@ -2,13 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.h"
-#include "cmRuntimeDependencyArchive.h"
-#include "cmSystemTools.h"
-#include "cmUVProcessChain.h"
+
+#include <sstream>
#include <cmsys/RegularExpression.hxx>
-#include <sstream>
+#include "cmRuntimeDependencyArchive.h"
+#include "cmSystemTools.h"
+#include "cmUVProcessChain.h"
cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool::
cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool(
diff --git a/Source/cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.h b/Source/cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.h
index 286337f..969e4d4 100644
--- a/Source/cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.h
+++ b/Source/cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.h
@@ -4,11 +4,11 @@
#ifndef cmBinUtilsLinuxELFGetRuntimeCollectDependenciesTool_h
#define cmBinUtilsLinuxELFGetRuntimeCollectDependenciesTool_h
-#include "cmBinUtilsLinuxELFGetRuntimeDependenciesTool.h"
-
#include <string>
#include <vector>
+#include "cmBinUtilsLinuxELFGetRuntimeDependenciesTool.h"
+
class cmRuntimeDependencyArchive;
class cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool
diff --git a/Source/cmBinUtilsMacOSMachOLinker.cxx b/Source/cmBinUtilsMacOSMachOLinker.cxx
index b1f718b..98250b1 100644
--- a/Source/cmBinUtilsMacOSMachOLinker.cxx
+++ b/Source/cmBinUtilsMacOSMachOLinker.cxx
@@ -3,17 +3,17 @@
#include "cmBinUtilsMacOSMachOLinker.h"
-#include "cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.h"
-#include "cmRuntimeDependencyArchive.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-
#include <sstream>
#include <string>
#include <vector>
#include <cm/memory>
+#include "cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.h"
+#include "cmRuntimeDependencyArchive.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+
cmBinUtilsMacOSMachOLinker::cmBinUtilsMacOSMachOLinker(
cmRuntimeDependencyArchive* archive)
: cmBinUtilsLinker(archive)
diff --git a/Source/cmBinUtilsMacOSMachOLinker.h b/Source/cmBinUtilsMacOSMachOLinker.h
index f4f309d..4a24ea3 100644
--- a/Source/cmBinUtilsMacOSMachOLinker.h
+++ b/Source/cmBinUtilsMacOSMachOLinker.h
@@ -4,14 +4,14 @@
#ifndef cmBinUtilsMacOSMachOLinker_h
#define cmBinUtilsMacOSMachOLinker_h
-#include "cmBinUtilsLinker.h"
-#include "cmBinUtilsMacOSMachOGetRuntimeDependenciesTool.h"
-#include "cmStateTypes.h"
-
#include <memory>
#include <string>
#include <vector>
+#include "cmBinUtilsLinker.h"
+#include "cmBinUtilsMacOSMachOGetRuntimeDependenciesTool.h"
+#include "cmStateTypes.h"
+
class cmRuntimeDependencyArchive;
class cmBinUtilsMacOSMachOLinker : public cmBinUtilsLinker
diff --git a/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx b/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx
index bab2382..351d92a 100644
--- a/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx
+++ b/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx
@@ -3,12 +3,12 @@
#include "cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.h"
-#include "cmRuntimeDependencyArchive.h"
-#include "cmUVProcessChain.h"
+#include <sstream>
#include <cmsys/RegularExpression.hxx>
-#include <sstream>
+#include "cmRuntimeDependencyArchive.h"
+#include "cmUVProcessChain.h"
cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool::
cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool(
diff --git a/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.h b/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.h
index 12bcbc1..8ac7e18 100644
--- a/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.h
+++ b/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.h
@@ -4,11 +4,11 @@
#ifndef cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool_h
#define cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool_h
-#include "cmBinUtilsMacOSMachOGetRuntimeDependenciesTool.h"
-
#include <string>
#include <vector>
+#include "cmBinUtilsMacOSMachOGetRuntimeDependenciesTool.h"
+
class cmRuntimeDependencyArchive;
class cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool
diff --git a/Source/cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.cxx b/Source/cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.cxx
index 2b35e30..f342884 100644
--- a/Source/cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.cxx
+++ b/Source/cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.cxx
@@ -2,12 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.h"
-#include "cmRuntimeDependencyArchive.h"
-#include "cmUVProcessChain.h"
+
+#include <sstream>
#include <cmsys/RegularExpression.hxx>
-#include <sstream>
+#include "cmRuntimeDependencyArchive.h"
+#include "cmUVProcessChain.h"
cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool::
cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool(
diff --git a/Source/cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.h b/Source/cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.h
index 4c17f8d..eae22ea 100644
--- a/Source/cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.h
+++ b/Source/cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.h
@@ -4,11 +4,11 @@
#ifndef cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool_h
#define cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool_h
-#include "cmBinUtilsWindowsPEGetRuntimeDependenciesTool.h"
-
#include <string>
#include <vector>
+#include "cmBinUtilsWindowsPEGetRuntimeDependenciesTool.h"
+
class cmRuntimeDependencyArchive;
class cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool
diff --git a/Source/cmBinUtilsWindowsPEGetRuntimeDependenciesTool.cxx b/Source/cmBinUtilsWindowsPEGetRuntimeDependenciesTool.cxx
index f5a4431..468a40c 100644
--- a/Source/cmBinUtilsWindowsPEGetRuntimeDependenciesTool.cxx
+++ b/Source/cmBinUtilsWindowsPEGetRuntimeDependenciesTool.cxx
@@ -2,6 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmBinUtilsWindowsPEGetRuntimeDependenciesTool.h"
+
#include "cmRuntimeDependencyArchive.h"
cmBinUtilsWindowsPEGetRuntimeDependenciesTool::
diff --git a/Source/cmBinUtilsWindowsPELinker.cxx b/Source/cmBinUtilsWindowsPELinker.cxx
index bfafaeb..79e39e9 100644
--- a/Source/cmBinUtilsWindowsPELinker.cxx
+++ b/Source/cmBinUtilsWindowsPELinker.cxx
@@ -3,17 +3,17 @@
#include "cmBinUtilsWindowsPELinker.h"
+#include <sstream>
+#include <vector>
+
+#include <cm/memory>
+
#include "cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.h"
#include "cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.h"
#include "cmRuntimeDependencyArchive.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <sstream>
-#include <vector>
-
-#include <cm/memory>
-
#ifdef _WIN32
# include <windows.h>
#endif
diff --git a/Source/cmBinUtilsWindowsPELinker.h b/Source/cmBinUtilsWindowsPELinker.h
index 8d2bf4b..a8bb596 100644
--- a/Source/cmBinUtilsWindowsPELinker.h
+++ b/Source/cmBinUtilsWindowsPELinker.h
@@ -4,13 +4,13 @@
#ifndef cmBinUtilsWindowsPELinker_h
#define cmBinUtilsWindowsPELinker_h
+#include <memory>
+#include <string>
+
#include "cmBinUtilsLinker.h"
#include "cmBinUtilsWindowsPEGetRuntimeDependenciesTool.h"
#include "cmStateTypes.h"
-#include <memory>
-#include <string>
-
class cmRuntimeDependencyArchive;
class cmBinUtilsWindowsPELinker : public cmBinUtilsLinker
diff --git a/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx b/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx
index 1f27003..1effda0 100644
--- a/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx
+++ b/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx
@@ -2,12 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.h"
-#include "cmRuntimeDependencyArchive.h"
-#include "cmUVProcessChain.h"
+
+#include <sstream>
#include <cmsys/RegularExpression.hxx>
-#include <sstream>
+#include "cmRuntimeDependencyArchive.h"
+#include "cmUVProcessChain.h"
cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool::
cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool(
diff --git a/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.h b/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.h
index 1d1a5b0..a67cb0c 100644
--- a/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.h
+++ b/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.h
@@ -4,11 +4,11 @@
#ifndef cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool_h
#define cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool_h
-#include "cmBinUtilsWindowsPEGetRuntimeDependenciesTool.h"
-
#include <string>
#include <vector>
+#include "cmBinUtilsWindowsPEGetRuntimeDependenciesTool.h"
+
class cmRuntimeDependencyArchive;
class cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool
diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx
index df94f1d..3e517dc 100644
--- a/Source/cmBuildNameCommand.cxx
+++ b/Source/cmBuildNameCommand.cxx
@@ -2,9 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmBuildNameCommand.h"
-#include "cmsys/RegularExpression.hxx"
#include <algorithm>
+#include "cmsys/RegularExpression.hxx"
+
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
#include "cmStateTypes.h"
diff --git a/Source/cmCLocaleEnvironmentScope.cxx b/Source/cmCLocaleEnvironmentScope.cxx
index 737e3ea..c6c38f8 100644
--- a/Source/cmCLocaleEnvironmentScope.cxx
+++ b/Source/cmCLocaleEnvironmentScope.cxx
@@ -2,11 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCLocaleEnvironmentScope.h"
-#include "cmSystemTools.h"
-
#include <sstream>
#include <utility>
+#include "cmSystemTools.h"
+
cmCLocaleEnvironmentScope::cmCLocaleEnvironmentScope()
{
this->SetEnv("LANGUAGE", "");
diff --git a/Source/cmCMakeHostSystemInformationCommand.cxx b/Source/cmCMakeHostSystemInformationCommand.cxx
index c3f6f40..26e9af0 100644
--- a/Source/cmCMakeHostSystemInformationCommand.cxx
+++ b/Source/cmCMakeHostSystemInformationCommand.cxx
@@ -4,9 +4,10 @@
#include <cstddef>
+#include "cmsys/SystemInformation.hxx"
+
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
-#include "cmsys/SystemInformation.hxx"
#if defined(_WIN32)
# include "cmAlgorithms.h"
diff --git a/Source/cmCPackPropertiesGenerator.cxx b/Source/cmCPackPropertiesGenerator.cxx
index a33b824..cc9ad01 100644
--- a/Source/cmCPackPropertiesGenerator.cxx
+++ b/Source/cmCPackPropertiesGenerator.cxx
@@ -1,12 +1,12 @@
#include "cmCPackPropertiesGenerator.h"
+#include <map>
+#include <ostream>
+
#include "cmGeneratorExpression.h"
#include "cmInstalledFile.h"
#include "cmOutputConverter.h"
-#include <map>
-#include <ostream>
-
cmCPackPropertiesGenerator::cmCPackPropertiesGenerator(
cmLocalGenerator* lg, cmInstalledFile const& installedFile,
std::vector<std::string> const& configurations)
diff --git a/Source/cmCPackPropertiesGenerator.h b/Source/cmCPackPropertiesGenerator.h
index ad943c5..8339238 100644
--- a/Source/cmCPackPropertiesGenerator.h
+++ b/Source/cmCPackPropertiesGenerator.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmScriptGenerator.h"
-
#include <iosfwd>
#include <string>
#include <vector>
+#include "cmScriptGenerator.h"
+
class cmInstalledFile;
class cmLocalGenerator;
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index 78a232e..177bca8 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -7,6 +7,8 @@
#include "cmCPluginAPI.h"
+#include <cstdlib>
+
#include "cmExecutionStatus.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
@@ -14,8 +16,6 @@
#include "cmState.h"
#include "cmVersion.h"
-#include <cstdlib>
-
#ifdef __QNX__
# include <malloc.h> /* for malloc/free on QNX */
#endif
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 1031f40..0d1ecca 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -2,14 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTest.h"
-#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/SystemInformation.hxx"
#include <algorithm>
#include <cctype>
#include <chrono>
@@ -23,6 +15,16 @@
#include <string>
#include <utility>
#include <vector>
+
+#include "cmsys/Base64.h"
+#include "cmsys/Directory.hxx"
+#include "cmsys/FStream.hxx"
+#include "cmsys/Glob.hxx"
+#include "cmsys/Process.h"
+#include "cmsys/SystemInformation.hxx"
+
+#include "cm_curl.h"
+#include "cm_zlib.h"
#if defined(_WIN32)
# include <windows.h> // IWYU pragma: keep
#else
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index 9b11653..82a6f4c 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -5,9 +5,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmDuration.h"
-#include "cmProcessOutput.h"
-
#include <chrono>
#include <ctime>
#include <map>
@@ -16,6 +13,9 @@
#include <string>
#include <vector>
+#include "cmDuration.h"
+#include "cmProcessOutput.h"
+
class cmCTestBuildHandler;
class cmCTestBuildAndTestHandler;
class cmCTestCoverageHandler;
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 0888a5e..d627465 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -2,14 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCacheManager.h"
-#include "cmsys/FStream.hxx"
-#include "cmsys/Glob.hxx"
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <sstream>
#include <string>
+#include "cmsys/FStream.hxx"
+#include "cmsys/Glob.hxx"
+
#include "cmGeneratedFileStream.h"
#include "cmMessageType.h"
#include "cmMessenger.h"
diff --git a/Source/cmCheckCustomOutputs.h b/Source/cmCheckCustomOutputs.h
index 7c4b3fe..9f33d16 100644
--- a/Source/cmCheckCustomOutputs.h
+++ b/Source/cmCheckCustomOutputs.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include <cm/string_view>
-
#include <string>
#include <vector>
+#include <cm/string_view>
+
class cmExecutionStatus;
bool cmCheckCustomOutputs(const std::vector<std::string>& outputs,
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx
index e35fba5..613ae06 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -2,16 +2,16 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCommandArgumentParserHelper.h"
+#include <cstring>
+#include <iostream>
+#include <sstream>
+
#include "cmCommandArgumentLexer.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <cstring>
-#include <iostream>
-#include <sstream>
-
int cmCommandArgument_yyparse(yyscan_t yyscanner);
//
cmCommandArgumentParserHelper::cmCommandArgumentParserHelper()
diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx
index b1f7db7..ff73b27 100644
--- a/Source/cmCommands.cxx
+++ b/Source/cmCommands.cxx
@@ -1,11 +1,9 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#include <cm/memory>
-
#include "cmCommands.h"
-#include "cmPolicies.h"
-#include "cmState.h"
+
+#include <cm/memory>
#include "cmAddCompileDefinitionsCommand.h"
#include "cmAddCustomCommandCommand.h"
@@ -61,6 +59,7 @@
#include "cmMessageCommand.h"
#include "cmOptionCommand.h"
#include "cmParseArgumentsCommand.h"
+#include "cmPolicies.h"
#include "cmProjectCommand.h"
#include "cmReturnCommand.h"
#include "cmSeparateArgumentsCommand.h"
@@ -71,6 +70,7 @@
#include "cmSetTargetPropertiesCommand.h"
#include "cmSetTestsPropertiesCommand.h"
#include "cmSiteNameCommand.h"
+#include "cmState.h"
#include "cmStringCommand.h"
#include "cmSubdirCommand.h"
#include "cmTargetCompileDefinitionsCommand.h"
diff --git a/Source/cmComputeComponentGraph.cxx b/Source/cmComputeComponentGraph.cxx
index 655e4ac..af257ee 100644
--- a/Source/cmComputeComponentGraph.cxx
+++ b/Source/cmComputeComponentGraph.cxx
@@ -3,7 +3,6 @@
#include "cmComputeComponentGraph.h"
#include <algorithm>
-
#include <cassert>
cmComputeComponentGraph::cmComputeComponentGraph(Graph const& input)
diff --git a/Source/cmComputeComponentGraph.h b/Source/cmComputeComponentGraph.h
index 5493769..202888c 100644
--- a/Source/cmComputeComponentGraph.h
+++ b/Source/cmComputeComponentGraph.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmGraphAdjacencyList.h"
-
#include <stack>
#include <vector>
+#include "cmGraphAdjacencyList.h"
+
/** \class cmComputeComponentGraph
* \brief Analyze a graph to determine strongly connected components.
*
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index ab4371a..7a9e2b7 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -2,6 +2,16 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmComputeLinkDepends.h"
+#include <algorithm>
+#include <cassert>
+#include <cstdio>
+#include <cstring>
+#include <iterator>
+#include <sstream>
+#include <utility>
+
+#include <cm/memory>
+
#include "cmComputeComponentGraph.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
@@ -14,16 +24,6 @@
#include "cmTarget.h"
#include "cmake.h"
-#include <algorithm>
-#include <cassert>
-#include <cstdio>
-#include <cstring>
-#include <iterator>
-#include <sstream>
-#include <utility>
-
-#include <cm/memory>
-
/*
This file computes an ordered list of link items to use when linking a
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h
index 203cc68..645189a 100644
--- a/Source/cmComputeLinkDepends.h
+++ b/Source/cmComputeLinkDepends.h
@@ -5,17 +5,18 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmGraphAdjacencyList.h"
-#include "cmLinkItem.h"
-#include "cmTargetLinkLibraryType.h"
-
#include <map>
#include <memory>
-#include <queue>
#include <set>
#include <string>
#include <vector>
+#include <queue>
+
+#include "cmGraphAdjacencyList.h"
+#include "cmLinkItem.h"
+#include "cmTargetLinkLibraryType.h"
+
class cmComputeComponentGraph;
class cmGeneratorTarget;
class cmGlobalGenerator;
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 832f38e..8773d10 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -2,6 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmComputeLinkInformation.h"
+#include <algorithm>
+#include <cctype>
+#include <cstring>
+#include <sstream>
+#include <utility>
+
#include "cmAlgorithms.h"
#include "cmComputeLinkDepends.h"
#include "cmGeneratorTarget.h"
@@ -20,12 +26,6 @@
#include "cmTarget.h"
#include "cmake.h"
-#include <algorithm>
-#include <cctype>
-#include <cstring>
-#include <sstream>
-#include <utility>
-
//#define CM_COMPUTE_LINK_INFO_DEBUG
/*
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index d3345d9..92ab83b 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -5,13 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmsys/RegularExpression.hxx"
#include <iosfwd>
#include <set>
#include <string>
#include <utility>
#include <vector>
+#include "cmsys/RegularExpression.hxx"
+
class cmGeneratorTarget;
class cmGlobalGenerator;
class cmMakefile;
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index 239fcdf..162bab2 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -2,6 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmComputeTargetDepends.h"
+#include <cassert>
+#include <cstdio>
+#include <sstream>
+#include <utility>
+
#include "cmComputeComponentGraph.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
@@ -20,11 +25,6 @@
#include "cmTargetDepend.h"
#include "cmake.h"
-#include <cassert>
-#include <cstdio>
-#include <sstream>
-#include <utility>
-
/*
This class is meant to analyze inter-target dependencies globally
diff --git a/Source/cmComputeTargetDepends.h b/Source/cmComputeTargetDepends.h
index 6087574..d8060ae 100644
--- a/Source/cmComputeTargetDepends.h
+++ b/Source/cmComputeTargetDepends.h
@@ -5,14 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmGraphAdjacencyList.h"
-#include "cmListFileCache.h"
-
#include <map>
#include <set>
#include <string>
#include <vector>
+#include "cmGraphAdjacencyList.h"
+#include "cmListFileCache.h"
+
class cmComputeComponentGraph;
class cmGeneratorTarget;
class cmGlobalGenerator;
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index 3ddd8ca..003e60d 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmConditionEvaluator.h"
-#include "cmsys/RegularExpression.hxx"
#include <cstdio>
#include <cstdlib>
#include <cstring>
@@ -10,6 +9,8 @@
#include <sstream>
#include <utility>
+#include "cmsys/RegularExpression.hxx"
+
#include "cmAlgorithms.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
diff --git a/Source/cmConnection.cxx b/Source/cmConnection.cxx
index 166426b..884e314 100644
--- a/Source/cmConnection.cxx
+++ b/Source/cmConnection.cxx
@@ -2,12 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmConnection.h"
-#include "cmServer.h"
-#include "cm_uv.h"
-
#include <cassert>
#include <cstring>
+#include "cm_uv.h"
+
+#include "cmServer.h"
+
struct write_req_t
{
uv_write_t req;
diff --git a/Source/cmConnection.h b/Source/cmConnection.h
index 092b913..7bb2494 100644
--- a/Source/cmConnection.h
+++ b/Source/cmConnection.h
@@ -5,13 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmUVHandlePtr.h"
-#include "cm_uv.h"
-
#include <cstddef>
#include <memory>
#include <string>
+#include "cm_uv.h"
+
+#include "cmUVHandlePtr.h"
+
class cmServerBase;
/***
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 12050b3..515f446 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -2,13 +2,16 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCoreTryCompile.h"
-#include "cmsys/Directory.hxx"
#include <cstdio>
#include <cstring>
#include <set>
#include <sstream>
#include <utility>
+#include "cmsys/Directory.hxx"
+
+#include "cm_static_string_view.hxx"
+
#include "cmExportTryCompileFileGenerator.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
@@ -20,7 +23,6 @@
#include "cmSystemTools.h"
#include "cmTarget.h"
#include "cmVersion.h"
-#include "cm_static_string_view.hxx"
#include "cmake.h"
static std::string const kCMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN =
diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx
index ff683ad..dc7d939 100644
--- a/Source/cmCryptoHash.cxx
+++ b/Source/cmCryptoHash.cxx
@@ -2,11 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCryptoHash.h"
-#include "cm_kwiml.h"
-#include "cm_rhash.h"
+#include <cm/memory>
+
#include "cmsys/FStream.hxx"
-#include <cm/memory>
+#include "cm_kwiml.h"
+#include "cm_rhash.h"
static unsigned int const cmCryptoHashAlgoToId[] = {
/* clang-format needs this comment to break after the opening brace */
diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h
index 05552bd..f27bb5d 100644
--- a/Source/cmCryptoHash.h
+++ b/Source/cmCryptoHash.h
@@ -5,13 +5,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include <cm/string_view>
-
#include <cstddef>
#include <memory>
#include <string>
#include <vector>
+#include <cm/string_view>
+
/**
* @brief Abstract base class for cryptographic hash generators
*/
diff --git a/Source/cmCurl.h b/Source/cmCurl.h
index fe7eb80..cb73ce6 100644
--- a/Source/cmCurl.h
+++ b/Source/cmCurl.h
@@ -5,9 +5,10 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cm_curl.h"
#include <string>
+#include "cm_curl.h"
+
std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile = nullptr);
std::string cmCurlSetNETRCOption(::CURL* curl, const std::string& netrc_level,
const std::string& netrc_file);
diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx
index fc6718d..09d269b 100644
--- a/Source/cmCustomCommand.cxx
+++ b/Source/cmCustomCommand.cxx
@@ -2,11 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCustomCommand.h"
+#include <utility>
+
#include "cmAlgorithms.h"
#include "cmMakefile.h"
-#include <utility>
-
cmCustomCommand::cmCustomCommand(cmMakefile const* mf,
std::vector<std::string> outputs,
std::vector<std::string> byproducts,
diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h
index bb5a0ed..4689ace 100644
--- a/Source/cmCustomCommand.h
+++ b/Source/cmCustomCommand.h
@@ -5,13 +5,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCustomCommandLines.h"
-#include "cmListFileCache.h"
-
#include <string>
#include <utility>
#include <vector>
+#include "cmCustomCommandLines.h"
+#include "cmListFileCache.h"
+
class cmMakefile;
class cmImplicitDependsList
diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx
index 7f3e052..c1f412d 100644
--- a/Source/cmCustomCommandGenerator.cxx
+++ b/Source/cmCustomCommandGenerator.cxx
@@ -2,6 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCustomCommandGenerator.h"
+#include <cstddef>
+#include <memory>
+#include <utility>
+
#include "cmAlgorithms.h"
#include "cmCustomCommand.h"
#include "cmCustomCommandLines.h"
@@ -13,10 +17,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <cstddef>
-#include <memory>
-#include <utility>
-
namespace {
void AppendPaths(const std::vector<std::string>& inputs,
cmGeneratorExpression const& ge, cmLocalGenerator* lg,
diff --git a/Source/cmCustomCommandGenerator.h b/Source/cmCustomCommandGenerator.h
index 50f292e..67ee9e0 100644
--- a/Source/cmCustomCommandGenerator.h
+++ b/Source/cmCustomCommandGenerator.h
@@ -4,11 +4,12 @@
#define cmCustomCommandGenerator_h
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCustomCommandLines.h"
#include <string>
#include <vector>
+#include "cmCustomCommandLines.h"
+
class cmCustomCommand;
class cmLocalGenerator;
diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index 32f47b0..69a6427 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -2,13 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmDefinitions.h"
-#include <cm/string_view>
-
#include <cassert>
#include <functional>
#include <unordered_set>
#include <utility>
+#include <cm/string_view>
+
cmDefinitions::Def cmDefinitions::NoDef;
cmDefinitions::Def const& cmDefinitions::GetInternal(const std::string& key,
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index 72e88b5..0e38fb1 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -5,17 +5,16 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmLinkedTree.h"
-
-#include "cmString.hxx"
-
-#include <cm/string_view>
-
#include <functional>
#include <string>
#include <unordered_map>
#include <vector>
+#include <cm/string_view>
+
+#include "cmLinkedTree.h"
+#include "cmString.hxx"
+
/** \class cmDefinitions
* \brief Store a scope of variable definitions for CMake language.
*
diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx
index e8f6faf..129a5f7 100644
--- a/Source/cmDepends.cxx
+++ b/Source/cmDepends.cxx
@@ -2,6 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmDepends.h"
+#include <sstream>
+#include <utility>
+
+#include "cmsys/FStream.hxx"
+
#include "cmFileTime.h"
#include "cmFileTimeCache.h"
#include "cmGeneratedFileStream.h"
@@ -10,10 +15,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include "cmsys/FStream.hxx"
-#include <sstream>
-#include <utility>
-
cmDepends::cmDepends(cmLocalGenerator* lg, std::string targetDir)
: LocalGenerator(lg)
, TargetDirectory(std::move(targetDir))
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx
index 012a0b1..e30d959 100644
--- a/Source/cmDependsC.cxx
+++ b/Source/cmDependsC.cxx
@@ -2,9 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmDependsC.h"
-#include "cmsys/FStream.hxx"
#include <utility>
+#include "cmsys/FStream.hxx"
+
#include "cmFileTime.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h
index 7d732d9..3bb6e36 100644
--- a/Source/cmDependsC.h
+++ b/Source/cmDependsC.h
@@ -5,16 +5,18 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmDepends.h"
-
-#include "cmsys/RegularExpression.hxx"
#include <iosfwd>
#include <map>
-#include <queue>
#include <set>
#include <string>
#include <vector>
+#include <queue>
+
+#include "cmsys/RegularExpression.hxx"
+
+#include "cmDepends.h"
+
class cmLocalGenerator;
/** \class cmDependsC
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index de919f1..ee43587 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -2,13 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmDependsFortran.h"
-#include "cmsys/FStream.hxx"
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <map>
#include <utility>
+#include "cmsys/FStream.hxx"
+
#include "cmFortranParser.h" /* Interface to parser object. */
#include "cmGeneratedFileStream.h"
#include "cmLocalGenerator.h"
diff --git a/Source/cmDependsJava.h b/Source/cmDependsJava.h
index dd671a1..2a90251 100644
--- a/Source/cmDependsJava.h
+++ b/Source/cmDependsJava.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmDepends.h"
-
#include <iosfwd>
#include <set>
#include <string>
+#include "cmDepends.h"
+
/** \class cmDependsJava
* \brief Dependency scanner for Java class files.
*/
diff --git a/Source/cmDependsJavaParserHelper.cxx b/Source/cmDependsJavaParserHelper.cxx
index 18b49b8..516bbbf 100644
--- a/Source/cmDependsJavaParserHelper.cxx
+++ b/Source/cmDependsJavaParserHelper.cxx
@@ -2,17 +2,19 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmDependsJavaParserHelper.h"
-#include "cmDependsJavaLexer.h"
-#include "cmSystemTools.h"
-
-#include "cmsys/FStream.hxx"
-#include <cm/string_view>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <utility>
+#include <cm/string_view>
+
+#include "cmsys/FStream.hxx"
+
+#include "cmDependsJavaLexer.h"
+#include "cmSystemTools.h"
+
int cmDependsJava_yyparse(yyscan_t yyscanner);
cmDependsJavaParserHelper::cmDependsJavaParserHelper()
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index d1f3a83..1bc453d 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -2,19 +2,20 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmDocumentation.h"
+#include <algorithm>
+#include <cctype>
+#include <cstring>
+#include <utility>
+
+#include "cmsys/FStream.hxx"
+#include "cmsys/Glob.hxx"
+
#include "cmDocumentationEntry.h"
#include "cmDocumentationSection.h"
#include "cmRST.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
-#include "cmsys/FStream.hxx"
-#include "cmsys/Glob.hxx"
-#include <algorithm>
-#include <cctype>
-#include <cstring>
-#include <utility>
-
static const char* cmDocumentationStandardOptions[][2] = {
{ "--help,-help,-usage,-h,-H,/?", "Print usage information and exit." },
{ "--version,-version,/V [<f>]", "Print version number and exit." },
diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h
index cf74b80..3768e1a 100644
--- a/Source/cmDocumentation.h
+++ b/Source/cmDocumentation.h
@@ -5,14 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmDocumentationFormatter.h"
-#include "cmDocumentationSection.h"
-
#include <iosfwd>
#include <map>
#include <string>
#include <vector>
+#include "cmDocumentationFormatter.h"
+#include "cmDocumentationSection.h"
+
struct cmDocumentationEntry;
/** Class to generate documentation. */
diff --git a/Source/cmDocumentationFormatter.cxx b/Source/cmDocumentationFormatter.cxx
index be6756a..732637e 100644
--- a/Source/cmDocumentationFormatter.cxx
+++ b/Source/cmDocumentationFormatter.cxx
@@ -2,15 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmDocumentationFormatter.h"
-#include "cmDocumentationEntry.h"
-#include "cmDocumentationSection.h"
-
#include <cstring>
#include <iomanip>
#include <ostream>
#include <string>
#include <vector>
+#include "cmDocumentationEntry.h"
+#include "cmDocumentationSection.h"
+
cmDocumentationFormatter::cmDocumentationFormatter() = default;
cmDocumentationFormatter::~cmDocumentationFormatter() = default;
diff --git a/Source/cmDocumentationSection.h b/Source/cmDocumentationSection.h
index 19c7407..15cada6 100644
--- a/Source/cmDocumentationSection.h
+++ b/Source/cmDocumentationSection.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmAlgorithms.h"
-#include "cmDocumentationEntry.h"
-
#include <string>
#include <vector>
+#include "cmAlgorithms.h"
+#include "cmDocumentationEntry.h"
+
// Low-level interface for custom documents:
/** Internal class representing a section of the documentation.
* Cares e.g. for the different section titles in the different
diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index 06b5511..5976b2f 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -2,10 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmELF.h"
-#include "cmAlgorithms.h"
-#include "cm_kwiml.h"
-#include "cmsys/FStream.hxx"
-#include <cm/memory>
#include <cstddef>
#include <map>
#include <memory>
@@ -13,6 +9,14 @@
#include <utility>
#include <vector>
+#include <cm/memory>
+
+#include "cmsys/FStream.hxx"
+
+#include "cm_kwiml.h"
+
+#include "cmAlgorithms.h"
+
// Include the ELF format information system header.
#if defined(__OpenBSD__)
# include <elf_abi.h>
diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx
index 207b6fd..51fb219 100644
--- a/Source/cmExecProgramCommand.cxx
+++ b/Source/cmExecProgramCommand.cxx
@@ -2,9 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExecProgramCommand.h"
-#include "cmsys/Process.h"
#include <cstdio>
+#include "cmsys/Process.h"
+
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
#include "cmProcessOutput.h"
diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx
index 12364c8..80e4bcd 100644
--- a/Source/cmExecuteProcessCommand.cxx
+++ b/Source/cmExecuteProcessCommand.cxx
@@ -2,9 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExecuteProcessCommand.h"
-#include "cm_static_string_view.hxx"
-#include "cmsys/Process.h"
-
#include <algorithm>
#include <cctype> /* isspace */
#include <cstdio>
@@ -12,6 +9,10 @@
#include <memory>
#include <vector>
+#include "cmsys/Process.h"
+
+#include "cm_static_string_view.hxx"
+
#include "cmAlgorithms.h"
#include "cmArgumentParser.h"
#include "cmExecutionStatus.h"
diff --git a/Source/cmExecutionStatus.h b/Source/cmExecutionStatus.h
index 654922c..d2cc9b8 100644
--- a/Source/cmExecutionStatus.h
+++ b/Source/cmExecutionStatus.h
@@ -4,6 +4,7 @@
#define cmExecutionStatus_h
#include <cmConfigure.h> // IWYU pragma: keep
+
#include <string>
class cmMakefile;
diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index c751966..7e9a987 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -2,6 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExportBuildFileGenerator.h"
+#include <map>
+#include <memory>
+#include <set>
+#include <sstream>
+#include <utility>
+
#include "cmExportSet.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
@@ -16,12 +22,6 @@
#include "cmTargetExport.h"
#include "cmake.h"
-#include <map>
-#include <memory>
-#include <set>
-#include <sstream>
-#include <utility>
-
class cmSourceFile;
cmExportBuildFileGenerator::cmExportBuildFileGenerator()
diff --git a/Source/cmExportBuildFileGenerator.h b/Source/cmExportBuildFileGenerator.h
index e5b6597..11fbd02 100644
--- a/Source/cmExportBuildFileGenerator.h
+++ b/Source/cmExportBuildFileGenerator.h
@@ -5,15 +5,15 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmAlgorithms.h"
-#include "cmExportFileGenerator.h"
-#include "cmStateTypes.h"
-
#include <iosfwd>
#include <string>
#include <utility>
#include <vector>
+#include "cmAlgorithms.h"
+#include "cmExportFileGenerator.h"
+#include "cmStateTypes.h"
+
class cmExportSet;
class cmGeneratorTarget;
class cmGlobalGenerator;
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx
index 79af6e9..2a6bf5d 100644
--- a/Source/cmExportCommand.cxx
+++ b/Source/cmExportCommand.cxx
@@ -2,13 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExportCommand.h"
-#include "cm_static_string_view.hxx"
-#include "cmsys/RegularExpression.hxx"
-
#include <map>
#include <sstream>
#include <utility>
+#include "cmsys/RegularExpression.hxx"
+
+#include "cm_static_string_view.hxx"
+
#include "cmAlgorithms.h"
#include "cmArgumentParser.h"
#include "cmExecutionStatus.h"
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index e142560..b968537 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -2,6 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExportFileGenerator.h"
+#include <cassert>
+#include <cstring>
+#include <sstream>
+#include <utility>
+
+#include <cm/memory>
+
+#include "cmsys/FStream.hxx"
+
#include "cmComputeLinkInformation.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
@@ -18,14 +27,6 @@
#include "cmTarget.h"
#include "cmTargetExport.h"
-#include "cmsys/FStream.hxx"
-#include <cassert>
-#include <cstring>
-#include <sstream>
-#include <utility>
-
-#include <cm/memory>
-
static std::string cmExportFileGeneratorEscape(std::string const& str)
{
// Escape a property value for writing into a .cmake file.
diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h
index 6fa86ab..b04a31e 100644
--- a/Source/cmExportFileGenerator.h
+++ b/Source/cmExportFileGenerator.h
@@ -5,17 +5,17 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmGeneratorExpression.h"
-#include "cmStateTypes.h"
-#include "cmVersion.h"
-#include "cmVersionConfig.h"
-
#include <iosfwd>
#include <map>
#include <set>
#include <string>
#include <vector>
+#include "cmGeneratorExpression.h"
+#include "cmStateTypes.h"
+#include "cmVersion.h"
+#include "cmVersionConfig.h"
+
class cmGeneratorTarget;
#define STRINGIFY_HELPER(X) #X
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index 1e843b6..6d29c99 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -2,6 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExportInstallFileGenerator.h"
+#include <memory>
+#include <sstream>
+#include <utility>
+
#include "cmExportSet.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorExpression.h"
@@ -18,10 +22,6 @@
#include "cmTarget.h"
#include "cmTargetExport.h"
-#include <memory>
-#include <sstream>
-#include <utility>
-
cmExportInstallFileGenerator::cmExportInstallFileGenerator(
cmInstallExportGenerator* iegen)
: IEGen(iegen)
diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h
index fcd1aca..5fa812c 100644
--- a/Source/cmExportInstallFileGenerator.h
+++ b/Source/cmExportInstallFileGenerator.h
@@ -5,9 +5,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmExportFileGenerator.h"
-#include "cmStateTypes.h"
-
#include <iosfwd>
#include <map>
#include <set>
@@ -15,6 +12,9 @@
#include <utility>
#include <vector>
+#include "cmExportFileGenerator.h"
+#include "cmStateTypes.h"
+
class cmGeneratorTarget;
class cmGlobalGenerator;
class cmInstallExportGenerator;
diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx
index fd2401e..89093e9 100644
--- a/Source/cmExportLibraryDependenciesCommand.cxx
+++ b/Source/cmExportLibraryDependenciesCommand.cxx
@@ -2,12 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExportLibraryDependenciesCommand.h"
-#include "cmsys/FStream.hxx"
#include <map>
#include <utility>
#include <cm/memory>
+#include "cmsys/FStream.hxx"
+
#include "cmExecutionStatus.h"
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx
index 4027d4b..fafa51b 100644
--- a/Source/cmExportTryCompileFileGenerator.cxx
+++ b/Source/cmExportTryCompileFileGenerator.cxx
@@ -2,6 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExportTryCompileFileGenerator.h"
+#include <map>
+#include <memory>
+#include <utility>
+
#include "cmGeneratorExpression.h"
#include "cmGeneratorExpressionDAGChecker.h"
#include "cmGeneratorTarget.h"
@@ -12,10 +16,6 @@
#include "cmStringAlgorithms.h"
#include "cmTarget.h"
-#include <map>
-#include <memory>
-#include <utility>
-
cmExportTryCompileFileGenerator::cmExportTryCompileFileGenerator(
cmGlobalGenerator* gg, const std::vector<std::string>& targets,
cmMakefile* mf, std::set<std::string> const& langs)
diff --git a/Source/cmExportTryCompileFileGenerator.h b/Source/cmExportTryCompileFileGenerator.h
index 2a2ba7e..7573427 100644
--- a/Source/cmExportTryCompileFileGenerator.h
+++ b/Source/cmExportTryCompileFileGenerator.h
@@ -5,13 +5,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmExportFileGenerator.h"
-
#include <iosfwd>
#include <set>
#include <string>
#include <vector>
+#include "cmExportFileGenerator.h"
+
class cmGeneratorTarget;
class cmGlobalGenerator;
class cmMakefile;
diff --git a/Source/cmExprParserHelper.cxx b/Source/cmExprParserHelper.cxx
index c01e959..56dfc6c 100644
--- a/Source/cmExprParserHelper.cxx
+++ b/Source/cmExprParserHelper.cxx
@@ -2,14 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExprParserHelper.h"
-#include "cmExprLexer.h"
-#include "cmStringAlgorithms.h"
-
#include <iostream>
#include <sstream>
#include <stdexcept>
#include <utility>
+#include "cmExprLexer.h"
+#include "cmStringAlgorithms.h"
+
int cmExpr_yyparse(yyscan_t yyscanner);
//
cmExprParserHelper::cmExprParserHelper()
diff --git a/Source/cmExprParserHelper.h b/Source/cmExprParserHelper.h
index 42c460a..eaf5dc7 100644
--- a/Source/cmExprParserHelper.h
+++ b/Source/cmExprParserHelper.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cm_kwiml.h"
-
#include <string>
#include <vector>
+#include "cm_kwiml.h"
+
class cmExprParserHelper
{
public:
diff --git a/Source/cmExternalMakefileProjectGenerator.cxx b/Source/cmExternalMakefileProjectGenerator.cxx
index 83a0ba6..5895d66 100644
--- a/Source/cmExternalMakefileProjectGenerator.cxx
+++ b/Source/cmExternalMakefileProjectGenerator.cxx
@@ -2,10 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExternalMakefileProjectGenerator.h"
-#include "cmStringAlgorithms.h"
-
#include <utility>
+#include "cmStringAlgorithms.h"
+
class cmMakefile;
void cmExternalMakefileProjectGenerator::EnableLanguage(
diff --git a/Source/cmExtraCodeBlocksGenerator.h b/Source/cmExtraCodeBlocksGenerator.h
index 173e284..d9f92bd 100644
--- a/Source/cmExtraCodeBlocksGenerator.h
+++ b/Source/cmExtraCodeBlocksGenerator.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmExternalMakefileProjectGenerator.h"
-
#include <string>
#include <vector>
+#include "cmExternalMakefileProjectGenerator.h"
+
class cmGeneratorTarget;
class cmLocalGenerator;
class cmMakefile;
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index e74ad0c..c7b7457 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -2,6 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExtraCodeLiteGenerator.h"
+#include <cstring>
+#include <map>
+#include <set>
+#include <sstream>
+#include <utility>
+
+#include "cmsys/SystemInformation.hxx"
+
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
@@ -14,13 +22,6 @@
#include "cmXMLWriter.h"
#include "cmake.h"
-#include "cmsys/SystemInformation.hxx"
-#include <cstring>
-#include <map>
-#include <set>
-#include <sstream>
-#include <utility>
-
cmExtraCodeLiteGenerator::cmExtraCodeLiteGenerator()
: ConfigName("NoConfig")
{
diff --git a/Source/cmExtraCodeLiteGenerator.h b/Source/cmExtraCodeLiteGenerator.h
index dea7ebc..0ce90b0 100644
--- a/Source/cmExtraCodeLiteGenerator.h
+++ b/Source/cmExtraCodeLiteGenerator.h
@@ -5,13 +5,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmExternalMakefileProjectGenerator.h"
-
#include <map>
#include <set>
#include <string>
#include <vector>
+#include "cmExternalMakefileProjectGenerator.h"
+
class cmLocalGenerator;
class cmMakefile;
class cmGeneratorTarget;
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index ca612b5..b286acf 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExtraEclipseCDT4Generator.h"
-#include "cmsys/RegularExpression.hxx"
#include <algorithm>
#include <cassert>
#include <cstdio>
@@ -10,6 +9,8 @@
#include <sstream>
#include <utility>
+#include "cmsys/RegularExpression.hxx"
+
#include "cmGeneratedFileStream.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h
index ef038d9..ff4c59e 100644
--- a/Source/cmExtraEclipseCDT4Generator.h
+++ b/Source/cmExtraEclipseCDT4Generator.h
@@ -5,13 +5,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmExternalMakefileProjectGenerator.h"
-
#include <iosfwd>
#include <set>
#include <string>
#include <vector>
+#include "cmExternalMakefileProjectGenerator.h"
+
class cmLocalGenerator;
class cmMakefile;
class cmSourceGroup;
diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx
index b3d869e..e8c9dd0 100644
--- a/Source/cmExtraKateGenerator.cxx
+++ b/Source/cmExtraKateGenerator.cxx
@@ -2,6 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExtraKateGenerator.h"
+#include <cstring>
+#include <ostream>
+#include <set>
+#include <vector>
+
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
@@ -12,11 +17,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <cstring>
-#include <ostream>
-#include <set>
-#include <vector>
-
cmExtraKateGenerator::cmExtraKateGenerator() = default;
cmExternalMakefileProjectGeneratorFactory* cmExtraKateGenerator::GetFactory()
diff --git a/Source/cmExtraKateGenerator.h b/Source/cmExtraKateGenerator.h
index a4355f0..be1376a 100644
--- a/Source/cmExtraKateGenerator.h
+++ b/Source/cmExtraKateGenerator.h
@@ -5,10 +5,10 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmExternalMakefileProjectGenerator.h"
-
#include <string>
+#include "cmExternalMakefileProjectGenerator.h"
+
class cmGeneratedFileStream;
class cmLocalGenerator;
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index f041821..495324c 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -2,12 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExtraSublimeTextGenerator.h"
-#include "cmsys/RegularExpression.hxx"
#include <cstring>
#include <set>
#include <sstream>
#include <utility>
+#include "cmsys/RegularExpression.hxx"
+
#include "cmGeneratedFileStream.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
diff --git a/Source/cmExtraSublimeTextGenerator.h b/Source/cmExtraSublimeTextGenerator.h
index d9ef1d1..7e8f2d4 100644
--- a/Source/cmExtraSublimeTextGenerator.h
+++ b/Source/cmExtraSublimeTextGenerator.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmExternalMakefileProjectGenerator.h"
-
#include <map>
#include <string>
#include <vector>
+#include "cmExternalMakefileProjectGenerator.h"
+
class cmGeneratedFileStream;
class cmGeneratorTarget;
class cmLocalGenerator;
diff --git a/Source/cmFileAPI.cxx b/Source/cmFileAPI.cxx
index 8161191..a56ad22 100644
--- a/Source/cmFileAPI.cxx
+++ b/Source/cmFileAPI.cxx
@@ -2,6 +2,18 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFileAPI.h"
+#include <algorithm>
+#include <cassert>
+#include <chrono>
+#include <cstddef>
+#include <ctime>
+#include <iomanip>
+#include <sstream>
+#include <utility>
+
+#include "cmsys/Directory.hxx"
+#include "cmsys/FStream.hxx"
+
#include "cmCryptoHash.h"
#include "cmFileAPICMakeFiles.h"
#include "cmFileAPICache.h"
@@ -11,17 +23,6 @@
#include "cmSystemTools.h"
#include "cmTimestamp.h"
#include "cmake.h"
-#include "cmsys/Directory.hxx"
-#include "cmsys/FStream.hxx"
-
-#include <algorithm>
-#include <cassert>
-#include <chrono>
-#include <cstddef>
-#include <ctime>
-#include <iomanip>
-#include <sstream>
-#include <utility>
cmFileAPI::cmFileAPI(cmake* cm)
: CMakeInstance(cm)
diff --git a/Source/cmFileAPI.h b/Source/cmFileAPI.h
index aa5a42f..e183e0d 100644
--- a/Source/cmFileAPI.h
+++ b/Source/cmFileAPI.h
@@ -5,16 +5,16 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cm_jsoncpp_reader.h"
-#include "cm_jsoncpp_value.h"
-#include "cm_jsoncpp_writer.h"
-
#include <map>
#include <memory>
#include <string>
#include <unordered_set>
#include <vector>
+#include "cm_jsoncpp_reader.h"
+#include "cm_jsoncpp_value.h"
+#include "cm_jsoncpp_writer.h"
+
class cmake;
class cmFileAPI
diff --git a/Source/cmFileAPICMakeFiles.cxx b/Source/cmFileAPICMakeFiles.cxx
index 5590bc2..f419997 100644
--- a/Source/cmFileAPICMakeFiles.cxx
+++ b/Source/cmFileAPICMakeFiles.cxx
@@ -2,6 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFileAPICMakeFiles.h"
+#include <string>
+#include <vector>
+
+#include "cm_jsoncpp_value.h"
+
#include "cmFileAPI.h"
#include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h"
@@ -9,11 +14,6 @@
#include "cmSystemTools.h"
#include "cmake.h"
-#include "cm_jsoncpp_value.h"
-
-#include <string>
-#include <vector>
-
namespace {
class CMakeFiles
diff --git a/Source/cmFileAPICache.cxx b/Source/cmFileAPICache.cxx
index f96bc90..ef77795 100644
--- a/Source/cmFileAPICache.cxx
+++ b/Source/cmFileAPICache.cxx
@@ -2,17 +2,17 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFileAPICache.h"
-#include "cmFileAPI.h"
-#include "cmState.h"
-#include "cmake.h"
-
-#include "cm_jsoncpp_value.h"
-
#include <algorithm>
#include <string>
#include <utility>
#include <vector>
+#include "cm_jsoncpp_value.h"
+
+#include "cmFileAPI.h"
+#include "cmState.h"
+#include "cmake.h"
+
namespace {
class Cache
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx
index fbdb975..eb50813 100644
--- a/Source/cmFileAPICodemodel.cxx
+++ b/Source/cmFileAPICodemodel.cxx
@@ -2,6 +2,21 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFileAPICodemodel.h"
+#include <algorithm>
+#include <cassert>
+#include <cstddef>
+#include <functional>
+#include <limits>
+#include <map>
+#include <memory>
+#include <set>
+#include <string>
+#include <unordered_map>
+#include <utility>
+#include <vector>
+
+#include "cm_jsoncpp_value.h"
+
#include "cmAlgorithms.h"
#include "cmCryptoHash.h"
#include "cmFileAPI.h"
@@ -27,21 +42,6 @@
#include "cmTargetDepend.h"
#include "cmake.h"
-#include "cm_jsoncpp_value.h"
-
-#include <algorithm>
-#include <cassert>
-#include <cstddef>
-#include <functional>
-#include <limits>
-#include <map>
-#include <memory>
-#include <set>
-#include <string>
-#include <unordered_map>
-#include <utility>
-#include <vector>
-
namespace {
class Codemodel
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index c7a0e55..d55b959 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2,12 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFileCommand.h"
-#include "cm_kwiml.h"
-#include "cm_static_string_view.hxx"
-#include "cmsys/FStream.hxx"
-#include "cmsys/Glob.hxx"
-#include "cmsys/RegularExpression.hxx"
-
#include <algorithm>
#include <cassert>
#include <cctype>
@@ -22,6 +16,12 @@
#include <cm/memory>
+#include "cmsys/FStream.hxx"
+#include "cmsys/Glob.hxx"
+#include "cmsys/RegularExpression.hxx"
+
+#include "cm_kwiml.h"
+#include "cm_static_string_view.hxx"
#include "cm_sys_stat.h"
#include "cmAlgorithms.h"
@@ -49,9 +49,10 @@
#include "cmake.h"
#if !defined(CMAKE_BOOTSTRAP)
+# include "cm_curl.h"
+
# include "cmCurl.h"
# include "cmFileLockResult.h"
-# include "cm_curl.h"
#endif
#if defined(CMAKE_USE_ELF_PARSER)
diff --git a/Source/cmFileCopier.cxx b/Source/cmFileCopier.cxx
index 5b9c85a..627e05b 100644
--- a/Source/cmFileCopier.cxx
+++ b/Source/cmFileCopier.cxx
@@ -3,14 +3,15 @@
#include "cmFileCopier.h"
+#include "cmsys/Directory.hxx"
+#include "cmsys/Glob.hxx"
+
#include "cmExecutionStatus.h"
#include "cmFSPermissions.h"
#include "cmFileTimes.h"
#include "cmMakefile.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include "cmsys/Directory.hxx"
-#include "cmsys/Glob.hxx"
#ifdef _WIN32
# include "cmsys/FStream.hxx"
diff --git a/Source/cmFileCopier.h b/Source/cmFileCopier.h
index 8fc481c..612a57f 100644
--- a/Source/cmFileCopier.h
+++ b/Source/cmFileCopier.h
@@ -5,13 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmFileTimeCache.h"
+#include <string>
+#include <vector>
+
#include "cmsys/RegularExpression.hxx"
#include "cm_sys_stat.h"
-#include <string>
-#include <vector>
+#include "cmFileTimeCache.h"
class cmExecutionStatus;
class cmMakefile;
diff --git a/Source/cmFileInstaller.cxx b/Source/cmFileInstaller.cxx
index a773738..c89be96 100644
--- a/Source/cmFileInstaller.cxx
+++ b/Source/cmFileInstaller.cxx
@@ -3,16 +3,16 @@
#include "cmFileInstaller.h"
+#include <sstream>
+
+#include "cm_sys_stat.h"
+
#include "cmExecutionStatus.h"
#include "cmFSPermissions.h"
#include "cmMakefile.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include "cm_sys_stat.h"
-
-#include <sstream>
-
using namespace cmFSPermissions;
cmFileInstaller::cmFileInstaller(cmExecutionStatus& status)
diff --git a/Source/cmFileInstaller.h b/Source/cmFileInstaller.h
index fd883ea..537cd53 100644
--- a/Source/cmFileInstaller.h
+++ b/Source/cmFileInstaller.h
@@ -5,13 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmFileCopier.h"
-
-#include "cmInstallType.h"
-
#include <string>
#include <vector>
+#include "cmFileCopier.h"
+#include "cmInstallType.h"
+
class cmExecutionStatus;
struct cmFileInstaller : public cmFileCopier
diff --git a/Source/cmFileLock.cxx b/Source/cmFileLock.cxx
index d380798..e90f571 100644
--- a/Source/cmFileLock.cxx
+++ b/Source/cmFileLock.cxx
@@ -2,9 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFileLock.h"
-#include "cmFileLockResult.h"
#include <cassert>
+#include "cmFileLockResult.h"
+
// Common implementation
cmFileLock::~cmFileLock()
diff --git a/Source/cmFileLockUnix.cxx b/Source/cmFileLockUnix.cxx
index 7393823..1456ea8 100644
--- a/Source/cmFileLockUnix.cxx
+++ b/Source/cmFileLockUnix.cxx
@@ -1,13 +1,14 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#include "cmFileLock.h"
-
-#include "cmSystemTools.h"
#include <cerrno> // errno
#include <cstdio> // SEEK_SET
+
#include <fcntl.h>
#include <unistd.h>
+#include "cmFileLock.h"
+#include "cmSystemTools.h"
+
cmFileLock::cmFileLock() = default;
cmFileLockResult cmFileLock::Release()
diff --git a/Source/cmFileLockWin32.cxx b/Source/cmFileLockWin32.cxx
index a61d360..b8e435a 100644
--- a/Source/cmFileLockWin32.cxx
+++ b/Source/cmFileLockWin32.cxx
@@ -1,9 +1,9 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#include "cmFileLock.h"
+#include <windows.h> // CreateFileW
+#include "cmFileLock.h"
#include "cmSystemTools.h"
-#include <windows.h> // CreateFileW
cmFileLock::cmFileLock()
{
diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx
index 7fcced2..ac8a37e 100644
--- a/Source/cmFileMonitor.cxx
+++ b/Source/cmFileMonitor.cxx
@@ -2,14 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFileMonitor.h"
-#include "cmAlgorithms.h"
-#include "cmsys/SystemTools.hxx"
-
#include <cassert>
#include <cstddef>
#include <unordered_map>
#include <utility>
+#include "cmsys/SystemTools.hxx"
+
+#include "cmAlgorithms.h"
+
namespace {
void on_directory_change(uv_fs_event_t* handle, const char* filename,
int events, int status);
diff --git a/Source/cmFilePathChecksum.cxx b/Source/cmFilePathChecksum.cxx
index 47a223a..bb3f610 100644
--- a/Source/cmFilePathChecksum.cxx
+++ b/Source/cmFilePathChecksum.cxx
@@ -2,13 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFilePathChecksum.h"
+#include <vector>
+
#include "cmBase32.h"
#include "cmCryptoHash.h"
#include "cmMakefile.h"
#include "cmSystemTools.h"
-#include <vector>
-
cmFilePathChecksum::cmFilePathChecksum() = default;
cmFilePathChecksum::cmFilePathChecksum(std::string const& currentSrcDir,
diff --git a/Source/cmFileTime.cxx b/Source/cmFileTime.cxx
index f92c0ff..96c70fe 100644
--- a/Source/cmFileTime.cxx
+++ b/Source/cmFileTime.cxx
@@ -9,8 +9,9 @@
#if !defined(_WIN32) || defined(__CYGWIN__)
# include "cm_sys_stat.h"
#else
-# include "cmsys/Encoding.hxx"
# include <windows.h>
+
+# include "cmsys/Encoding.hxx"
#endif
bool cmFileTime::Load(std::string const& fileName)
diff --git a/Source/cmFileTimeCache.h b/Source/cmFileTimeCache.h
index 4f1a3a2..83b77b6 100644
--- a/Source/cmFileTimeCache.h
+++ b/Source/cmFileTimeCache.h
@@ -5,10 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmFileTime.h" // IWYU pragma: keep
#include <string>
#include <unordered_map>
+#include "cmFileTime.h" // IWYU pragma: keep
+
/** \class cmFileTimeCache
* \brief Caches file modification times in an internal map for fast lookups.
*/
diff --git a/Source/cmFileTimes.cxx b/Source/cmFileTimes.cxx
index 54ac4ed..d8fe24c 100644
--- a/Source/cmFileTimes.cxx
+++ b/Source/cmFileTimes.cxx
@@ -9,8 +9,9 @@
#include "cm_sys_stat.h"
#if defined(_WIN32)
-# include "cmSystemTools.h"
# include <windows.h>
+
+# include "cmSystemTools.h"
#else
# include <utime.h>
#endif
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index 011e8aa..20221b1 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -2,13 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFindLibraryCommand.h"
-#include "cmsys/RegularExpression.hxx"
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <set>
#include <utility>
+#include "cmsys/RegularExpression.hxx"
+
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 17e9869..ea936cf 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -2,12 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFindPackageCommand.h"
-#include "cmSystemTools.h"
-#include "cmsys/Directory.hxx"
-#include "cmsys/FStream.hxx"
-#include "cmsys/Glob.hxx"
-#include "cmsys/RegularExpression.hxx"
-#include "cmsys/String.h"
#include <algorithm>
#include <cassert>
#include <cstdio>
@@ -20,6 +14,12 @@
#include <cm/memory>
+#include "cmsys/Directory.hxx"
+#include "cmsys/FStream.hxx"
+#include "cmsys/Glob.hxx"
+#include "cmsys/RegularExpression.hxx"
+#include "cmsys/String.h"
+
#include "cmAlgorithms.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
@@ -29,6 +29,7 @@
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
#include "cmVersion.h"
#if defined(__HAIKU__)
diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h
index 78b4985..85fe7b6 100644
--- a/Source/cmFindPackageCommand.h
+++ b/Source/cmFindPackageCommand.h
@@ -5,7 +5,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cm_kwiml.h"
#include <cstddef>
#include <functional>
#include <map>
@@ -13,6 +12,8 @@
#include <string>
#include <vector>
+#include "cm_kwiml.h"
+
#include "cmFindCommon.h"
#include "cmPolicies.h"
diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx
index b983b4d..054a2a9 100644
--- a/Source/cmFortranParserImpl.cxx
+++ b/Source/cmFortranParserImpl.cxx
@@ -1,10 +1,5 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#include "cmFortranParser.h"
-
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-
#include <cassert>
#include <cstdio>
#include <set>
@@ -13,6 +8,10 @@
#include <utility>
#include <vector>
+#include "cmFortranParser.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+
bool cmFortranParser_s::FindIncludeFile(const char* dir,
const char* includeName,
std::string& fileName)
diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h
index 3d94cdc..a9088ac 100644
--- a/Source/cmGeneratedFileStream.h
+++ b/Source/cmGeneratedFileStream.h
@@ -5,10 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cm_codecvt.hxx"
-#include "cmsys/FStream.hxx"
#include <string>
+#include "cmsys/FStream.hxx"
+
+#include "cm_codecvt.hxx"
+
// This is the first base class of cmGeneratedFileStream. It will be
// created before and destroyed after the ofstream portion and can
// therefore be used to manage the temporary file.
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 1f31069..b7f7d1d 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -2,10 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGeneratorExpression.h"
-#include "cmsys/RegularExpression.hxx"
+#include <cassert>
#include <memory>
#include <utility>
+#include "cmsys/RegularExpression.hxx"
+
#include "cmAlgorithms.h"
#include "cmGeneratorExpressionContext.h"
#include "cmGeneratorExpressionDAGChecker.h"
@@ -14,7 +16,6 @@
#include "cmGeneratorExpressionParser.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <cassert>
cmGeneratorExpression::cmGeneratorExpression(cmListFileBacktrace backtrace)
: Backtrace(std::move(backtrace))
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h
index de5c705..4bd1c9f 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -5,8 +5,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmListFileCache.h"
-
#include <map>
#include <memory>
#include <set>
@@ -14,6 +12,8 @@
#include <utility>
#include <vector>
+#include "cmListFileCache.h"
+
class cmCompiledGeneratorExpression;
class cmGeneratorTarget;
class cmLocalGenerator;
diff --git a/Source/cmGeneratorExpressionContext.h b/Source/cmGeneratorExpressionContext.h
index 6e076bf..4709fa0 100644
--- a/Source/cmGeneratorExpressionContext.h
+++ b/Source/cmGeneratorExpressionContext.h
@@ -3,12 +3,12 @@
#ifndef cmGeneratorExpressionContext_h
#define cmGeneratorExpressionContext_h
-#include "cmListFileCache.h"
-
#include <map>
#include <set>
#include <string>
+#include "cmListFileCache.h"
+
class cmGeneratorTarget;
class cmLocalGenerator;
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx
index 76f2905..643ba34 100644
--- a/Source/cmGeneratorExpressionDAGChecker.cxx
+++ b/Source/cmGeneratorExpressionDAGChecker.cxx
@@ -2,6 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGeneratorExpressionDAGChecker.h"
+#include <cstring>
+#include <sstream>
+#include <utility>
+
#include "cmGeneratorExpressionContext.h"
#include "cmGeneratorExpressionEvaluator.h"
#include "cmGeneratorTarget.h"
@@ -10,10 +14,6 @@
#include "cmStringAlgorithms.h"
#include "cmake.h"
-#include <cstring>
-#include <sstream>
-#include <utility>
-
cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker(
cmListFileBacktrace backtrace, cmGeneratorTarget const* target,
std::string property, const GeneratorExpressionContent* content,
diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h
index b72a40f..f2c49bb 100644
--- a/Source/cmGeneratorExpressionDAGChecker.h
+++ b/Source/cmGeneratorExpressionDAGChecker.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmListFileCache.h"
-
#include <map>
#include <set>
#include <string>
+#include "cmListFileCache.h"
+
struct GeneratorExpressionContent;
struct cmGeneratorExpressionContext;
class cmGeneratorTarget;
diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx
index aa2c1a6..9e8707d 100644
--- a/Source/cmGeneratorExpressionEvaluationFile.cxx
+++ b/Source/cmGeneratorExpressionEvaluationFile.cxx
@@ -2,11 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGeneratorExpressionEvaluationFile.h"
-#include "cmsys/FStream.hxx"
#include <memory>
#include <sstream>
#include <utility>
+#include "cmsys/FStream.hxx"
+
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
#include "cmListFileCache.h"
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index c1343b2..e0ae170 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -2,13 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGeneratorExpressionEvaluator.h"
+#include <algorithm>
+#include <sstream>
+
#include "cmAlgorithms.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/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 5a35007..66f1c71 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -2,6 +2,24 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGeneratorExpressionNode.h"
+#include <algorithm>
+#include <cassert>
+#include <cerrno>
+#include <cstdlib>
+#include <cstring>
+#include <map>
+#include <memory>
+#include <set>
+#include <sstream>
+#include <utility>
+
+#include <cm/iterator>
+
+#include "cmsys/RegularExpression.hxx"
+#include "cmsys/String.h"
+
+#include "cm_static_string_view.hxx"
+
#include "cmAlgorithms.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorExpressionContext.h"
@@ -23,25 +41,8 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
-#include "cm_static_string_view.hxx"
#include "cmake.h"
-#include "cmsys/RegularExpression.hxx"
-#include "cmsys/String.h"
-
-#include <cm/iterator>
-
-#include <algorithm>
-#include <cassert>
-#include <cerrno>
-#include <cstdlib>
-#include <cstring>
-#include <map>
-#include <memory>
-#include <set>
-#include <sstream>
-#include <utility>
-
std::string cmGeneratorExpressionNode::EvaluateDependentExpression(
std::string const& prop, cmLocalGenerator* lg,
cmGeneratorExpressionContext* context, cmGeneratorTarget const* headTarget,
diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx
index a0b685e..d6cc6ab 100644
--- a/Source/cmGeneratorExpressionParser.cxx
+++ b/Source/cmGeneratorExpressionParser.cxx
@@ -2,13 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGeneratorExpressionParser.h"
-#include "cmAlgorithms.h"
-#include "cmGeneratorExpressionEvaluator.h"
-
#include <cassert>
#include <cstddef>
#include <utility>
+#include "cmAlgorithms.h"
+#include "cmGeneratorExpressionEvaluator.h"
+
cmGeneratorExpressionParser::cmGeneratorExpressionParser(
std::vector<cmGeneratorExpressionToken> tokens)
: Tokens(std::move(tokens))
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 07578cc..3a48ff6 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGeneratorTarget.h"
-#include "cmsys/RegularExpression.hxx"
#include <algorithm>
#include <cassert>
#include <cerrno>
@@ -12,13 +11,16 @@
#include <cstring>
#include <iterator>
#include <memory>
-#include <queue>
#include <sstream>
#include <unordered_set>
#include <utility>
#include <cm/string_view>
+#include <queue>
+
+#include "cmsys/RegularExpression.hxx"
+
#include "cmAlgorithms.h"
#include "cmComputeLinkInformation.h"
#include "cmCustomCommand.h"
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 6c36c4b..27ad6eb 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -5,11 +5,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmLinkItem.h"
-#include "cmListFileCache.h"
-#include "cmPolicies.h"
-#include "cmStateTypes.h"
-
#include <cstddef>
#include <map>
#include <set>
@@ -18,6 +13,11 @@
#include <utility>
#include <vector>
+#include "cmLinkItem.h"
+#include "cmListFileCache.h"
+#include "cmPolicies.h"
+#include "cmStateTypes.h"
+
class cmComputeLinkInformation;
class cmCustomCommand;
class cmGlobalGenerator;
diff --git a/Source/cmGetPipes.cxx b/Source/cmGetPipes.cxx
index 79f90fd..4eda1c5 100644
--- a/Source/cmGetPipes.cxx
+++ b/Source/cmGetPipes.cxx
@@ -2,10 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGetPipes.h"
-#include "cm_uv.h"
-
#include <fcntl.h>
+#include "cm_uv.h"
+
#if defined(_WIN32) && !defined(__CYGWIN__)
# include <io.h>
@@ -29,6 +29,7 @@ int cmGetPipes(int* fds)
}
#else
# include <cerrno>
+
# include <unistd.h>
int cmGetPipes(int* fds)
diff --git a/Source/cmGhsMultiGpj.h b/Source/cmGhsMultiGpj.h
index e588150..fbbef5d 100644
--- a/Source/cmGhsMultiGpj.h
+++ b/Source/cmGhsMultiGpj.h
@@ -4,6 +4,7 @@
#define cmGhsMultiGpj_h
#include "cmConfigure.h" // IWYU pragma: keep
+
#include <iosfwd>
class GhsMultiGpj
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 09ed76d..8e4352e 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -2,6 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGhsMultiTargetGenerator.h"
+#include <algorithm>
+#include <memory>
+#include <ostream>
+#include <set>
+#include <utility>
+#include <vector>
+
#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
#include "cmGeneratedFileStream.h"
@@ -22,13 +29,6 @@
#include "cmSystemTools.h"
#include "cmTarget.h"
-#include <algorithm>
-#include <memory>
-#include <ostream>
-#include <set>
-#include <utility>
-#include <vector>
-
cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmGeneratorTarget* target)
: GeneratorTarget(target)
, LocalGenerator(
diff --git a/Source/cmGhsMultiTargetGenerator.h b/Source/cmGhsMultiTargetGenerator.h
index a131567..f03ca44 100644
--- a/Source/cmGhsMultiTargetGenerator.h
+++ b/Source/cmGhsMultiTargetGenerator.h
@@ -3,14 +3,14 @@
#ifndef cmGhsMultiTargetGenerator_h
#define cmGhsMultiTargetGenerator_h
-#include "cmGhsMultiGpj.h"
-
#include <iosfwd>
#include <map>
#include <set>
#include <string>
#include <vector>
+#include "cmGhsMultiGpj.h"
+
class cmCustomCommand;
class cmCustomCommandGenerator;
class cmGeneratorTarget;
diff --git a/Source/cmGlobVerificationManager.cxx b/Source/cmGlobVerificationManager.cxx
index 72451b2..4817773 100644
--- a/Source/cmGlobVerificationManager.cxx
+++ b/Source/cmGlobVerificationManager.cxx
@@ -2,9 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGlobVerificationManager.h"
-#include "cmsys/FStream.hxx"
#include <sstream>
+#include "cmsys/FStream.hxx"
+
#include "cmGeneratedFileStream.h"
#include "cmListFileCache.h"
#include "cmStringAlgorithms.h"
diff --git a/Source/cmGlobVerificationManager.h b/Source/cmGlobVerificationManager.h
index e03d939..2e7e1ca 100644
--- a/Source/cmGlobVerificationManager.h
+++ b/Source/cmGlobVerificationManager.h
@@ -5,14 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmListFileCache.h"
-
#include <iosfwd>
#include <map>
#include <string>
#include <utility>
#include <vector>
+#include "cmListFileCache.h"
+
/** \class cmGlobVerificationManager
* \brief Class for expressing build-time dependencies on glob expressions.
*
diff --git a/Source/cmGlobalBorlandMakefileGenerator.h b/Source/cmGlobalBorlandMakefileGenerator.h
index ee7de70..da04743 100644
--- a/Source/cmGlobalBorlandMakefileGenerator.h
+++ b/Source/cmGlobalBorlandMakefileGenerator.h
@@ -3,10 +3,10 @@
#ifndef cmGlobalBorlandMakefileGenerator_h
#define cmGlobalBorlandMakefileGenerator_h
-#include "cmGlobalNMakeMakefileGenerator.h"
-
#include <iosfwd>
+#include "cmGlobalNMakeMakefileGenerator.h"
+
/** \class cmGlobalBorlandMakefileGenerator
* \brief Write a Borland makefiles.
*
diff --git a/Source/cmGlobalCommonGenerator.cxx b/Source/cmGlobalCommonGenerator.cxx
index 93ff00b..9fa4467 100644
--- a/Source/cmGlobalCommonGenerator.cxx
+++ b/Source/cmGlobalCommonGenerator.cxx
@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGlobalCommonGenerator.h"
+#include <utility>
+
#include "cmGeneratorTarget.h"
#include "cmLocalGenerator.h"
#include "cmStateDirectory.h"
@@ -9,8 +11,6 @@
#include "cmStateTypes.h"
#include "cmStringAlgorithms.h"
-#include <utility>
-
class cmake;
cmGlobalCommonGenerator::cmGlobalCommonGenerator(cmake* cm)
diff --git a/Source/cmGlobalCommonGenerator.h b/Source/cmGlobalCommonGenerator.h
index de81da7..7d16dac 100644
--- a/Source/cmGlobalCommonGenerator.h
+++ b/Source/cmGlobalCommonGenerator.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmGlobalGenerator.h"
-
#include <map>
#include <string>
#include <vector>
+#include "cmGlobalGenerator.h"
+
class cmake;
class cmGeneratorTarget;
class cmLocalGenerator;
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index a75e2ed..d53165c 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2,8 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGlobalGenerator.h"
-#include "cmsys/Directory.hxx"
-#include "cmsys/FStream.hxx"
#include <algorithm>
#include <cassert>
#include <cstdio>
@@ -13,6 +11,9 @@
#include <iterator>
#include <sstream>
+#include "cmsys/Directory.hxx"
+#include "cmsys/FStream.hxx"
+
#if defined(_WIN32) && !defined(__CYGWIN__)
# include <windows.h>
#endif
@@ -45,10 +46,11 @@
#include "cmake.h"
#if !defined(CMAKE_BOOTSTRAP)
-# include "cmCryptoHash.h"
-# include "cmQtAutoGenGlobalInitializer.h"
# include "cm_jsoncpp_value.h"
# include "cm_jsoncpp_writer.h"
+
+# include "cmCryptoHash.h"
+# include "cmQtAutoGenGlobalInitializer.h"
#endif
#if defined(_MSC_VER) && _MSC_VER >= 1800
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index cf9c951..28e4d21 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -14,6 +14,8 @@
#include <utility>
#include <vector>
+#include "cm_codecvt.hxx"
+
#include "cmAlgorithms.h"
#include "cmCustomCommandLines.h"
#include "cmDuration.h"
@@ -23,11 +25,11 @@
#include "cmSystemTools.h"
#include "cmTarget.h"
#include "cmTargetDepend.h"
-#include "cm_codecvt.hxx"
#if !defined(CMAKE_BOOTSTRAP)
-# include "cmFileLockPool.h"
# include "cm_jsoncpp_value.h"
+
+# include "cmFileLockPool.h"
#endif
#define CMAKE_DIRECTORY_ID_SEP "::@"
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index 236554f..5a708ab 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -2,6 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGlobalGhsMultiGenerator.h"
+#include <algorithm>
+#include <cstring>
+#include <map>
+#include <ostream>
+#include <utility>
+
#include "cmAlgorithms.h"
#include "cmDocumentationEntry.h"
#include "cmGeneratedFileStream.h"
@@ -17,12 +23,6 @@
#include "cmVersion.h"
#include "cmake.h"
-#include <algorithm>
-#include <cstring>
-#include <map>
-#include <ostream>
-#include <utility>
-
const char* cmGlobalGhsMultiGenerator::FILE_EXTENSION = ".gpj";
#ifdef __linux__
const char* cmGlobalGhsMultiGenerator::DEFAULT_BUILD_PROGRAM = "gbuild";
diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h
index e58e65e..ccfe073 100644
--- a/Source/cmGlobalGhsMultiGenerator.h
+++ b/Source/cmGlobalGhsMultiGenerator.h
@@ -3,17 +3,16 @@
#ifndef cmGhsMultiGenerator_h
#define cmGhsMultiGenerator_h
-#include "cmGlobalGenerator.h"
-
-#include "cmGlobalGeneratorFactory.h"
-#include "cmTargetDepend.h"
-
#include <iosfwd>
#include <set>
#include <string>
#include <utility>
#include <vector>
+#include "cmGlobalGenerator.h"
+#include "cmGlobalGeneratorFactory.h"
+#include "cmTargetDepend.h"
+
class cmGeneratorTarget;
class cmLocalGenerator;
class cmMakefile;
diff --git a/Source/cmGlobalJOMMakefileGenerator.h b/Source/cmGlobalJOMMakefileGenerator.h
index df3aec9..fc39ddf 100644
--- a/Source/cmGlobalJOMMakefileGenerator.h
+++ b/Source/cmGlobalJOMMakefileGenerator.h
@@ -3,10 +3,10 @@
#ifndef cmGlobalJOMMakefileGenerator_h
#define cmGlobalJOMMakefileGenerator_h
-#include "cmGlobalUnixMakefileGenerator3.h"
-
#include <iosfwd>
+#include "cmGlobalUnixMakefileGenerator3.h"
+
/** \class cmGlobalJOMMakefileGenerator
* \brief Write a JOM makefiles.
*
diff --git a/Source/cmGlobalNMakeMakefileGenerator.h b/Source/cmGlobalNMakeMakefileGenerator.h
index 2fdf1ce..4586b77 100644
--- a/Source/cmGlobalNMakeMakefileGenerator.h
+++ b/Source/cmGlobalNMakeMakefileGenerator.h
@@ -3,10 +3,10 @@
#ifndef cmGlobalNMakeMakefileGenerator_h
#define cmGlobalNMakeMakefileGenerator_h
-#include "cmGlobalUnixMakefileGenerator3.h"
-
#include <iosfwd>
+#include "cmGlobalUnixMakefileGenerator3.h"
+
/** \class cmGlobalNMakeMakefileGenerator
* \brief Write a NMake makefiles.
*
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index d8fe258..da21d6c 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -2,10 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGlobalNinjaGenerator.h"
-#include "cm_jsoncpp_reader.h"
-#include "cm_jsoncpp_value.h"
-#include "cm_jsoncpp_writer.h"
-#include "cmsys/FStream.hxx"
#include <algorithm>
#include <cctype>
#include <cstdio>
@@ -14,6 +10,12 @@
#include <cm/memory>
+#include "cmsys/FStream.hxx"
+
+#include "cm_jsoncpp_reader.h"
+#include "cm_jsoncpp_value.h"
+#include "cm_jsoncpp_writer.h"
+
#include "cmAlgorithms.h"
#include "cmDocumentationEntry.h"
#include "cmFortranParser.h"
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 1bfbffa..244e9fd 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -15,12 +15,13 @@
#include <utility>
#include <vector>
+#include "cm_codecvt.hxx"
+
#include "cmGeneratedFileStream.h"
#include "cmGlobalCommonGenerator.h"
#include "cmGlobalGeneratorFactory.h"
#include "cmNinjaTypes.h"
#include "cmPolicies.h"
-#include "cm_codecvt.hxx"
class cmCustomCommand;
class cmGeneratorTarget;
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 7d437f3..09a49e1 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -2,6 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGlobalVisualStudio10Generator.h"
+#include <algorithm>
+
+#include "cmsys/FStream.hxx"
+#include "cmsys/Glob.hxx"
+#include "cmsys/RegularExpression.hxx"
+
+#include "cm_jsoncpp_reader.h"
+
#include "cmAlgorithms.h"
#include "cmDocumentationEntry.h"
#include "cmGeneratorTarget.h"
@@ -13,15 +21,8 @@
#include "cmVisualStudioSlnData.h"
#include "cmVisualStudioSlnParser.h"
#include "cmXMLWriter.h"
-#include "cm_jsoncpp_reader.h"
#include "cmake.h"
-#include "cmsys/FStream.hxx"
-#include "cmsys/Glob.hxx"
-#include "cmsys/RegularExpression.hxx"
-
-#include <algorithm>
-
static const char vs10generatorName[] = "Visual Studio 10 2010";
static std::map<std::string, std::vector<cmIDEFlagTable>> loadedFlagJsonFiles;
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 0915189..40b214c 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -2,6 +2,16 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGlobalVisualStudio7Generator.h"
+#include <vector>
+
+#include <cm/string_view>
+
+#include <windows.h>
+
+#include <assert.h>
+
+#include "cmsys/Encoding.hxx"
+
#include "cmGeneratedFileStream.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
@@ -12,13 +22,6 @@
#include "cmStringAlgorithms.h"
#include "cmUuid.h"
#include "cmake.h"
-#include "cmsys/Encoding.hxx"
-
-#include <cm/string_view>
-
-#include <assert.h>
-#include <vector>
-#include <windows.h>
static cmVS7FlagTable cmVS7ExtraFlagTable[] = {
// Precompiled header and related options. Note that the
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 9b84732..7a9fcef 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -3,9 +3,8 @@
#ifndef cmGlobalVisualStudio7Generator_h
#define cmGlobalVisualStudio7Generator_h
-#include "cmGlobalVisualStudioGenerator.h"
-
#include "cmGlobalGeneratorFactory.h"
+#include "cmGlobalVisualStudioGenerator.h"
class cmTarget;
struct cmIDEFlagTable;
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 0f939cc..ed0cba7 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -3,14 +3,17 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGlobalVisualStudioGenerator.h"
-#include "cmsys/Encoding.hxx"
#include <future>
#include <iostream>
+
+#include <cm/iterator>
+
+#include <windows.h>
+
#include <objbase.h>
#include <shellapi.h>
-#include <windows.h>
-#include <cm/iterator>
+#include "cmsys/Encoding.hxx"
#include "cmCallVisualStudioMacro.h"
#include "cmCustomCommand.h"
diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx
index 8a27384..308ddda 100644
--- a/Source/cmGlobalWatcomWMakeGenerator.cxx
+++ b/Source/cmGlobalWatcomWMakeGenerator.cxx
@@ -2,14 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGlobalWatcomWMakeGenerator.h"
+#include <ostream>
+
#include "cmDocumentationEntry.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmake.h"
-#include <ostream>
-
cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator(cmake* cm)
: cmGlobalUnixMakefileGenerator3(cm)
{
diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h
index 3ca5e7d..64ace13 100644
--- a/Source/cmGlobalWatcomWMakeGenerator.h
+++ b/Source/cmGlobalWatcomWMakeGenerator.h
@@ -5,13 +5,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmGlobalGeneratorFactory.h"
-#include "cmGlobalUnixMakefileGenerator3.h"
-
#include <iosfwd>
#include <string>
#include <vector>
+#include "cmGlobalGeneratorFactory.h"
+#include "cmGlobalUnixMakefileGenerator3.h"
+
class cmMakefile;
class cmake;
struct cmDocumentationEntry;
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index f42218b..f23e28d 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGlobalXCodeGenerator.h"
-#include "cmsys/RegularExpression.hxx"
#include <cassert>
#include <cstdio>
#include <cstring>
@@ -11,6 +10,8 @@
#include <cm/memory>
+#include "cmsys/RegularExpression.hxx"
+
#include "cmAlgorithms.h"
#include "cmComputeLinkInformation.h"
#include "cmCustomCommand.h"
diff --git a/Source/cmGraphAdjacencyList.h b/Source/cmGraphAdjacencyList.h
index 5ca9269..5ed6af4 100644
--- a/Source/cmGraphAdjacencyList.h
+++ b/Source/cmGraphAdjacencyList.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmListFileCache.h"
-
#include <utility>
#include <vector>
+#include "cmListFileCache.h"
+
/**
* Graph edge representation. Most use cases just need the
* destination vertex, so we support conversion to/from an int. We
diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h
index 768683a..9c3051f 100644
--- a/Source/cmGraphVizWriter.h
+++ b/Source/cmGraphVizWriter.h
@@ -5,14 +5,15 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmStateTypes.h"
-
-#include "cmsys/RegularExpression.hxx"
#include <map>
#include <set>
#include <string>
#include <vector>
+#include "cmsys/RegularExpression.hxx"
+
+#include "cmStateTypes.h"
+
class cmGeneratedFileStream;
class cmGeneratorTarget;
class cmLocalGenerator;
diff --git a/Source/cmHexFileConverter.h b/Source/cmHexFileConverter.h
index cb5de8f..26f9ea8 100644
--- a/Source/cmHexFileConverter.h
+++ b/Source/cmHexFileConverter.h
@@ -4,6 +4,7 @@
#define cmHexFileConverter_h
#include "cmConfigure.h" // IWYU pragma: keep
+
#include <string>
/** \class cmHexFileConverter
diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx
index e80aa8e..71326d2 100644
--- a/Source/cmIDEOptions.cxx
+++ b/Source/cmIDEOptions.cxx
@@ -2,10 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmIDEOptions.h"
-#include "cmsys/String.h"
#include <iterator>
+
#include <string.h>
+#include "cmsys/String.h"
+
#include "cmAlgorithms.h"
#include "cmIDEFlagTable.h"
#include "cmStringAlgorithms.h"
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index b36d96b..290e064 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -2,6 +2,9 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmIfCommand.h"
+#include <string>
+#include <utility>
+
#include <cm/memory>
#include <cm/string_view>
@@ -19,9 +22,6 @@
#include "cmSystemTools.h"
#include "cmake.h"
-#include <string>
-#include <utility>
-
static std::string cmIfCommandError(
std::vector<cmExpandedCommandArgument> const& args)
{
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 27d0dfb..0c52cc5 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -2,14 +2,17 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmInstallCommand.h"
-#include "cm_static_string_view.hxx"
-#include "cmsys/Glob.hxx"
-#include <cm/memory>
#include <cstddef>
#include <set>
#include <sstream>
#include <utility>
+#include <cm/memory>
+
+#include "cmsys/Glob.hxx"
+
+#include "cm_static_string_view.hxx"
+
#include "cmArgumentParser.h"
#include "cmExecutionStatus.h"
#include "cmExportSet.h"
diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx
index 8b33782..31ba63f 100644
--- a/Source/cmInstallCommandArguments.cxx
+++ b/Source/cmInstallCommandArguments.cxx
@@ -2,11 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmInstallCommandArguments.h"
-#include "cmRange.h"
-#include "cmSystemTools.h"
+#include <utility>
+
#include "cm_static_string_view.hxx"
-#include <utility>
+#include "cmRange.h"
+#include "cmSystemTools.h"
// Table of valid permissions.
const char* cmInstallCommandArguments::PermissionsTable[] = {
diff --git a/Source/cmInstallDirectoryGenerator.h b/Source/cmInstallDirectoryGenerator.h
index e30849f..84c0694 100644
--- a/Source/cmInstallDirectoryGenerator.h
+++ b/Source/cmInstallDirectoryGenerator.h
@@ -3,15 +3,15 @@
#ifndef cmInstallDirectoryGenerator_h
#define cmInstallDirectoryGenerator_h
-#include "cmInstallGenerator.h"
-#include "cmScriptGenerator.h"
-
#include "cmConfigure.h" // IWYU pragma: keep
#include <iosfwd>
#include <string>
#include <vector>
+#include "cmInstallGenerator.h"
+#include "cmScriptGenerator.h"
+
class cmLocalGenerator;
/** \class cmInstallDirectoryGenerator
diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h
index 3b9268a..f44127e 100644
--- a/Source/cmInstallExportGenerator.h
+++ b/Source/cmInstallExportGenerator.h
@@ -5,14 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmInstallGenerator.h"
-#include "cmScriptGenerator.h"
-
#include <cstddef>
#include <iosfwd>
#include <string>
#include <vector>
+#include "cmInstallGenerator.h"
+#include "cmScriptGenerator.h"
+
class cmExportInstallFileGenerator;
class cmExportSet;
class cmLocalGenerator;
diff --git a/Source/cmInstallFilesGenerator.h b/Source/cmInstallFilesGenerator.h
index ac462d4..a680037 100644
--- a/Source/cmInstallFilesGenerator.h
+++ b/Source/cmInstallFilesGenerator.h
@@ -5,13 +5,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmInstallGenerator.h"
-#include "cmScriptGenerator.h"
-
#include <iosfwd>
#include <string>
#include <vector>
+#include "cmInstallGenerator.h"
+#include "cmScriptGenerator.h"
+
class cmLocalGenerator;
/** \class cmInstallFilesGenerator
diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx
index 2ffca30..ec17361 100644
--- a/Source/cmInstallGenerator.cxx
+++ b/Source/cmInstallGenerator.cxx
@@ -2,11 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmInstallGenerator.h"
+#include <ostream>
+
#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 dbe707d..024027d 100644
--- a/Source/cmInstallGenerator.h
+++ b/Source/cmInstallGenerator.h
@@ -5,13 +5,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmInstallType.h"
-#include "cmScriptGenerator.h"
-
#include <iosfwd>
#include <string>
#include <vector>
+#include "cmInstallType.h"
+#include "cmScriptGenerator.h"
+
class cmLocalGenerator;
class cmMakefile;
diff --git a/Source/cmInstallScriptGenerator.h b/Source/cmInstallScriptGenerator.h
index 6af7371..7efa321 100644
--- a/Source/cmInstallScriptGenerator.h
+++ b/Source/cmInstallScriptGenerator.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmInstallGenerator.h"
-#include "cmScriptGenerator.h"
-
#include <iosfwd>
#include <string>
+#include "cmInstallGenerator.h"
+#include "cmScriptGenerator.h"
+
class cmLocalGenerator;
/** \class cmInstallScriptGenerator
diff --git a/Source/cmInstallSubdirectoryGenerator.cxx b/Source/cmInstallSubdirectoryGenerator.cxx
index 1c0512c..8a0fefa 100644
--- a/Source/cmInstallSubdirectoryGenerator.cxx
+++ b/Source/cmInstallSubdirectoryGenerator.cxx
@@ -2,15 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmInstallSubdirectoryGenerator.h"
+#include <sstream>
+#include <vector>
+
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmPolicies.h"
#include "cmScriptGenerator.h"
#include "cmSystemTools.h"
-#include <sstream>
-#include <vector>
-
cmInstallSubdirectoryGenerator::cmInstallSubdirectoryGenerator(
cmMakefile* makefile, const char* binaryDirectory, bool excludeFromAll)
: cmInstallGenerator(nullptr, std::vector<std::string>(), nullptr,
diff --git a/Source/cmInstallSubdirectoryGenerator.h b/Source/cmInstallSubdirectoryGenerator.h
index 22759d9..b99bdd5 100644
--- a/Source/cmInstallSubdirectoryGenerator.h
+++ b/Source/cmInstallSubdirectoryGenerator.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmInstallGenerator.h"
-
#include <iosfwd>
#include <string>
+#include "cmInstallGenerator.h"
+
class cmLocalGenerator;
class cmMakefile;
diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h
index 3097bec..8730454 100644
--- a/Source/cmInstallTargetGenerator.h
+++ b/Source/cmInstallTargetGenerator.h
@@ -5,14 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmInstallGenerator.h"
-#include "cmListFileCache.h"
-#include "cmScriptGenerator.h"
-
#include <iosfwd>
#include <string>
#include <vector>
+#include "cmInstallGenerator.h"
+#include "cmListFileCache.h"
+#include "cmScriptGenerator.h"
+
class cmGeneratorTarget;
class cmLocalGenerator;
diff --git a/Source/cmInstalledFile.cxx b/Source/cmInstalledFile.cxx
index 7d98b90..eabe590 100644
--- a/Source/cmInstalledFile.cxx
+++ b/Source/cmInstalledFile.cxx
@@ -2,14 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmInstalledFile.h"
+#include <utility>
+
#include "cmAlgorithms.h"
#include "cmGeneratorExpression.h"
#include "cmListFileCache.h"
#include "cmMakefile.h"
#include "cmStringAlgorithms.h"
-#include <utility>
-
cmInstalledFile::cmInstalledFile() = default;
cmInstalledFile::~cmInstalledFile()
diff --git a/Source/cmJsonObjects.cxx b/Source/cmJsonObjects.cxx
index 79180cb..b23ab43 100644
--- a/Source/cmJsonObjects.cxx
+++ b/Source/cmJsonObjects.cxx
@@ -2,6 +2,18 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmJsonObjects.h" // IWYU pragma: keep
+#include <algorithm>
+#include <cassert>
+#include <cstddef>
+#include <functional>
+#include <limits>
+#include <map>
+#include <set>
+#include <string>
+#include <unordered_map>
+#include <utility>
+#include <vector>
+
#include "cmAlgorithms.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
@@ -26,18 +38,6 @@
#include "cmTest.h"
#include "cmake.h"
-#include <algorithm>
-#include <cassert>
-#include <cstddef>
-#include <functional>
-#include <limits>
-#include <map>
-#include <set>
-#include <string>
-#include <unordered_map>
-#include <utility>
-#include <vector>
-
namespace {
std::vector<std::string> getConfigurations(const cmake* cm)
diff --git a/Source/cmJsonObjects.h b/Source/cmJsonObjects.h
index cd4da94..64291cc 100644
--- a/Source/cmJsonObjects.h
+++ b/Source/cmJsonObjects.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cm_jsoncpp_value.h"
-
#include <string>
#include <vector>
+#include "cm_jsoncpp_value.h"
+
class cmake;
class cmGlobalGenerator;
diff --git a/Source/cmLDConfigLDConfigTool.cxx b/Source/cmLDConfigLDConfigTool.cxx
index b68dbbd..cce6178 100644
--- a/Source/cmLDConfigLDConfigTool.cxx
+++ b/Source/cmLDConfigLDConfigTool.cxx
@@ -2,18 +2,19 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmLDConfigLDConfigTool.h"
+
+#include <istream>
+#include <string>
+#include <vector>
+
+#include "cmsys/RegularExpression.hxx"
+
#include "cmMakefile.h"
#include "cmRuntimeDependencyArchive.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmUVProcessChain.h"
-#include "cmsys/RegularExpression.hxx"
-
-#include <istream>
-#include <string>
-#include <vector>
-
cmLDConfigLDConfigTool::cmLDConfigLDConfigTool(
cmRuntimeDependencyArchive* archive)
: cmLDConfigTool(archive)
diff --git a/Source/cmLDConfigLDConfigTool.h b/Source/cmLDConfigLDConfigTool.h
index d945a9b..34bf6c6 100644
--- a/Source/cmLDConfigLDConfigTool.h
+++ b/Source/cmLDConfigLDConfigTool.h
@@ -4,11 +4,11 @@
#ifndef cmLDConfigLDConfigTool_h
#define cmLDConfigLDConfigTool_h
-#include "cmLDConfigTool.h"
-
#include <string>
#include <vector>
+#include "cmLDConfigTool.h"
+
class cmRuntimeDependencyArchive;
class cmLDConfigLDConfigTool : public cmLDConfigTool
diff --git a/Source/cmLinkItem.cxx b/Source/cmLinkItem.cxx
index 9b03ad0..91eb183 100644
--- a/Source/cmLinkItem.cxx
+++ b/Source/cmLinkItem.cxx
@@ -2,10 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmLinkItem.h"
-#include "cmGeneratorTarget.h"
-
#include <utility> // IWYU pragma: keep
+#include "cmGeneratorTarget.h"
+
cmLinkItem::cmLinkItem() = default;
cmLinkItem::cmLinkItem(std::string n, cmListFileBacktrace bt)
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index 7bf35c3..5200a16 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmListCommand.h"
-#include "cmsys/RegularExpression.hxx"
#include <algorithm>
#include <cassert>
#include <cstddef>
@@ -18,6 +17,8 @@
#include <cm/memory>
+#include "cmsys/RegularExpression.hxx"
+
#include "cm_static_string_view.hxx"
#include "cmAlgorithms.h"
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index ab53df6..47679c9 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -2,6 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmListFileCache.h"
+#include <cassert>
+#include <memory>
+#include <sstream>
+#include <utility>
+
#include "cmListFileLexer.h"
#include "cmMessageType.h"
#include "cmMessenger.h"
@@ -10,11 +15,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <cassert>
-#include <memory>
-#include <sstream>
-#include <utility>
-
cmCommandContext::cmCommandName& cmCommandContext::cmCommandName::operator=(
std::string const& name)
{
diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx
index cca1633..1184bcb 100644
--- a/Source/cmLoadCacheCommand.cxx
+++ b/Source/cmLoadCacheCommand.cxx
@@ -2,9 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmLoadCacheCommand.h"
-#include "cmsys/FStream.hxx"
#include <set>
+#include "cmsys/FStream.hxx"
+
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
#include "cmStateTypes.h"
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx
index 1e02632..23ace64 100644
--- a/Source/cmLoadCommandCommand.cxx
+++ b/Source/cmLoadCommandCommand.cxx
@@ -3,16 +3,13 @@
#include "cmLoadCommandCommand.h"
#include <csignal>
-
#include <cstdio>
#include <cstdlib>
#include <cstring>
-
#include <utility>
#include <cm/memory>
-#include "cmCPluginAPI.cxx"
#include "cmCPluginAPI.h"
#include "cmCommand.h"
#include "cmDynamicLoader.h"
@@ -22,6 +19,8 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
+#include "cmCPluginAPI.cxx"
+
#ifdef __QNX__
# include <malloc.h> /* for malloc/free on QNX */
#endif
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 6e6ca51..154d509 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmLocalGenerator.h"
+#include "cmsys/RegularExpression.hxx"
+
#include "cmAlgorithms.h"
#include "cmComputeLinkInformation.h"
#include "cmCustomCommand.h"
@@ -32,15 +34,12 @@
#include "cmTestGenerator.h"
#include "cmVersion.h"
#include "cmake.h"
-#include "cmsys/RegularExpression.hxx"
#if !defined(CMAKE_BOOTSTRAP)
# define CM_LG_ENCODE_OBJECT_NAMES
# include "cmCryptoHash.h"
#endif
-#include <cm/string_view>
-
#include <algorithm>
#include <cassert>
#include <cstdio>
@@ -54,6 +53,8 @@
#include <utility>
#include <vector>
+#include <cm/string_view>
+
#if defined(__HAIKU__)
# include <FindDirectory.h>
# include <StorageDefs.h>
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 512df26..f150733 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -5,7 +5,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cm_kwiml.h"
#include <iosfwd>
#include <map>
#include <set>
@@ -13,6 +12,8 @@
#include <unordered_map>
#include <vector>
+#include "cm_kwiml.h"
+
#include "cmListFileCache.h"
#include "cmMessageType.h"
#include "cmOutputConverter.h"
diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx
index b00dda1..4b10798 100644
--- a/Source/cmLocalGhsMultiGenerator.cxx
+++ b/Source/cmLocalGhsMultiGenerator.cxx
@@ -2,6 +2,9 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmLocalGhsMultiGenerator.h"
+#include <algorithm>
+#include <utility>
+
#include "cmGeneratorTarget.h"
#include "cmGhsMultiTargetGenerator.h"
#include "cmGlobalGenerator.h"
@@ -10,9 +13,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <algorithm>
-#include <utility>
-
cmLocalGhsMultiGenerator::cmLocalGhsMultiGenerator(cmGlobalGenerator* gg,
cmMakefile* mf)
: cmLocalGenerator(gg, mf)
diff --git a/Source/cmLocalGhsMultiGenerator.h b/Source/cmLocalGhsMultiGenerator.h
index b6ccd08..2250e57 100644
--- a/Source/cmLocalGhsMultiGenerator.h
+++ b/Source/cmLocalGhsMultiGenerator.h
@@ -3,12 +3,12 @@
#ifndef cmLocalGhsMultiGenerator_h
#define cmLocalGhsMultiGenerator_h
-#include "cmLocalGenerator.h"
-
#include <map>
#include <string>
#include <vector>
+#include "cmLocalGenerator.h"
+
class cmGeneratorTarget;
class cmGlobalGenerator;
class cmMakefile;
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 187a847..134bbe1 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -10,6 +10,8 @@
#include <sstream>
#include <utility>
+#include "cmsys/FStream.hxx"
+
#include "cmCryptoHash.h"
#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
@@ -28,7 +30,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmake.h"
-#include "cmsys/FStream.hxx"
cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg,
cmMakefile* mf)
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index c50989e..4a70248 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -2,8 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmLocalUnixMakefileGenerator3.h"
-#include "cmsys/FStream.hxx"
-#include "cmsys/Terminal.h"
#include <algorithm>
#include <cstdio>
#include <sstream>
@@ -11,6 +9,9 @@
#include <cm/memory>
+#include "cmsys/FStream.hxx"
+#include "cmsys/Terminal.h"
+
#include "cmAlgorithms.h"
#include "cmCustomCommand.h" // IWYU pragma: keep
#include "cmCustomCommandGenerator.h"
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index f2295ef..f12ae8b 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -5,9 +5,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmDepends.h"
-#include "cmLocalCommonGenerator.h"
-
#include <iosfwd>
#include <map>
#include <set>
@@ -15,6 +12,9 @@
#include <utility>
#include <vector>
+#include "cmDepends.h"
+#include "cmLocalCommonGenerator.h"
+
class cmCustomCommand;
class cmCustomCommandGenerator;
class cmGeneratorTarget;
diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx
index 6d7b359..f3d828b 100644
--- a/Source/cmLocalVisualStudio10Generator.cxx
+++ b/Source/cmLocalVisualStudio10Generator.cxx
@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmLocalVisualStudio10Generator.h"
+#include "cm_expat.h"
+
#include "cmGeneratorTarget.h"
#include "cmGlobalVisualStudio10Generator.h"
#include "cmMakefile.h"
@@ -9,8 +11,6 @@
#include "cmXMLParser.h"
#include "cmake.h"
-#include "cm_expat.h"
-
class cmVS10XMLParser : public cmXMLParser
{
public:
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 026f494..6b0f802 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -2,8 +2,16 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmLocalVisualStudio7Generator.h"
+#include <windows.h>
+
+#include <ctype.h> // for isspace
+
+#include "cm_expat.h"
+
+#include "cmComputeLinkInformation.h"
#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
+#include "cmGeneratedFileStream.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalVisualStudio7Generator.h"
@@ -12,15 +20,8 @@
#include "cmSourceFile.h"
#include "cmSystemTools.h"
#include "cmXMLParser.h"
-#include "cm_expat.h"
#include "cmake.h"
-#include "cmComputeLinkInformation.h"
-#include "cmGeneratedFileStream.h"
-
-#include <ctype.h> // for isspace
-#include <windows.h>
-
static bool cmLVS7G_IsFAT(const char* dir);
class cmLocalVisualStudio7GeneratorInternals
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index cec9c02..336e3a5 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmLocalVisualStudioGenerator.h"
+#include "windows.h"
+
#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
#include "cmGeneratorTarget.h"
@@ -9,7 +11,6 @@
#include "cmMakefile.h"
#include "cmSourceFile.h"
#include "cmSystemTools.h"
-#include "windows.h"
cmLocalVisualStudioGenerator::cmLocalVisualStudioGenerator(
cmGlobalGenerator* gg, cmMakefile* mf)
diff --git a/Source/cmMachO.cxx b/Source/cmMachO.cxx
index ee5eb00..6cbed36 100644
--- a/Source/cmMachO.cxx
+++ b/Source/cmMachO.cxx
@@ -2,15 +2,16 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmMachO.h"
-#include "cmAlgorithms.h"
-#include "cmsys/FStream.hxx"
-
#include <cstddef>
#include <string>
#include <vector>
#include <cm/memory>
+#include "cmsys/FStream.hxx"
+
+#include "cmAlgorithms.h"
+
// Include the Mach-O format information system header.
#include <mach-o/fat.h>
#include <mach-o/loader.h>
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d9fbe9d..f143ef7 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1,9 +1,9 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
+#include "cmConfigure.h" // IWYU pragma: keep
+
#include "cmMakefile.h"
-#include "cmsys/FStream.hxx"
-#include "cmsys/RegularExpression.hxx"
#include <algorithm>
#include <cassert>
#include <cctype>
@@ -16,6 +16,11 @@
#include <cm/iterator>
#include <cm/memory>
+#include "cmsys/FStream.hxx"
+#include "cmsys/RegularExpression.hxx"
+
+#include "cm_sys_stat.h"
+
#include "cmAlgorithms.h"
#include "cmCommandArgumentParserHelper.h"
#include "cmCustomCommand.h"
@@ -46,11 +51,8 @@
#include "cmTestGenerator.h" // IWYU pragma: keep
#include "cmVersion.h"
#include "cmWorkingDirectory.h"
-#include "cm_sys_stat.h"
#include "cmake.h"
-#include "cmConfigure.h" // IWYU pragma: keep
-
#ifndef CMAKE_BOOTSTRAP
# include "cmVariableWatch.h"
#endif
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 3a17aaf..6e59494 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -5,7 +5,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmsys/RegularExpression.hxx"
#include <cstddef>
#include <deque>
#include <functional>
@@ -19,6 +18,8 @@
#include <cm/string_view>
+#include "cmsys/RegularExpression.hxx"
+
#include "cmAlgorithms.h"
#include "cmCustomCommandTypes.h"
#include "cmListFileCache.h"
diff --git a/Source/cmMakefileLibraryTargetGenerator.h b/Source/cmMakefileLibraryTargetGenerator.h
index 35e4327..ca22b09 100644
--- a/Source/cmMakefileLibraryTargetGenerator.h
+++ b/Source/cmMakefileLibraryTargetGenerator.h
@@ -5,10 +5,10 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmMakefileTargetGenerator.h"
-
#include <string>
+#include "cmMakefileTargetGenerator.h"
+
class cmGeneratorTarget;
class cmMakefileLibraryTargetGenerator : public cmMakefileTargetGenerator
diff --git a/Source/cmMathCommand.cxx b/Source/cmMathCommand.cxx
index 4ea3638..f11b906 100644
--- a/Source/cmMathCommand.cxx
+++ b/Source/cmMathCommand.cxx
@@ -2,13 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmMathCommand.h"
+#include <cstdio>
+
+#include "cm_kwiml.h"
+
#include "cmExecutionStatus.h"
#include "cmExprParserHelper.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
-#include "cm_kwiml.h"
-
-#include <cstdio>
namespace {
bool HandleExprCommand(std::vector<std::string> const& args,
diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx
index 39b40b8..96a6386 100644
--- a/Source/cmMessageCommand.cxx
+++ b/Source/cmMessageCommand.cxx
@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmMessageCommand.h"
+#include <cassert>
+
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
@@ -11,8 +13,6 @@
#include "cmSystemTools.h"
#include "cmake.h"
-#include <cassert>
-
// cmLibraryCommand
bool cmMessageCommand(std::vector<std::string> const& args,
cmExecutionStatus& status)
diff --git a/Source/cmMessenger.h b/Source/cmMessenger.h
index cf15adf..8c09782 100644
--- a/Source/cmMessenger.h
+++ b/Source/cmMessenger.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <string>
+
#include "cmListFileCache.h"
#include "cmMessageType.h"
-#include <string>
-
class cmMessenger
{
public:
diff --git a/Source/cmNinjaNormalTargetGenerator.h b/Source/cmNinjaNormalTargetGenerator.h
index 14991a2..ebc1268 100644
--- a/Source/cmNinjaNormalTargetGenerator.h
+++ b/Source/cmNinjaNormalTargetGenerator.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmGeneratorTarget.h"
-#include "cmNinjaTargetGenerator.h"
-
#include <string>
#include <vector>
+#include "cmGeneratorTarget.h"
+#include "cmNinjaTargetGenerator.h"
+
class cmNinjaNormalTargetGenerator : public cmNinjaTargetGenerator
{
public:
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 613e7aa..0fda47e 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -2,8 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmNinjaTargetGenerator.h"
-#include "cm_jsoncpp_value.h"
-#include "cm_jsoncpp_writer.h"
#include <algorithm>
#include <cassert>
#include <iterator>
@@ -13,6 +11,9 @@
#include <cm/memory>
+#include "cm_jsoncpp_value.h"
+#include "cm_jsoncpp_writer.h"
+
#include "cmAlgorithms.h"
#include "cmComputeLinkInformation.h"
#include "cmCustomCommandGenerator.h"
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index e304bc7..4627bcd 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -5,6 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <map>
+#include <memory>
+#include <set>
+#include <string>
+#include <vector>
+
#include "cm_jsoncpp_value.h"
#include "cmCommonTargetGenerator.h"
@@ -12,12 +18,6 @@
#include "cmNinjaTypes.h"
#include "cmOSXBundleGenerator.h"
-#include <map>
-#include <memory>
-#include <set>
-#include <string>
-#include <vector>
-
class cmCustomCommand;
class cmGeneratedFileStream;
class cmGeneratorTarget;
diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx
index eea4c93..5259037 100644
--- a/Source/cmNinjaUtilityTargetGenerator.cxx
+++ b/Source/cmNinjaUtilityTargetGenerator.cxx
@@ -2,6 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmNinjaUtilityTargetGenerator.h"
+#include <algorithm>
+#include <array>
+#include <iterator>
+#include <string>
+#include <utility>
+#include <vector>
+
#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
#include "cmGeneratedFileStream.h"
@@ -16,13 +23,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <algorithm>
-#include <array>
-#include <iterator>
-#include <string>
-#include <utility>
-#include <vector>
-
cmNinjaUtilityTargetGenerator::cmNinjaUtilityTargetGenerator(
cmGeneratorTarget* target)
: cmNinjaTargetGenerator(target)
diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx
index 6175c1e..a6f4e51 100644
--- a/Source/cmOSXBundleGenerator.cxx
+++ b/Source/cmOSXBundleGenerator.cxx
@@ -2,6 +2,9 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmOSXBundleGenerator.h"
+#include <cassert>
+#include <utility>
+
#include "cmGeneratorTarget.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
@@ -10,9 +13,6 @@
#include "cmSystemTools.h"
#include "cmTarget.h"
-#include <cassert>
-#include <utility>
-
class cmSourceFile;
cmOSXBundleGenerator::cmOSXBundleGenerator(cmGeneratorTarget* target,
diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx
index 916a9f7..073222c 100644
--- a/Source/cmOrderDirectories.cxx
+++ b/Source/cmOrderDirectories.cxx
@@ -2,6 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmOrderDirectories.h"
+#include <algorithm>
+#include <cassert>
+#include <functional>
+#include <sstream>
+#include <vector>
+
#include "cmAlgorithms.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
@@ -10,12 +16,6 @@
#include "cmSystemTools.h"
#include "cmake.h"
-#include <algorithm>
-#include <cassert>
-#include <functional>
-#include <sstream>
-#include <vector>
-
/*
Directory ordering computation.
- Useful to compute a safe runtime library path order
diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h
index 2dfc4d1..23c5145 100644
--- a/Source/cmOrderDirectories.h
+++ b/Source/cmOrderDirectories.h
@@ -5,13 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmsys/RegularExpression.hxx"
#include <map>
#include <set>
#include <string>
#include <utility>
#include <vector>
+#include "cmsys/RegularExpression.hxx"
+
class cmGeneratorTarget;
class cmGlobalGenerator;
class cmOrderDirectoriesConstraint;
diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h
index c2053c7..349a069 100644
--- a/Source/cmOutputConverter.h
+++ b/Source/cmOutputConverter.h
@@ -5,11 +5,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmStateSnapshot.h"
+#include <string>
#include <cm/string_view>
-#include <string>
+#include "cmStateSnapshot.h"
class cmState;
diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx
index d9a433d..e093be0 100644
--- a/Source/cmOutputRequiredFilesCommand.cxx
+++ b/Source/cmOutputRequiredFilesCommand.cxx
@@ -2,13 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmOutputRequiredFilesCommand.h"
-#include "cmsys/FStream.hxx"
-#include "cmsys/RegularExpression.hxx"
#include <cstdio>
#include <map>
#include <set>
#include <utility>
+#include "cmsys/FStream.hxx"
+#include "cmsys/RegularExpression.hxx"
+
#include "cmAlgorithms.h"
#include "cmExecutionStatus.h"
#include "cmGeneratorExpression.h"
diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx
index c802fb4..d712edb 100644
--- a/Source/cmParseArgumentsCommand.cxx
+++ b/Source/cmParseArgumentsCommand.cxx
@@ -7,6 +7,8 @@
#include <sstream>
#include <utility>
+#include <cm/string_view>
+
#include "cmArgumentParser.h"
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
@@ -14,7 +16,6 @@
#include "cmRange.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <cm/string_view>
static std::string EscapeArg(const std::string& arg)
{
diff --git a/Source/cmPipeConnection.h b/Source/cmPipeConnection.h
index e67f15c..81f8a49 100644
--- a/Source/cmPipeConnection.h
+++ b/Source/cmPipeConnection.h
@@ -4,12 +4,13 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmUVHandlePtr.h"
#include <string>
-#include "cmConnection.h"
#include "cm_uv.h"
+#include "cmConnection.h"
+#include "cmUVHandlePtr.h"
+
class cmPipeConnection : public cmEventBasedConnection
{
public:
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index c8bc56d..5c8bc98 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -1,5 +1,12 @@
#include "cmPolicies.h"
+#include <cassert>
+#include <cctype>
+#include <cstdio>
+#include <cstring>
+#include <sstream>
+#include <vector>
+
#include "cmMakefile.h"
#include "cmMessageType.h"
#include "cmState.h"
@@ -8,13 +15,6 @@
#include "cmSystemTools.h"
#include "cmVersion.h"
-#include <cassert>
-#include <cctype>
-#include <cstdio>
-#include <cstring>
-#include <sstream>
-#include <vector>
-
static bool stringToId(const char* input, cmPolicies::PolicyID& pid)
{
assert(input);
diff --git a/Source/cmProcessTools.cxx b/Source/cmProcessTools.cxx
index a2bc16f..9ebf5b7 100644
--- a/Source/cmProcessTools.cxx
+++ b/Source/cmProcessTools.cxx
@@ -1,11 +1,13 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmProcessTools.h"
-#include "cmProcessOutput.h"
-#include "cmsys/Process.h"
#include <ostream>
+#include "cmsys/Process.h"
+
+#include "cmProcessOutput.h"
+
void cmProcessTools::RunProcess(struct cmsysProcess_s* cp, OutputParser* out,
OutputParser* err, Encoding encoding)
{
diff --git a/Source/cmProcessTools.h b/Source/cmProcessTools.h
index 7d97e36..21d59c4 100644
--- a/Source/cmProcessTools.h
+++ b/Source/cmProcessTools.h
@@ -4,12 +4,13 @@
#define cmProcessTools_h
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmProcessOutput.h"
#include <cstring>
#include <iosfwd>
#include <string>
+#include "cmProcessOutput.h"
+
/** \class cmProcessTools
* \brief Helper classes for process output parsing
*
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 373e767..eb59b4f 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmProjectCommand.h"
-#include "cmsys/RegularExpression.hxx"
#include <array>
#include <cstddef>
#include <cstdio>
@@ -10,6 +9,8 @@
#include <limits>
#include <utility>
+#include "cmsys/RegularExpression.hxx"
+
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
diff --git a/Source/cmPropertyDefinition.h b/Source/cmPropertyDefinition.h
index 9adff49..0d68c32 100644
--- a/Source/cmPropertyDefinition.h
+++ b/Source/cmPropertyDefinition.h
@@ -5,10 +5,10 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmProperty.h"
-
#include <string>
+#include "cmProperty.h"
+
/** \class cmPropertyDefinition
* \brief Property meta-information
*
diff --git a/Source/cmPropertyDefinitionMap.h b/Source/cmPropertyDefinitionMap.h
index 97ba553..8ec7910 100644
--- a/Source/cmPropertyDefinitionMap.h
+++ b/Source/cmPropertyDefinitionMap.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmProperty.h"
-#include "cmPropertyDefinition.h"
-
#include <map>
#include <string>
+#include "cmProperty.h"
+#include "cmPropertyDefinition.h"
+
class cmPropertyDefinitionMap
: public std::map<std::string, cmPropertyDefinition>
{
diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx
index 0f0e864..eb7c900 100644
--- a/Source/cmQtAutoGen.cxx
+++ b/Source/cmQtAutoGen.cxx
@@ -2,20 +2,21 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmQtAutoGen.h"
-#include "cmAlgorithms.h"
-#include "cmDuration.h"
-#include "cmProcessOutput.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-#include "cmsys/FStream.hxx"
-#include "cmsys/RegularExpression.hxx"
-
#include <algorithm>
#include <array>
#include <initializer_list>
#include <sstream>
#include <utility>
+#include "cmsys/FStream.hxx"
+#include "cmsys/RegularExpression.hxx"
+
+#include "cmAlgorithms.h"
+#include "cmDuration.h"
+#include "cmProcessOutput.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+
// - Static functions
/// @brief Merges newOpts into baseOpts
diff --git a/Source/cmQtAutoGen.h b/Source/cmQtAutoGen.h
index d070b79..a740ba3 100644
--- a/Source/cmQtAutoGen.h
+++ b/Source/cmQtAutoGen.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include <cm/string_view>
-
#include <memory>
#include <string>
#include <vector>
+#include <cm/string_view>
+
/** \class cmQtAutoGen
* \brief Common base class for QtAutoGen classes
*/
diff --git a/Source/cmQtAutoGenGlobalInitializer.cxx b/Source/cmQtAutoGenGlobalInitializer.cxx
index 751ad50..ef6b886 100644
--- a/Source/cmQtAutoGenGlobalInitializer.cxx
+++ b/Source/cmQtAutoGenGlobalInitializer.cxx
@@ -2,6 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmQtAutoGenGlobalInitializer.h"
+#include <utility>
+
+#include <cm/memory>
+
#include "cmCustomCommandLines.h"
#include "cmCustomCommandTypes.h"
#include "cmDuration.h"
@@ -18,10 +22,6 @@
#include "cmSystemTools.h"
#include "cmTarget.h"
-#include <cm/memory>
-
-#include <utility>
-
cmQtAutoGenGlobalInitializer::Keywords::Keywords()
: AUTOMOC("AUTOMOC")
, AUTOUIC("AUTOUIC")
diff --git a/Source/cmQtAutoGenGlobalInitializer.h b/Source/cmQtAutoGenGlobalInitializer.h
index d7f4cc6..806725a 100644
--- a/Source/cmQtAutoGenGlobalInitializer.h
+++ b/Source/cmQtAutoGenGlobalInitializer.h
@@ -5,14 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmQtAutoGen.h"
-
#include <map>
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
+#include "cmQtAutoGen.h"
+
class cmLocalGenerator;
class cmQtAutoGenInitializer;
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index d7b9fa2..a20f106 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -2,8 +2,25 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmQtAutoGenInitializer.h"
-#include "cmQtAutoGen.h"
-#include "cmQtAutoGenGlobalInitializer.h"
+#include <cstddef>
+#include <deque>
+#include <initializer_list>
+#include <map>
+#include <ostream>
+#include <set>
+#include <string>
+#include <unordered_set>
+#include <utility>
+#include <vector>
+
+#include <cm/algorithm>
+#include <cm/iterator>
+#include <cm/memory>
+
+#include "cmsys/SystemInformation.hxx"
+
+#include "cm_jsoncpp_value.h"
+#include "cm_jsoncpp_writer.h"
#include "cmAlgorithms.h"
#include "cmCustomCommand.h"
@@ -19,6 +36,8 @@
#include "cmMakefile.h"
#include "cmMessageType.h"
#include "cmPolicies.h"
+#include "cmQtAutoGen.h"
+#include "cmQtAutoGenGlobalInitializer.h"
#include "cmSourceFile.h"
#include "cmSourceFileLocationKind.h"
#include "cmSourceGroup.h"
@@ -27,25 +46,7 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
-#include "cm_jsoncpp_value.h"
-#include "cm_jsoncpp_writer.h"
#include "cmake.h"
-#include "cmsys/SystemInformation.hxx"
-
-#include <cstddef>
-#include <deque>
-#include <initializer_list>
-#include <map>
-#include <ostream>
-#include <set>
-#include <string>
-#include <unordered_set>
-#include <utility>
-#include <vector>
-
-#include <cm/algorithm>
-#include <cm/iterator>
-#include <cm/memory>
namespace {
diff --git a/Source/cmQtAutoGenInitializer.h b/Source/cmQtAutoGenInitializer.h
index 0580ddb..486dab7 100644
--- a/Source/cmQtAutoGenInitializer.h
+++ b/Source/cmQtAutoGenInitializer.h
@@ -4,10 +4,6 @@
#define cmQtAutoGenInitializer_h
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmFilePathChecksum.h"
-#include "cmQtAutoGen.h"
-
-#include <cm/string_view>
#include <memory>
#include <set>
@@ -17,6 +13,11 @@
#include <utility>
#include <vector>
+#include <cm/string_view>
+
+#include "cmFilePathChecksum.h"
+#include "cmQtAutoGen.h"
+
class cmGeneratorTarget;
class cmGlobalGenerator;
class cmLocalGenerator;
diff --git a/Source/cmQtAutoGenerator.cxx b/Source/cmQtAutoGenerator.cxx
index 1320b07..da96305 100644
--- a/Source/cmQtAutoGenerator.cxx
+++ b/Source/cmQtAutoGenerator.cxx
@@ -2,11 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmQtAutoGenerator.h"
+#include "cmsys/FStream.hxx"
+
+#include "cm_jsoncpp_reader.h"
+
#include "cmQtAutoGen.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include "cm_jsoncpp_reader.h"
-#include "cmsys/FStream.hxx"
cmQtAutoGenerator::Logger::Logger()
{
diff --git a/Source/cmQtAutoGenerator.h b/Source/cmQtAutoGenerator.h
index 71ee9ce..bbe6dd0 100644
--- a/Source/cmQtAutoGenerator.h
+++ b/Source/cmQtAutoGenerator.h
@@ -5,18 +5,19 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmFileTime.h"
-#include "cmQtAutoGen.h"
-#include "cm_jsoncpp_value.h"
-
-#include <cm/string_view>
-
#include <istream>
#include <mutex>
#include <string>
#include <unordered_set>
#include <vector>
+#include <cm/string_view>
+
+#include "cm_jsoncpp_value.h"
+
+#include "cmFileTime.h"
+#include "cmQtAutoGen.h"
+
/** \class cmQtAutoGenerator
* \brief Base class for QtAutoGen generators
*/
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx
index 3b0f717..127421a 100644
--- a/Source/cmQtAutoMocUic.cxx
+++ b/Source/cmQtAutoMocUic.cxx
@@ -2,22 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmQtAutoMocUic.h"
-#include "cmAlgorithms.h"
-#include "cmCryptoHash.h"
-#include "cmFileTime.h"
-#include "cmGeneratedFileStream.h"
-#include "cmQtAutoGen.h"
-#include "cmQtAutoGenerator.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-#include "cmWorkerPool.h"
-#include "cm_jsoncpp_value.h"
-#include "cmsys/FStream.hxx"
-#include "cmsys/RegularExpression.hxx"
-
-#include <cm/memory>
-#include <cm/string_view>
-
#include <algorithm>
#include <atomic>
#include <cstddef>
@@ -30,6 +14,24 @@
#include <utility>
#include <vector>
+#include <cm/memory>
+#include <cm/string_view>
+
+#include "cmsys/FStream.hxx"
+#include "cmsys/RegularExpression.hxx"
+
+#include "cm_jsoncpp_value.h"
+
+#include "cmAlgorithms.h"
+#include "cmCryptoHash.h"
+#include "cmFileTime.h"
+#include "cmGeneratedFileStream.h"
+#include "cmQtAutoGen.h"
+#include "cmQtAutoGenerator.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+#include "cmWorkerPool.h"
+
#if defined(__APPLE__)
# include <unistd.h>
#endif
diff --git a/Source/cmQtAutoRcc.cxx b/Source/cmQtAutoRcc.cxx
index 4a3ecfa..3af81ad 100644
--- a/Source/cmQtAutoRcc.cxx
+++ b/Source/cmQtAutoRcc.cxx
@@ -2,6 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmQtAutoRcc.h"
+#include <algorithm>
+#include <string>
+#include <vector>
+
#include "cmAlgorithms.h"
#include "cmCryptoHash.h"
#include "cmDuration.h"
@@ -14,10 +18,6 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <algorithm>
-#include <string>
-#include <vector>
-
namespace {
/** \class cmQtAutoRccT
diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx
index edbb3de..7f4abf9 100644
--- a/Source/cmRST.cxx
+++ b/Source/cmRST.cxx
@@ -2,19 +2,20 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmRST.h"
-#include "cmAlgorithms.h"
-#include "cmRange.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
-#include "cmVersion.h"
-
-#include "cmsys/FStream.hxx"
#include <algorithm>
#include <cctype>
#include <cstddef>
#include <iterator>
#include <utility>
+#include "cmsys/FStream.hxx"
+
+#include "cmAlgorithms.h"
+#include "cmRange.h"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+#include "cmVersion.h"
+
cmRST::cmRST(std::ostream& os, std::string docroot)
: OS(os)
, DocRoot(std::move(docroot))
diff --git a/Source/cmRST.h b/Source/cmRST.h
index d8d2a0b..6b5d416 100644
--- a/Source/cmRST.h
+++ b/Source/cmRST.h
@@ -5,13 +5,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmsys/RegularExpression.hxx"
#include <iosfwd>
#include <map>
#include <set>
#include <string>
#include <vector>
+#include "cmsys/RegularExpression.hxx"
+
/** \class cmRST
* \brief Perform basic .rst processing for command-line help
*
diff --git a/Source/cmRuntimeDependencyArchive.cxx b/Source/cmRuntimeDependencyArchive.cxx
index ed2e3e4..7a987c2 100644
--- a/Source/cmRuntimeDependencyArchive.cxx
+++ b/Source/cmRuntimeDependencyArchive.cxx
@@ -17,8 +17,9 @@
# ifndef CMAKE_BOOTSTRAP
# include "cmGlobalVisualStudioVersionedGenerator.h"
# endif
-# include "cmVSSetupHelper.h"
# include "cmsys/Glob.hxx"
+
+# include "cmVSSetupHelper.h"
#endif
#include <algorithm>
diff --git a/Source/cmRuntimeDependencyArchive.h b/Source/cmRuntimeDependencyArchive.h
index e063121..9e2dfb6 100644
--- a/Source/cmRuntimeDependencyArchive.h
+++ b/Source/cmRuntimeDependencyArchive.h
@@ -4,16 +4,16 @@
#ifndef cmRuntimeDependencyArchive_h
#define cmRuntimeDependencyArchive_h
-#include "cmBinUtilsLinker.h"
-
-#include "cmsys/RegularExpression.hxx"
-
#include <map>
#include <memory>
#include <set>
#include <string>
#include <vector>
+#include "cmsys/RegularExpression.hxx"
+
+#include "cmBinUtilsLinker.h"
+
class cmExecutionStatus;
class cmMakefile;
diff --git a/Source/cmScriptGenerator.cxx b/Source/cmScriptGenerator.cxx
index 1438f07..adc0679 100644
--- a/Source/cmScriptGenerator.cxx
+++ b/Source/cmScriptGenerator.cxx
@@ -2,11 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmScriptGenerator.h"
+#include <utility>
+
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-#include <utility>
-
cmScriptGenerator::cmScriptGenerator(std::string config_var,
std::vector<std::string> configurations)
: RuntimeConfigVariable(std::move(config_var))
diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx
index f150cf3..3b2e5f3 100644
--- a/Source/cmServer.cxx
+++ b/Source/cmServer.cxx
@@ -2,17 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmServer.h"
-#include "cmConnection.h"
-#include "cmFileMonitor.h"
-#include "cmJsonObjectDictionary.h"
-#include "cmServerDictionary.h"
-#include "cmServerProtocol.h"
-#include "cmSystemTools.h"
-#include "cm_jsoncpp_reader.h"
-#include "cm_jsoncpp_writer.h"
-#include "cmake.h"
-#include "cmsys/FStream.hxx"
-
#include <algorithm>
#include <cassert>
#include <cstdint>
@@ -23,6 +12,19 @@
#include <cm/memory>
#include <cm/shared_mutex>
+#include "cmsys/FStream.hxx"
+
+#include "cm_jsoncpp_reader.h"
+#include "cm_jsoncpp_writer.h"
+
+#include "cmConnection.h"
+#include "cmFileMonitor.h"
+#include "cmJsonObjectDictionary.h"
+#include "cmServerDictionary.h"
+#include "cmServerProtocol.h"
+#include "cmSystemTools.h"
+#include "cmake.h"
+
void on_signal(uv_signal_t* signal, int signum)
{
auto conn = static_cast<cmServerBase*>(signal->data);
diff --git a/Source/cmServer.h b/Source/cmServer.h
index 9b12604..3d7027b 100644
--- a/Source/cmServer.h
+++ b/Source/cmServer.h
@@ -4,17 +4,17 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <memory>
+#include <string>
+#include <vector>
+
+#include <cm/shared_mutex>
+
#include "cm_jsoncpp_value.h"
#include "cm_uv.h"
#include "cmUVHandlePtr.h"
-#include <cm/shared_mutex>
-
-#include <memory>
-#include <string>
-#include <vector>
-
class cmConnection;
class cmFileMonitor;
class cmServerProtocol;
diff --git a/Source/cmServerConnection.cxx b/Source/cmServerConnection.cxx
index a878890..2791972 100644
--- a/Source/cmServerConnection.cxx
+++ b/Source/cmServerConnection.cxx
@@ -1,11 +1,13 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
+#include "cmConfigure.h"
+
#include "cmServerConnection.h"
-#include "cmConfigure.h"
+#include "cm_uv.h"
+
#include "cmServer.h"
#include "cmServerDictionary.h"
-#include "cm_uv.h"
#ifdef _WIN32
# include "io.h"
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index f889129..56003df 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -2,6 +2,17 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmServerProtocol.h"
+#include <algorithm>
+#include <cassert>
+#include <functional>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include <cm/memory>
+
+#include "cm_uv.h"
+
#include "cmAlgorithms.h"
#include "cmExternalMakefileProjectGenerator.h"
#include "cmFileMonitor.h"
@@ -13,18 +24,8 @@
#include "cmServerDictionary.h"
#include "cmState.h"
#include "cmSystemTools.h"
-#include "cm_uv.h"
#include "cmake.h"
-#include <algorithm>
-#include <cassert>
-#include <functional>
-#include <string>
-#include <utility>
-#include <vector>
-
-#include <cm/memory>
-
// Get rid of some windows macros:
#undef max
diff --git a/Source/cmServerProtocol.h b/Source/cmServerProtocol.h
index 5da4344..8446c3e 100644
--- a/Source/cmServerProtocol.h
+++ b/Source/cmServerProtocol.h
@@ -4,13 +4,14 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cm_jsoncpp_value.h"
-#include "cmake.h"
-
#include <memory>
#include <string>
#include <utility>
+#include "cm_jsoncpp_value.h"
+
+#include "cmake.h"
+
class cmConnection;
class cmFileMonitor;
class cmServer;
diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h
index 6ef4167..82a3625 100644
--- a/Source/cmSourceFile.h
+++ b/Source/cmSourceFile.h
@@ -5,16 +5,16 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <memory>
+#include <string>
+#include <vector>
+
#include "cmCustomCommand.h"
#include "cmListFileCache.h"
#include "cmPropertyMap.h"
#include "cmSourceFileLocation.h"
#include "cmSourceFileLocationKind.h"
-#include <memory>
-#include <string>
-#include <vector>
-
class cmMakefile;
/** \class cmSourceFile
diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx
index bd75c14..df702b0 100644
--- a/Source/cmSourceFileLocation.cxx
+++ b/Source/cmSourceFileLocation.cxx
@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmSourceFileLocation.h"
+#include <cassert>
+
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
@@ -9,8 +11,6 @@
#include "cmSystemTools.h"
#include "cmake.h"
-#include <cassert>
-
cmSourceFileLocation::cmSourceFileLocation() = default;
cmSourceFileLocation::cmSourceFileLocation(const cmSourceFileLocation& loc)
diff --git a/Source/cmSourceGroup.cxx b/Source/cmSourceGroup.cxx
index 418a40f..8c3ec9f 100644
--- a/Source/cmSourceGroup.cxx
+++ b/Source/cmSourceGroup.cxx
@@ -2,10 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmSourceGroup.h"
-#include "cmStringAlgorithms.h"
-
#include <utility>
+#include "cmStringAlgorithms.h"
+
class cmSourceGroupInternals
{
public:
diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h
index 7c65494..581dc5d 100644
--- a/Source/cmSourceGroup.h
+++ b/Source/cmSourceGroup.h
@@ -5,11 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmsys/RegularExpression.hxx"
#include <set>
#include <string>
#include <vector>
+#include "cmsys/RegularExpression.hxx"
+
class cmSourceFile;
class cmSourceGroupInternals;
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 6de312c..f9b5ed1 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmState.h"
-#include "cmsys/RegularExpression.hxx"
#include <algorithm>
#include <cassert>
#include <cstdlib>
@@ -11,6 +10,8 @@
#include <cm/memory>
+#include "cmsys/RegularExpression.hxx"
+
#include "cmCacheManager.h"
#include "cmCommand.h"
#include "cmDefinitions.h"
diff --git a/Source/cmString.hxx b/Source/cmString.hxx
index 6223b78..073f4c9 100644
--- a/Source/cmString.hxx
+++ b/Source/cmString.hxx
@@ -5,9 +5,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cm_static_string_view.hxx"
-#include <cm/string_view>
-
#include <algorithm>
#include <cstddef>
#include <functional>
@@ -18,6 +15,10 @@
#include <type_traits>
#include <utility>
+#include <cm/string_view>
+
+#include "cm_static_string_view.hxx"
+
namespace cm {
class String;
diff --git a/Source/cmStringAlgorithms.h b/Source/cmStringAlgorithms.h
index 6631e98..0e405de 100644
--- a/Source/cmStringAlgorithms.h
+++ b/Source/cmStringAlgorithms.h
@@ -5,10 +5,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmRange.h"
-
-#include <cm/string_view>
-
#include <cctype>
#include <cstring>
#include <initializer_list>
@@ -17,6 +13,10 @@
#include <utility>
#include <vector>
+#include <cm/string_view>
+
+#include "cmRange.h"
+
/** String range type. */
using cmStringRange = cmRange<std::vector<std::string>::const_iterator>;
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index 28616c2..9212195 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -4,7 +4,6 @@
#include "cmStringCommand.h"
-#include "cmsys/RegularExpression.hxx"
#include <algorithm>
#include <cctype>
#include <cstdio>
@@ -13,6 +12,8 @@
#include <cm/iterator>
+#include "cmsys/RegularExpression.hxx"
+
#include "cm_static_string_view.hxx"
#include "cmCryptoHash.h"
diff --git a/Source/cmStringReplaceHelper.cxx b/Source/cmStringReplaceHelper.cxx
index 4a62987..998c135 100644
--- a/Source/cmStringReplaceHelper.cxx
+++ b/Source/cmStringReplaceHelper.cxx
@@ -3,10 +3,11 @@
#include "cmStringReplaceHelper.h"
-#include "cmMakefile.h"
#include <sstream>
#include <utility>
+#include "cmMakefile.h"
+
cmStringReplaceHelper::cmStringReplaceHelper(const std::string& regex,
std::string replace_expr,
cmMakefile* makefile)
diff --git a/Source/cmStringReplaceHelper.h b/Source/cmStringReplaceHelper.h
index b3e4704..74d481d 100644
--- a/Source/cmStringReplaceHelper.h
+++ b/Source/cmStringReplaceHelper.h
@@ -3,12 +3,12 @@
#ifndef cmStringReplaceHelper_h
#define cmStringReplaceHelper_h
-#include "cmsys/RegularExpression.hxx"
-
#include <string>
#include <utility>
#include <vector>
+#include "cmsys/RegularExpression.hxx"
+
class cmMakefile;
class cmStringReplaceHelper
diff --git a/Source/cmSubcommandTable.h b/Source/cmSubcommandTable.h
index 6e39a1f..65eb8c7 100644
--- a/Source/cmSubcommandTable.h
+++ b/Source/cmSubcommandTable.h
@@ -5,15 +5,15 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cm_static_string_view.hxx"
-
-#include <cm/string_view>
-
#include <initializer_list>
#include <string>
#include <utility>
#include <vector>
+#include <cm/string_view>
+
+#include "cm_static_string_view.hxx"
+
class cmExecutionStatus;
class cmSubcommandTable
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 62a8d8f..a50e829 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2,17 +2,19 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmSystemTools.h"
+#include "cm_uv.h"
+
#include "cmAlgorithms.h"
#include "cmDuration.h"
#include "cmProcessOutput.h"
#include "cmRange.h"
#include "cmStringAlgorithms.h"
-#include "cm_uv.h"
#if !defined(CMAKE_BOOTSTRAP)
+# include "cm_libarchive.h"
+
# include "cmArchiveWrite.h"
# include "cmLocale.h"
-# include "cm_libarchive.h"
# ifndef __LA_INT64_T
# define __LA_INT64_T la_int64_t
# endif
@@ -33,12 +35,6 @@
# include "cmMachO.h"
#endif
-#include "cmsys/Directory.hxx"
-#include "cmsys/Encoding.hxx"
-#include "cmsys/FStream.hxx"
-#include "cmsys/RegularExpression.hxx"
-#include "cmsys/System.h"
-#include "cmsys/Terminal.h"
#include <algorithm>
#include <cassert>
#include <cctype>
@@ -47,19 +43,28 @@
#include <cstdlib>
#include <cstring>
#include <ctime>
-#include <fcntl.h>
#include <iostream>
#include <sstream>
#include <utility>
#include <vector>
+#include <fcntl.h>
+
+#include "cmsys/Directory.hxx"
+#include "cmsys/Encoding.hxx"
+#include "cmsys/FStream.hxx"
+#include "cmsys/RegularExpression.hxx"
+#include "cmsys/System.h"
+#include "cmsys/Terminal.h"
+
#if defined(_WIN32)
# include <windows.h>
// include wincrypt.h after windows.h
# include <wincrypt.h>
#else
-# include <sys/time.h>
# include <unistd.h>
+
+# include <sys/time.h>
#endif
#if defined(_WIN32) && \
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 108215c..ee149a0 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -5,17 +5,20 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCryptoHash.h"
-#include "cmDuration.h"
-#include "cmProcessOutput.h"
-#include "cmsys/Process.h"
-#include "cmsys/SystemTools.hxx" // IWYU pragma: export
-#include <cm/string_view>
#include <cstddef>
#include <functional>
#include <string>
#include <vector>
+#include <cm/string_view>
+
+#include "cmsys/Process.h"
+#include "cmsys/SystemTools.hxx" // IWYU pragma: export
+
+#include "cmCryptoHash.h"
+#include "cmDuration.h"
+#include "cmProcessOutput.h"
+
/** \class cmSystemTools
* \brief A collection of useful functions for CMake.
*
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 62ead60..1d36f83 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmTarget.h"
-#include "cmsys/RegularExpression.hxx"
#include <algorithm>
#include <cassert>
#include <cstring>
@@ -14,6 +13,8 @@
#include <cm/memory>
+#include "cmsys/RegularExpression.hxx"
+
#include "cmAlgorithms.h"
#include "cmCustomCommand.h"
#include "cmGeneratorExpression.h"
diff --git a/Source/cmTargetPrecompileHeadersCommand.cxx b/Source/cmTargetPrecompileHeadersCommand.cxx
index 887d973..c6e2e5c 100644
--- a/Source/cmTargetPrecompileHeadersCommand.cxx
+++ b/Source/cmTargetPrecompileHeadersCommand.cxx
@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmTargetPrecompileHeadersCommand.h"
+#include <utility>
+
#include "cmGeneratorExpression.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
@@ -10,8 +12,6 @@
#include "cmTarget.h"
#include "cmTargetPropCommandBase.h"
-#include <utility>
-
namespace {
std::vector<std::string> ConvertToAbsoluteContent(
diff --git a/Source/cmTest.h b/Source/cmTest.h
index 02d8f46..dd246c4 100644
--- a/Source/cmTest.h
+++ b/Source/cmTest.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmListFileCache.h"
-#include "cmPropertyMap.h"
-
#include <string>
#include <vector>
+#include "cmListFileCache.h"
+#include "cmPropertyMap.h"
+
class cmMakefile;
/** \class cmTest
diff --git a/Source/cmTestGenerator.h b/Source/cmTestGenerator.h
index 7ac68eb..e388c16 100644
--- a/Source/cmTestGenerator.h
+++ b/Source/cmTestGenerator.h
@@ -5,12 +5,12 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmScriptGenerator.h"
-
#include <iosfwd>
#include <string>
#include <vector>
+#include "cmScriptGenerator.h"
+
class cmGeneratorExpression;
class cmLocalGenerator;
class cmTest;
diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx
index 73354ec..0e8e986 100644
--- a/Source/cmTryRunCommand.cxx
+++ b/Source/cmTryRunCommand.cxx
@@ -2,9 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmTryRunCommand.h"
-#include "cmsys/FStream.hxx"
#include <cstdio>
+#include "cmsys/FStream.hxx"
+
#include "cmDuration.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
diff --git a/Source/cmUVProcessChain.cxx b/Source/cmUVProcessChain.cxx
index 3adc47a..543c330 100644
--- a/Source/cmUVProcessChain.cxx
+++ b/Source/cmUVProcessChain.cxx
@@ -2,19 +2,19 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmUVProcessChain.h"
-#include "cmGetPipes.h"
-#include "cmUVHandlePtr.h"
-#include "cmUVStreambuf.h"
-#include "cm_uv.h"
-
#include <cassert>
-
#include <istream> // IWYU pragma: keep
#include <iterator>
#include <utility>
#include <cm/memory>
+#include "cm_uv.h"
+
+#include "cmGetPipes.h"
+#include "cmUVHandlePtr.h"
+#include "cmUVStreambuf.h"
+
struct cmUVProcessChain::InternalData
{
struct BasicStreamData
diff --git a/Source/cmUVProcessChain.h b/Source/cmUVProcessChain.h
index 8a19bc3..05a7cc8 100644
--- a/Source/cmUVProcessChain.h
+++ b/Source/cmUVProcessChain.h
@@ -3,8 +3,6 @@
#ifndef cmUVProcessChain_h
#define cmUVProcessChain_h
-#include "cm_uv.h"
-
#include <array>
#include <cstddef>
#include <cstdint>
@@ -13,6 +11,8 @@
#include <string>
#include <vector>
+#include "cm_uv.h"
+
class cmUVProcessChain;
class cmUVProcessChainBuilder
diff --git a/Source/cmUVStreambuf.h b/Source/cmUVStreambuf.h
index 0737629..1c8a771 100644
--- a/Source/cmUVStreambuf.h
+++ b/Source/cmUVStreambuf.h
@@ -3,15 +3,15 @@
#ifndef cmUVStreambuf_h
#define cmUVStreambuf_h
-#include "cmUVHandlePtr.h"
-
-#include "cm_uv.h"
-
#include <algorithm>
#include <cstring>
#include <streambuf>
#include <vector>
+#include "cm_uv.h"
+
+#include "cmUVHandlePtr.h"
+
/*
* This file is based on example code from:
*
diff --git a/Source/cmUuid.cxx b/Source/cmUuid.cxx
index f0f2c51..cd52b3f 100644
--- a/Source/cmUuid.cxx
+++ b/Source/cmUuid.cxx
@@ -2,11 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmUuid.h"
-#include "cmCryptoHash.h"
-
#include <array>
#include <cstring>
+#include "cmCryptoHash.h"
+
static const std::array<int, 5> kUuidGroups = { { 4, 2, 2, 2, 6 } };
std::string cmUuid::FromMd5(std::vector<unsigned char> const& uuidNamespace,
diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx
index 707ceac..dd9f058 100644
--- a/Source/cmVSSetupHelper.cxx
+++ b/Source/cmVSSetupHelper.cxx
@@ -2,11 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmVSSetupHelper.h"
-#include "cmStringAlgorithms.h"
-#include "cmSystemTools.h"
#include "cmsys/Encoding.hxx"
#include "cmsys/FStream.hxx"
+#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
+
#ifndef VSSetupConstants
# define VSSetupConstants
/* clang-format off */
diff --git a/Source/cmVSSetupHelper.h b/Source/cmVSSetupHelper.h
index ad46c75..0980cef 100644
--- a/Source/cmVSSetupHelper.h
+++ b/Source/cmVSSetupHelper.h
@@ -8,13 +8,13 @@
#endif
// Published by Visual Studio Setup team
-#include "cmvssetup/Setup.Configuration.h"
-
#include <string>
#include <vector>
#include <windows.h>
+#include "cmvssetup/Setup.Configuration.h"
+
template <class T>
class SmartCOMPtr
{
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 176e790..d5f0c61 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2,6 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmVisualStudio10TargetGenerator.h"
+#include <iterator>
+#include <set>
+
+#include <cm/memory>
+
+#include "windows.h"
+
#include "cmAlgorithms.h"
#include "cmComputeLinkInformation.h"
#include "cmCustomCommand.h"
@@ -16,12 +23,6 @@
#include "cmSourceFile.h"
#include "cmSystemTools.h"
#include "cmVisualStudioGeneratorOptions.h"
-#include "windows.h"
-
-#include <iterator>
-#include <set>
-
-#include <cm/memory>
static void ConvertToWindowsSlash(std::string& s);
diff --git a/Source/cmVisualStudioSlnParser.cxx b/Source/cmVisualStudioSlnParser.cxx
index 05ef517..4533e9b 100644
--- a/Source/cmVisualStudioSlnParser.cxx
+++ b/Source/cmVisualStudioSlnParser.cxx
@@ -2,13 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmVisualStudioSlnParser.h"
+#include <cassert>
+#include <stack>
+
+#include "cmsys/FStream.hxx"
+
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmVisualStudioSlnData.h"
-#include "cmsys/FStream.hxx"
-
-#include <cassert>
-#include <stack>
namespace {
enum LineFormat
diff --git a/Source/cmVisualStudioSlnParser.h b/Source/cmVisualStudioSlnParser.h
index 166f788..6c05633 100644
--- a/Source/cmVisualStudioSlnParser.h
+++ b/Source/cmVisualStudioSlnParser.h
@@ -7,9 +7,10 @@
#include <bitset>
#include <iosfwd>
-#include <stddef.h>
#include <string>
+#include <stddef.h>
+
class cmSlnData;
class cmVisualStudioSlnParser
diff --git a/Source/cmVisualStudioWCEPlatformParser.h b/Source/cmVisualStudioWCEPlatformParser.h
index c19691a..60a6611 100644
--- a/Source/cmVisualStudioWCEPlatformParser.h
+++ b/Source/cmVisualStudioWCEPlatformParser.h
@@ -6,10 +6,11 @@
#include "cmConfigure.h" // IWYU pragma: keep
#include <map>
-#include <stddef.h>
#include <string>
#include <vector>
+#include <stddef.h>
+
#include "cmXMLParser.h"
// This class is used to parse XML with configuration
diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx
index bd71546..26e7c75 100644
--- a/Source/cmWhileCommand.cxx
+++ b/Source/cmWhileCommand.cxx
@@ -2,6 +2,9 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmWhileCommand.h"
+#include <string>
+#include <utility>
+
#include <cm/memory>
#include <cm/string_view>
@@ -16,9 +19,6 @@
#include "cmMessageType.h"
#include "cmSystemTools.h"
-#include <string>
-#include <utility>
-
class cmWhileFunctionBlocker : public cmFunctionBlocker
{
public:
diff --git a/Source/cmWorkerPool.cxx b/Source/cmWorkerPool.cxx
index 9d279ab..aa0d6b3 100644
--- a/Source/cmWorkerPool.cxx
+++ b/Source/cmWorkerPool.cxx
@@ -2,12 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmWorkerPool.h"
-#include "cmRange.h"
-#include "cmStringAlgorithms.h"
-#include "cmUVHandlePtr.h"
-#include "cmUVSignalHackRAII.h" // IWYU pragma: keep
-#include "cm_uv.h"
-
#include <algorithm>
#include <array>
#include <condition_variable>
@@ -19,6 +13,13 @@
#include <cm/memory>
+#include "cm_uv.h"
+
+#include "cmRange.h"
+#include "cmStringAlgorithms.h"
+#include "cmUVHandlePtr.h"
+#include "cmUVSignalHackRAII.h" // IWYU pragma: keep
+
/**
* @brief libuv pipe buffer class
*/
diff --git a/Source/cmWorkingDirectory.cxx b/Source/cmWorkingDirectory.cxx
index 816f104..5700b1c 100644
--- a/Source/cmWorkingDirectory.cxx
+++ b/Source/cmWorkingDirectory.cxx
@@ -2,10 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmWorkingDirectory.h"
-#include "cmSystemTools.h"
-
#include <cerrno>
+#include "cmSystemTools.h"
+
cmWorkingDirectory::cmWorkingDirectory(std::string const& newdir)
{
this->OldDir = cmSystemTools::GetCurrentWorkingDirectory();
diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx
index 264dd3f..34e21b2 100644
--- a/Source/cmWriteFileCommand.cxx
+++ b/Source/cmWriteFileCommand.cxx
@@ -2,10 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmWriteFileCommand.h"
-#include "cm_sys_stat.h"
-
#include "cmsys/FStream.hxx"
+#include "cm_sys_stat.h"
+
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
#include "cmStringAlgorithms.h"
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index 1747c9c..b301ab1 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -2,9 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmXCodeObject.h"
-#include <CoreFoundation/CoreFoundation.h>
#include <ostream>
+#include <CoreFoundation/CoreFoundation.h>
+
#include "cmSystemTools.h"
const char* cmXCodeObject::PBXTypeNames[] = {
diff --git a/Source/cmXMLParser.cxx b/Source/cmXMLParser.cxx
index 1f69032..ad5c4ba 100644
--- a/Source/cmXMLParser.cxx
+++ b/Source/cmXMLParser.cxx
@@ -2,13 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmXMLParser.h"
-#include "cm_expat.h"
-#include "cmsys/FStream.hxx"
#include <cctype>
#include <cstring>
#include <iostream>
#include <sstream>
+#include "cmsys/FStream.hxx"
+
+#include "cm_expat.h"
+
cmXMLParser::cmXMLParser()
{
this->Parser = nullptr;
diff --git a/Source/cmXMLSafe.cxx b/Source/cmXMLSafe.cxx
index 7c3b306..8cd5f6e 100644
--- a/Source/cmXMLSafe.cxx
+++ b/Source/cmXMLSafe.cxx
@@ -2,12 +2,12 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmXMLSafe.h"
-#include "cm_utf8.h"
-
#include <cstdio>
#include <cstring>
#include <sstream>
+#include "cm_utf8.h"
+
cmXMLSafe::cmXMLSafe(const char* s)
: Data(s)
, Size(static_cast<unsigned long>(strlen(s)))
diff --git a/Source/cmXMLWriter.cxx b/Source/cmXMLWriter.cxx
index f1ce608..0811bd0 100644
--- a/Source/cmXMLWriter.cxx
+++ b/Source/cmXMLWriter.cxx
@@ -2,9 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmXMLWriter.h"
-#include "cmsys/FStream.hxx"
#include <cassert>
+#include "cmsys/FStream.hxx"
+
cmXMLWriter::cmXMLWriter(std::ostream& output, std::size_t level)
: Output(output)
, IndentationElement(1, '\t')
diff --git a/Source/cmXMLWriter.h b/Source/cmXMLWriter.h
index c4103cc..bc445aa 100644
--- a/Source/cmXMLWriter.h
+++ b/Source/cmXMLWriter.h
@@ -5,8 +5,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmXMLSafe.h"
-
#include <chrono>
#include <cstddef>
#include <ctime>
@@ -15,6 +13,8 @@
#include <string>
#include <vector>
+#include "cmXMLSafe.h"
+
class cmXMLWriter
{
public:
diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx
index 821c112..122e022 100644
--- a/Source/cm_codecvt.cxx
+++ b/Source/cm_codecvt.cxx
@@ -3,9 +3,10 @@
#include "cm_codecvt.hxx"
#if defined(_WIN32)
+# include <windows.h>
+
# include <assert.h>
# include <string.h>
-# include <windows.h>
# undef max
# include "cmsys/Encoding.hxx"
#endif
diff --git a/Source/cm_static_string_view.hxx b/Source/cm_static_string_view.hxx
index 8351cd7..708ac95 100644
--- a/Source/cm_static_string_view.hxx
+++ b/Source/cm_static_string_view.hxx
@@ -5,10 +5,10 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include <cm/string_view>
-
#include <cstddef>
+#include <cm/string_view>
+
namespace cm {
/** A string_view that only binds to static storage.
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index b96eedb..02606c2 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -36,12 +36,13 @@
#include "cmWorkingDirectory.h"
#if !defined(CMAKE_BOOTSTRAP)
+# include <unordered_map>
+
# include "cm_jsoncpp_writer.h"
# include "cmFileAPI.h"
# include "cmGraphVizWriter.h"
# include "cmVariableWatch.h"
-# include <unordered_map>
#endif
#if !defined(CMAKE_BOOTSTRAP)
@@ -105,9 +106,6 @@
# include <sys/time.h>
#endif
-#include "cmsys/FStream.hxx"
-#include "cmsys/Glob.hxx"
-#include "cmsys/RegularExpression.hxx"
#include <algorithm>
#include <cstdio>
#include <cstdlib>
@@ -117,6 +115,10 @@
#include <sstream>
#include <utility>
+#include "cmsys/FStream.hxx"
+#include "cmsys/Glob.hxx"
+#include "cmsys/RegularExpression.hxx"
+
namespace {
#if !defined(CMAKE_BOOTSTRAP)
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 252c6d6..cc00c81 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -17,9 +17,9 @@
# include "cmDynamicLoader.h"
#endif
-#include "cm_uv.h"
-
#include "cmsys/Encoding.hxx"
+
+#include "cm_uv.h"
#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
# include "cmsys/ConsoleBuf.hxx"
#endif
diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx
index 19d0d38..caf6453 100644
--- a/Source/cmcldeps.cxx
+++ b/Source/cmcldeps.cxx
@@ -18,13 +18,15 @@
// /showIncludes is equivalent to -MD, not -MMD, that is, system headers are
// included.
-#include "cmSystemTools.h"
-#include "cmsys/Encoding.hxx"
-
#include <algorithm>
#include <sstream>
+
#include <windows.h>
+#include "cmsys/Encoding.hxx"
+
+#include "cmSystemTools.h"
+
// We don't want any wildcard expansion.
// See http://msdn.microsoft.com/en-us/library/zay8tzh6(v=vs.85).aspx
void _setargv()
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 7bb3dce..d05e3c8 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -26,19 +26,17 @@
#endif
#if !defined(CMAKE_BOOTSTRAP) && defined(_WIN32)
-# include "bindexplib.h"
-# include "cmFileTime.h"
# include "cmsys/ConsoleBuf.hxx"
+
+# include "cmFileTime.h"
+
+# include "bindexplib.h"
#endif
#if !defined(CMAKE_BOOTSTRAP) && defined(_WIN32) && !defined(__CYGWIN__)
# include "cmVisualStudioWCEPlatformParser.h"
#endif
-#include "cmsys/Directory.hxx"
-#include "cmsys/FStream.hxx"
-#include "cmsys/Process.h"
-#include "cmsys/Terminal.h"
#include <array>
#include <cstdio>
#include <cstdlib>
@@ -51,6 +49,11 @@
#include <cm/string_view>
+#include "cmsys/Directory.hxx"
+#include "cmsys/FStream.hxx"
+#include "cmsys/Process.h"
+#include "cmsys/Terminal.h"
+
class cmConnection;
int cmcmd_cmake_ninja_depends(std::vector<std::string>::const_iterator argBeg,
diff --git a/Source/cmcmd.h b/Source/cmcmd.h
index 69a7ecb..17f2f9a 100644
--- a/Source/cmcmd.h
+++ b/Source/cmcmd.h
@@ -4,11 +4,12 @@
#define cmcmd_h
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmCryptoHash.h"
#include <string>
#include <vector>
+#include "cmCryptoHash.h"
+
class cmcmd
{
public:
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index 7be6746..54549a1 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -1,13 +1,14 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#include "CTest/cmCTestLaunch.h"
-#include "CTest/cmCTestScriptHandler.h"
+#include "cmsys/Encoding.hxx"
+
#include "cmCTest.h"
#include "cmDocumentation.h"
#include "cmSystemTools.h"
-#include "cmsys/Encoding.hxx"
+#include "CTest/cmCTestLaunch.h"
+#include "CTest/cmCTestScriptHandler.h"
#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
# include "cmsys/ConsoleBuf.hxx"
#endif