From cba542f32c392c12a6235664dbe49ce64812fb10 Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Mon, 20 Apr 2026 11:11:11 -0400 Subject: [PATCH] cmake.cxx: Organize includes Consolidate includes that are predicated on not-BOOTSTRAP, and move some other conditional includes to be in their own 'group' rather than interleaved with the bulk of includes. This combines the main block of includes into an actual, single block which formatting tools can ensure is lexicographically sorted, rather than being recognized as several, separate blocks which had led to sorting being somewhat inconsistent. --- Source/cmake.cxx | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 2918cd1136..c0afa44b3a 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -40,14 +40,6 @@ #include "cmCMakePresetsGraph.h" #include "cmCommandLineArgument.h" #include "cmCommands.h" -#ifdef CMake_ENABLE_DEBUGGER -# include "cmDebuggerAdapter.h" -# ifdef _WIN32 -# include "cmDebuggerWindowsPipeConnection.h" -# else //!_WIN32 -# include "cmDebuggerPosixPipeConnection.h" -# endif //_WIN32 -#endif #include "cmDocumentation.h" #include "cmDocumentationEntry.h" #include "cmDuration.h" @@ -57,18 +49,12 @@ #include "cmGlobCacheEntry.h" // IWYU pragma: keep #include "cmGlobalGenerator.h" #include "cmGlobalGeneratorFactory.h" +#include "cmJSONState.h" #include "cmLinkLineComputer.h" +#include "cmList.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" -#if !defined(CMAKE_BOOTSTRAP) -# include "cmMakefileProfilingData.h" -#endif -#include "cmJSONState.h" -#include "cmList.h" #include "cmMessenger.h" -#ifndef CMAKE_BOOTSTRAP -# include "cmSarifLog.h" -#endif #include "cmState.h" #include "cmStateDirectory.h" #include "cmStringAlgorithms.h" @@ -80,6 +66,15 @@ #include "cmVersionConfig.h" #include "cmWorkingDirectory.h" +#ifdef CMake_ENABLE_DEBUGGER +# include "cmDebuggerAdapter.h" +# ifdef _WIN32 +# include "cmDebuggerWindowsPipeConnection.h" +# else //!_WIN32 +# include "cmDebuggerPosixPipeConnection.h" +# endif //_WIN32 +#endif + #if !defined(CMAKE_BOOTSTRAP) # include @@ -92,6 +87,8 @@ # include "cmGraphVizWriter.h" # include "cmInstrumentation.h" # include "cmInstrumentationQuery.h" +# include "cmMakefileProfilingData.h" +# include "cmSarifLog.h" # include "cmVariableWatch.h" #endif