Bläddra i källkod

Include necessary headers in commands

Daniel Pfeifer 9 år sedan
förälder
incheckning
e81c323da9
100 ändrade filer med 558 tillägg och 73 borttagningar
  1. 10 2
      Source/cmAddCustomCommandCommand.cxx
  2. 6 0
      Source/cmAddCustomCommandCommand.h
  3. 10 0
      Source/cmAddCustomTargetCommand.cxx
  4. 6 0
      Source/cmAddCustomTargetCommand.h
  5. 4 0
      Source/cmAddDefinitionsCommand.cxx
  6. 6 0
      Source/cmAddDefinitionsCommand.h
  7. 7 1
      Source/cmAddDependenciesCommand.cxx
  8. 6 0
      Source/cmAddDependenciesCommand.h
  9. 10 0
      Source/cmAddExecutableCommand.cxx
  10. 6 0
      Source/cmAddExecutableCommand.h
  11. 8 0
      Source/cmAddLibraryCommand.cxx
  12. 6 0
      Source/cmAddLibraryCommand.h
  13. 6 0
      Source/cmAddSubDirectoryCommand.cxx
  14. 6 0
      Source/cmAddSubDirectoryCommand.h
  15. 5 1
      Source/cmAddTestCommand.cxx
  16. 6 0
      Source/cmAddTestCommand.h
  17. 5 0
      Source/cmBreakCommand.cxx
  18. 6 0
      Source/cmBreakCommand.h
  19. 8 0
      Source/cmBuildCommand.cxx
  20. 6 0
      Source/cmBuildCommand.h
  21. 1 1
      Source/cmBuildNameCommand.cxx
  22. 1 0
      Source/cmCMakeMinimumRequired.cxx
  23. 8 1
      Source/cmCMakePolicyCommand.cxx
  24. 6 0
      Source/cmCMakePolicyCommand.h
  25. 6 0
      Source/cmCommand.cxx
  26. 9 2
      Source/cmCommand.h
  27. 0 12
      Source/cmCommands.cxx
  28. 1 0
      Source/cmConditionEvaluator.cxx
  29. 2 0
      Source/cmConditionEvaluator.h
  30. 5 1
      Source/cmConfigureFileCommand.cxx
  31. 7 0
      Source/cmConfigureFileCommand.h
  32. 2 0
      Source/cmContinueCommand.cxx
  33. 6 0
      Source/cmContinueCommand.h
  34. 1 0
      Source/cmCoreTryCompile.cxx
  35. 1 0
      Source/cmCoreTryCompile.h
  36. 1 0
      Source/cmCreateTestSourceList.cxx
  37. 6 2
      Source/cmDefinePropertyCommand.cxx
  38. 6 0
      Source/cmDefinePropertyCommand.h
  39. 2 0
      Source/cmElseCommand.cxx
  40. 7 1
      Source/cmElseCommand.h
  41. 4 0
      Source/cmEnableLanguageCommand.cxx
  42. 6 0
      Source/cmEnableLanguageCommand.h
  43. 4 0
      Source/cmEnableTestingCommand.cxx
  44. 6 0
      Source/cmEnableTestingCommand.h
  45. 3 0
      Source/cmEndForEachCommand.cxx
  46. 7 0
      Source/cmEndForEachCommand.h
  47. 3 0
      Source/cmEndFunctionCommand.cxx
  48. 7 0
      Source/cmEndFunctionCommand.h
  49. 5 0
      Source/cmEndIfCommand.cxx
  50. 7 1
      Source/cmEndIfCommand.h
  51. 3 0
      Source/cmEndMacroCommand.cxx
  52. 7 0
      Source/cmEndMacroCommand.h
  53. 4 0
      Source/cmEndWhileCommand.cxx
  54. 7 0
      Source/cmEndWhileCommand.h
  55. 5 1
      Source/cmExecProgramCommand.cxx
  56. 6 0
      Source/cmExecProgramCommand.h
  57. 7 3
      Source/cmExecuteProcessCommand.cxx
  58. 6 0
      Source/cmExecuteProcessCommand.h
  59. 1 1
      Source/cmExportCommand.cxx
  60. 5 2
      Source/cmExportLibraryDependenciesCommand.cxx
  61. 2 2
      Source/cmFileCommand.cxx
  62. 5 1
      Source/cmFileCommand.h
  63. 1 0
      Source/cmFindBase.cxx
  64. 1 0
      Source/cmFindCommon.cxx
  65. 0 2
      Source/cmFindFileCommand.cxx
  66. 5 0
      Source/cmFindFileCommand.h
  67. 9 2
      Source/cmFindLibraryCommand.cxx
  68. 7 0
      Source/cmFindLibraryCommand.h
  69. 21 14
      Source/cmFindPackageCommand.cxx
  70. 10 1
      Source/cmFindPackageCommand.h
  71. 5 1
      Source/cmFindPathCommand.cxx
  72. 7 0
      Source/cmFindPathCommand.h
  73. 3 1
      Source/cmFindProgramCommand.cxx
  74. 7 0
      Source/cmFindProgramCommand.h
  75. 8 2
      Source/cmForEachCommand.cxx
  76. 7 1
      Source/cmForEachCommand.h
  77. 7 1
      Source/cmFunctionCommand.cxx
  78. 8 1
      Source/cmFunctionCommand.h
  79. 6 2
      Source/cmGetCMakePropertyCommand.cxx
  80. 6 0
      Source/cmGetCMakePropertyCommand.h
  81. 4 0
      Source/cmGetDirectoryPropertyCommand.cxx
  82. 6 0
      Source/cmGetDirectoryPropertyCommand.h
  83. 4 0
      Source/cmGetFilenameComponentCommand.cxx
  84. 6 0
      Source/cmGetFilenameComponentCommand.h
  85. 12 1
      Source/cmGetPropertyCommand.cxx
  86. 6 0
      Source/cmGetPropertyCommand.h
  87. 3 0
      Source/cmGetSourceFilePropertyCommand.cxx
  88. 6 0
      Source/cmGetSourceFilePropertyCommand.h
  89. 10 0
      Source/cmGetTargetPropertyCommand.cxx
  90. 6 0
      Source/cmGetTargetPropertyCommand.h
  91. 3 1
      Source/cmGetTestPropertyCommand.cxx
  92. 6 0
      Source/cmGetTestPropertyCommand.h
  93. 6 7
      Source/cmIfCommand.cxx
  94. 9 1
      Source/cmIfCommand.h
  95. 7 0
      Source/cmIncludeCommand.cxx
  96. 6 0
      Source/cmIncludeCommand.h
  97. 6 0
      Source/cmIncludeDirectoryCommand.cxx
  98. 6 0
      Source/cmIncludeDirectoryCommand.h
  99. 3 0
      Source/cmIncludeExternalMSProjectCommand.cxx
  100. 4 0
      Source/cmIncludeRegularExpressionCommand.cxx

+ 10 - 2
Source/cmAddCustomCommandCommand.cxx

@@ -2,11 +2,19 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmAddCustomCommandCommand.h"
 
-#include "cmTarget.h"
+#include <sstream>
 
+#include "cmCustomCommand.h"
+#include "cmCustomCommandLines.h"
+#include "cmGlobalGenerator.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
 #include "cmSourceFile.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
+#include "cmake.h"
 
-#include "cmGlobalGenerator.h"
+class cmExecutionStatus;
 
 // cmAddCustomCommandCommand
 bool cmAddCustomCommandCommand::InitialPass(

+ 6 - 0
Source/cmAddCustomCommandCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmAddCustomCommandCommand_h
 #define cmAddCustomCommandCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmAddCustomCommandCommand
  * \brief cmAddCustomCommandCommand defines a new command (rule) that can
  *  be executed within the build process

+ 10 - 0
Source/cmAddCustomTargetCommand.cxx

@@ -2,8 +2,18 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmAddCustomTargetCommand.h"
 
+#include <sstream>
+
+#include "cmCustomCommandLines.h"
 #include "cmGeneratorExpression.h"
 #include "cmGlobalGenerator.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
+#include "cmake.h"
+
+class cmExecutionStatus;
 
 // cmAddCustomTargetCommand
 bool cmAddCustomTargetCommand::InitialPass(

+ 6 - 0
Source/cmAddCustomTargetCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmAddCustomTargetCommand_h
 #define cmAddCustomTargetCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmAddCustomTargetCommand
  * \brief Command that adds a target to the build system.
  *

+ 4 - 0
Source/cmAddDefinitionsCommand.cxx

@@ -2,6 +2,10 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmAddDefinitionsCommand.h"
 
+#include "cmMakefile.h"
+
+class cmExecutionStatus;
+
 // cmAddDefinitionsCommand
 bool cmAddDefinitionsCommand::InitialPass(std::vector<std::string> const& args,
                                           cmExecutionStatus&)

+ 6 - 0
Source/cmAddDefinitionsCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmAddDefinitionsCommand_h
 #define cmAddDefinitionsCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmAddDefinitionsCommand
  * \brief Specify a list of compiler defines
  *

+ 7 - 1
Source/cmAddDependenciesCommand.cxx

@@ -2,7 +2,13 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmAddDependenciesCommand.h"
 
-#include "cmGlobalGenerator.h"
+#include <sstream>
+
+#include "cmMakefile.h"
+#include "cmTarget.h"
+#include "cmake.h"
+
+class cmExecutionStatus;
 
 // cmDependenciesCommand
 bool cmAddDependenciesCommand::InitialPass(

+ 6 - 0
Source/cmAddDependenciesCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmDependenciessCommand_h
 #define cmDependenciessCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmAddDependenciesCommand
  * \brief Add a dependency to a target
  *

+ 10 - 0
Source/cmAddExecutableCommand.cxx

@@ -2,7 +2,17 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmAddExecutableCommand.h"
 
+#include <sstream>
+
+#include "cmGeneratorExpression.h"
 #include "cmGlobalGenerator.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
+#include "cmStateTypes.h"
+#include "cmTarget.h"
+#include "cmake.h"
+
+class cmExecutionStatus;
 
 // cmExecutableCommand
 bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args,

+ 6 - 0
Source/cmAddExecutableCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmExecutablesCommand_h
 #define cmExecutablesCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmExecutablesCommand
  * \brief Defines a list of executables to build.
  *

+ 8 - 0
Source/cmAddLibraryCommand.cxx

@@ -2,12 +2,20 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmAddLibraryCommand.h"
 
+#include <sstream>
+
+#include "cmGeneratorExpression.h"
 #include "cmGlobalGenerator.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
 #include "cmState.h"
 #include "cmStateTypes.h"
 #include "cmSystemTools.h"
+#include "cmTarget.h"
 #include "cmake.h"
 
+class cmExecutionStatus;
+
 // cmLibraryCommand
 bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args,
                                       cmExecutionStatus&)

+ 6 - 0
Source/cmAddLibraryCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmLibrarysCommand_h
 #define cmLibrarysCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmLibrarysCommand
  * \brief Defines a list of executables to build.
  *

+ 6 - 0
Source/cmAddSubDirectoryCommand.cxx

@@ -2,8 +2,14 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmAddSubDirectoryCommand.h"
 
+#include <sstream>
+#include <string.h>
+
+#include "cmMakefile.h"
 #include "cmSystemTools.h"
 
+class cmExecutionStatus;
+
 // cmAddSubDirectoryCommand
 bool cmAddSubDirectoryCommand::InitialPass(
   std::vector<std::string> const& args, cmExecutionStatus&)

+ 6 - 0
Source/cmAddSubDirectoryCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmAddSubDirectoryCommand_h
 #define cmAddSubDirectoryCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmAddSubDirectoryCommand
  * \brief Specify a subdirectory to build
  *

+ 5 - 1
Source/cmAddTestCommand.cxx

@@ -2,9 +2,13 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmAddTestCommand.h"
 
-#include "cmTestGenerator.h"
+#include <sstream>
 
+#include "cmMakefile.h"
 #include "cmTest.h"
+#include "cmTestGenerator.h"
+
+class cmExecutionStatus;
 
 // cmExecutableCommand
 bool cmAddTestCommand::InitialPass(std::vector<std::string> const& args,

+ 6 - 0
Source/cmAddTestCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmAddTestCommand_h
 #define cmAddTestCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmAddTestCommand
  * \brief Add a test to the lists of tests to run.
  *

+ 5 - 0
Source/cmBreakCommand.cxx

@@ -2,7 +2,12 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmBreakCommand.h"
 
+#include <sstream>
+
 #include "cmExecutionStatus.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
+#include "cmake.h"
 
 // cmBreakCommand
 bool cmBreakCommand::InitialPass(std::vector<std::string> const& args,

+ 6 - 0
Source/cmBreakCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmBreakCommand_h
 #define cmBreakCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmBreakCommand
  * \brief Break from an enclosing foreach or while loop
  *

+ 8 - 0
Source/cmBuildCommand.cxx

@@ -2,7 +2,15 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmBuildCommand.h"
 
+#include <sstream>
+
 #include "cmGlobalGenerator.h"
+#include "cmMakefile.h"
+#include "cmStateTypes.h"
+#include "cmSystemTools.h"
+#include "cmake.h"
+
+class cmExecutionStatus;
 
 bool cmBuildCommand::InitialPass(std::vector<std::string> const& args,
                                  cmExecutionStatus&)

+ 6 - 0
Source/cmBuildCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmBuildCommand_h
 #define cmBuildCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmBuildCommand
  * \brief build_command command
  *

+ 1 - 1
Source/cmBuildNameCommand.cxx

@@ -7,7 +7,7 @@
 
 #include "cmMakefile.h"
 #include "cmPolicies.h"
-#include "cmState.h"
+#include "cmStateTypes.h"
 #include "cmSystemTools.h"
 
 class cmExecutionStatus;

+ 1 - 0
Source/cmCMakeMinimumRequired.cxx

@@ -2,6 +2,7 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmCMakeMinimumRequired.h"
 
+#include "cmMakefile.h"
 #include "cmSystemTools.h"
 #include "cmVersion.h"
 

+ 8 - 1
Source/cmCMakePolicyCommand.cxx

@@ -2,8 +2,15 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmCMakePolicyCommand.h"
 
+#include <sstream>
+
+#include "cmMakefile.h"
+#include "cmPolicies.h"
 #include "cmState.h"
-#include "cmVersion.h"
+#include "cmStateTypes.h"
+#include "cmake.h"
+
+class cmExecutionStatus;
 
 // cmCMakePolicyCommand
 bool cmCMakePolicyCommand::InitialPass(std::vector<std::string> const& args,

+ 6 - 0
Source/cmCMakePolicyCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmCMakePolicyCommand_h
 #define cmCMakePolicyCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmCMakePolicyCommand
  * \brief Set how CMake should handle policies
  *

+ 6 - 0
Source/cmCommand.cxx

@@ -2,6 +2,12 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmCommand.h"
 
+#include "cmMakefile.h"
+#include "cmake.h"
+
+class cmExecutionStatus;
+struct cmListFileArgument;
+
 bool cmCommand::InvokeInitialPass(const std::vector<cmListFileArgument>& args,
                                   cmExecutionStatus& status)
 {

+ 9 - 2
Source/cmCommand.h

@@ -3,9 +3,16 @@
 #ifndef cmCommand_h
 #define cmCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommandArgumentsHelper.h"
-#include "cmListFileCache.h"
-#include "cmMakefile.h"
+#include "cmPolicies.h"
+
+class cmExecutionStatus;
+class cmMakefile;
+struct cmListFileArgument;
 
 /** \class cmCommand
  * \brief Superclass for all commands in CMake.

+ 0 - 12
Source/cmCommands.cxx

@@ -14,11 +14,8 @@
 #include "cmBuildCommand.h"
 #include "cmCMakeMinimumRequired.h"
 #include "cmCMakePolicyCommand.h"
-#include "cmCommandArgumentsHelper.h"
-#include "cmConditionEvaluator.h"
 #include "cmConfigureFileCommand.h"
 #include "cmContinueCommand.h"
-#include "cmCoreTryCompile.h"
 #include "cmCreateTestSourceList.h"
 #include "cmDefinePropertyCommand.h"
 #include "cmElseCommand.h"
@@ -31,10 +28,7 @@
 #include "cmEndWhileCommand.h"
 #include "cmExecProgramCommand.h"
 #include "cmExecuteProcessCommand.h"
-#include "cmExpandedCommandArgument.h"
 #include "cmFileCommand.h"
-#include "cmFindBase.h"
-#include "cmFindCommon.h"
 #include "cmFindFileCommand.h"
 #include "cmFindLibraryCommand.h"
 #include "cmFindPackageCommand.h"
@@ -49,13 +43,11 @@
 #include "cmGetSourceFilePropertyCommand.h"
 #include "cmGetTargetPropertyCommand.h"
 #include "cmGetTestPropertyCommand.h"
-#include "cmHexFileConverter.h"
 #include "cmIfCommand.h"
 #include "cmIncludeCommand.h"
 #include "cmIncludeDirectoryCommand.h"
 #include "cmIncludeRegularExpressionCommand.h"
 #include "cmInstallCommand.h"
-#include "cmInstallCommandArguments.h"
 #include "cmInstallFilesCommand.h"
 #include "cmInstallTargetsCommand.h"
 #include "cmLinkDirectoriesCommand.h"
@@ -67,10 +59,8 @@
 #include "cmMessageCommand.h"
 #include "cmOptionCommand.h"
 #include "cmParseArgumentsCommand.h"
-#include "cmPathLabel.h"
 #include "cmProjectCommand.h"
 #include "cmReturnCommand.h"
-#include "cmSearchPath.h"
 #include "cmSeparateArgumentsCommand.h"
 #include "cmSetCommand.h"
 #include "cmSetDirectoryPropertiesCommand.h"
@@ -82,7 +72,6 @@
 #include "cmStringCommand.h"
 #include "cmSubdirCommand.h"
 #include "cmTargetLinkLibrariesCommand.h"
-#include "cmTimestamp.h"
 #include "cmTryCompileCommand.h"
 #include "cmTryRunCommand.h"
 #include "cmUnsetCommand.h"
@@ -113,7 +102,6 @@
 #include "cmTargetCompileFeaturesCommand.h"
 #include "cmTargetCompileOptionsCommand.h"
 #include "cmTargetIncludeDirectoriesCommand.h"
-#include "cmTargetPropCommandBase.h"
 #include "cmTargetSourcesCommand.h"
 #include "cmUseMangledMesaCommand.h"
 #include "cmUtilitySourceCommand.h"

+ 1 - 0
Source/cmConditionEvaluator.cxx

@@ -3,6 +3,7 @@
 #include "cmConditionEvaluator.h"
 
 #include "cmAlgorithms.h"
+#include "cmMakefile.h"
 #include "cmOutputConverter.h"
 #include "cmState.h"
 #include "cmSystemTools.h"

+ 2 - 0
Source/cmConditionEvaluator.h

@@ -5,6 +5,8 @@
 
 #include "cmCommand.h"
 #include "cmExpandedCommandArgument.h"
+#include "cmListFileCache.h"
+#include "cmake.h"
 
 #include <list>
 

+ 5 - 1
Source/cmConfigureFileCommand.cxx

@@ -2,9 +2,13 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmConfigureFileCommand.h"
 
+#include <sstream>
+
+#include "cmMakefile.h"
 #include "cmSystemTools.h"
+#include "cmake.h"
 
-#include <cmsys/RegularExpression.hxx>
+class cmExecutionStatus;
 
 // cmConfigureFileCommand
 bool cmConfigureFileCommand::InitialPass(std::vector<std::string> const& args,

+ 7 - 0
Source/cmConfigureFileCommand.h

@@ -3,7 +3,14 @@
 #ifndef cmConfigureFileCommand_h
 #define cmConfigureFileCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmNewLineStyle.h"
+
+class cmExecutionStatus;
 
 class cmConfigureFileCommand : public cmCommand
 {

+ 2 - 0
Source/cmContinueCommand.cxx

@@ -3,7 +3,9 @@
 #include "cmContinueCommand.h"
 
 #include "cmExecutionStatus.h"
+#include "cmMakefile.h"
 #include "cmSystemTools.h"
+#include "cmake.h"
 
 // cmContinueCommand
 bool cmContinueCommand::InitialPass(std::vector<std::string> const& args,

+ 6 - 0
Source/cmContinueCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmContinueCommand_h
 #define cmContinueCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmContinueCommand
  * \brief Continue from an enclosing foreach or while loop
  *

+ 1 - 0
Source/cmCoreTryCompile.cxx

@@ -5,6 +5,7 @@
 #include "cmAlgorithms.h"
 #include "cmExportTryCompileFileGenerator.h"
 #include "cmGlobalGenerator.h"
+#include "cmMakefile.h"
 #include "cmOutputConverter.h"
 #include "cmState.h"
 #include "cmake.h"

+ 1 - 0
Source/cmCoreTryCompile.h

@@ -4,6 +4,7 @@
 #define cmCoreTryCompile_h
 
 #include "cmCommand.h"
+#include "cmStateTypes.h"
 
 /** \class cmCoreTryCompile
  * \brief Base class for cmTryCompileCommand and cmTryRunCommand

+ 1 - 0
Source/cmCreateTestSourceList.cxx

@@ -2,6 +2,7 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmCreateTestSourceList.h"
 
+#include "cmMakefile.h"
 #include "cmSourceFile.h"
 #include "cmSystemTools.h"
 

+ 6 - 2
Source/cmDefinePropertyCommand.cxx

@@ -2,9 +2,13 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmDefinePropertyCommand.h"
 
+#include <sstream>
+
+#include "cmMakefile.h"
+#include "cmProperty.h"
 #include "cmState.h"
-#include "cmStateTypes.h"
-#include "cmake.h"
+
+class cmExecutionStatus;
 
 bool cmDefinePropertyCommand::InitialPass(std::vector<std::string> const& args,
                                           cmExecutionStatus&)

+ 6 - 0
Source/cmDefinePropertyCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmDefinesPropertyCommand_h
 #define cmDefinesPropertyCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 class cmDefinePropertyCommand : public cmCommand
 {
 public:

+ 2 - 0
Source/cmElseCommand.cxx

@@ -2,6 +2,8 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmElseCommand.h"
 
+class cmExecutionStatus;
+
 bool cmElseCommand::InitialPass(std::vector<std::string> const&,
                                 cmExecutionStatus&)
 {

+ 7 - 1
Source/cmElseCommand.h

@@ -3,7 +3,13 @@
 #ifndef cmElseCommand_h
 #define cmElseCommand_h
 
-#include "cmIfCommand.h"
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
+#include "cmCommand.h"
+
+class cmExecutionStatus;
 
 /** \class cmElseCommand
  * \brief ends an if block

+ 4 - 0
Source/cmEnableLanguageCommand.cxx

@@ -2,6 +2,10 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmEnableLanguageCommand.h"
 
+#include "cmMakefile.h"
+
+class cmExecutionStatus;
+
 // cmEnableLanguageCommand
 bool cmEnableLanguageCommand::InitialPass(std::vector<std::string> const& args,
                                           cmExecutionStatus&)

+ 6 - 0
Source/cmEnableLanguageCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmEnableLanguageCommand_h
 #define cmEnableLanguageCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmEnableLanguageCommand
  * \brief Specify the name for this build project.
  *

+ 4 - 0
Source/cmEnableTestingCommand.cxx

@@ -2,6 +2,10 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmEnableTestingCommand.h"
 
+#include "cmMakefile.h"
+
+class cmExecutionStatus;
+
 // we do this in the final pass so that we now the subdirs have all
 // been defined
 bool cmEnableTestingCommand::InitialPass(std::vector<std::string> const&,

+ 6 - 0
Source/cmEnableTestingCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmEnableTestingCommand_h
 #define cmEnableTestingCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmEnableTestingCommand
  * \brief Enable testing for this directory and below.
  *

+ 3 - 0
Source/cmEndForEachCommand.cxx

@@ -2,6 +2,9 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmEndForEachCommand.h"
 
+class cmExecutionStatus;
+struct cmListFileArgument;
+
 bool cmEndForEachCommand::InvokeInitialPass(
   std::vector<cmListFileArgument> const&, cmExecutionStatus&)
 {

+ 7 - 0
Source/cmEndForEachCommand.h

@@ -3,8 +3,15 @@
 #ifndef cmEndForEachCommand_h
 #define cmEndForEachCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+struct cmListFileArgument;
+
 /** \class cmEndForEachCommand
  * \brief ends an if block
  *

+ 3 - 0
Source/cmEndFunctionCommand.cxx

@@ -2,6 +2,9 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmEndFunctionCommand.h"
 
+class cmExecutionStatus;
+struct cmListFileArgument;
+
 bool cmEndFunctionCommand::InvokeInitialPass(
   std::vector<cmListFileArgument> const&, cmExecutionStatus&)
 {

+ 7 - 0
Source/cmEndFunctionCommand.h

@@ -3,8 +3,15 @@
 #ifndef cmEndFunctionCommand_h
 #define cmEndFunctionCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+struct cmListFileArgument;
+
 /** \class cmEndFunctionCommand
  * \brief ends an if block
  *

+ 5 - 0
Source/cmEndIfCommand.cxx

@@ -3,6 +3,11 @@
 #include "cmEndIfCommand.h"
 
 #include <stdlib.h> // required for atof
+
+#include "cmMakefile.h"
+
+class cmExecutionStatus;
+
 bool cmEndIfCommand::InitialPass(std::vector<std::string> const&,
                                  cmExecutionStatus&)
 {

+ 7 - 1
Source/cmEndIfCommand.h

@@ -3,7 +3,13 @@
 #ifndef cmEndIfCommand_h
 #define cmEndIfCommand_h
 
-#include "cmIfCommand.h"
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
+#include "cmCommand.h"
+
+class cmExecutionStatus;
 
 /** \class cmEndIfCommand
  * \brief ends an if block

+ 3 - 0
Source/cmEndMacroCommand.cxx

@@ -2,6 +2,9 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmEndMacroCommand.h"
 
+class cmExecutionStatus;
+struct cmListFileArgument;
+
 bool cmEndMacroCommand::InvokeInitialPass(
   std::vector<cmListFileArgument> const&, cmExecutionStatus&)
 {

+ 7 - 0
Source/cmEndMacroCommand.h

@@ -3,8 +3,15 @@
 #ifndef cmEndMacroCommand_h
 #define cmEndMacroCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+struct cmListFileArgument;
+
 /** \class cmEndMacroCommand
  * \brief ends an if block
  *

+ 4 - 0
Source/cmEndWhileCommand.cxx

@@ -2,6 +2,10 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmEndWhileCommand.h"
 
+#include "cmListFileCache.h"
+
+class cmExecutionStatus;
+
 bool cmEndWhileCommand::InvokeInitialPass(
   std::vector<cmListFileArgument> const& args, cmExecutionStatus&)
 {

+ 7 - 0
Source/cmEndWhileCommand.h

@@ -3,8 +3,15 @@
 #ifndef cmEndWhileCommand_h
 #define cmEndWhileCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+struct cmListFileArgument;
+
 /** \class cmEndWhileCommand
  * \brief ends a while loop
  *

+ 5 - 1
Source/cmExecProgramCommand.cxx

@@ -2,9 +2,13 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmExecProgramCommand.h"
 
+#include <cmsys/Process.h>
+#include <stdio.h>
+
+#include "cmMakefile.h"
 #include "cmSystemTools.h"
 
-#include <cmsys/Process.h>
+class cmExecutionStatus;
 
 // cmExecProgramCommand
 bool cmExecProgramCommand::InitialPass(std::vector<std::string> const& args,

+ 6 - 0
Source/cmExecProgramCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmExecProgramCommand_h
 #define cmExecProgramCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmExecProgramCommand
  * \brief Command that adds a target to the build system.
  *

+ 7 - 3
Source/cmExecuteProcessCommand.cxx

@@ -2,11 +2,15 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmExecuteProcessCommand.h"
 
-#include "cmSystemTools.h"
-
 #include <cmsys/Process.h>
-
 #include <ctype.h> /* isspace */
+#include <sstream>
+#include <stdio.h>
+
+#include "cmMakefile.h"
+#include "cmSystemTools.h"
+
+class cmExecutionStatus;
 
 static bool cmExecuteProcessCommandIsWhitespace(char c)
 {

+ 6 - 0
Source/cmExecuteProcessCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmExecuteProcessCommand_h
 #define cmExecuteProcessCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmExecuteProcessCommand
  * \brief Command that adds a target to the build system.
  *

+ 1 - 1
Source/cmExportCommand.cxx

@@ -12,7 +12,7 @@
 #include "cmGeneratedFileStream.h"
 #include "cmGlobalGenerator.h"
 #include "cmMakefile.h"
-#include "cmState.h"
+#include "cmStateTypes.h"
 #include "cmSystemTools.h"
 #include "cmTarget.h"
 #include "cmake.h"

+ 5 - 2
Source/cmExportLibraryDependenciesCommand.cxx

@@ -2,17 +2,20 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmExportLibraryDependenciesCommand.h"
 
-#include <cm_auto_ptr.hxx>
 #include <cmsys/FStream.hxx>
+#include <map>
+#include <utility>
 
 #include "cmGeneratedFileStream.h"
 #include "cmGlobalGenerator.h"
 #include "cmMakefile.h"
 #include "cmPolicies.h"
-#include "cmState.h"
+#include "cmStateTypes.h"
 #include "cmSystemTools.h"
 #include "cmTarget.h"
 #include "cmTargetLinkLibraryType.h"
+#include "cm_auto_ptr.hxx"
+#include "cm_unordered_map.hxx"
 #include "cmake.h"
 
 class cmExecutionStatus;

+ 2 - 2
Source/cmFileCommand.cxx

@@ -9,9 +9,9 @@
 #include "cmGlobalGenerator.h"
 #include "cmHexFileConverter.h"
 #include "cmInstallType.h"
-#include "cmake.h"
-
+#include "cmMakefile.h"
 #include "cmTimestamp.h"
+#include "cmake.h"
 
 #if defined(CMAKE_BUILD_WITH_CMAKE)
 #include "cmCurl.h"

+ 5 - 1
Source/cmFileCommand.h

@@ -3,9 +3,13 @@
 #ifndef cmFileCommand_h
 #define cmFileCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
-struct cmFileInstaller;
+class cmExecutionStatus;
 
 /** \class cmFileCommand
  * \brief Command for manipulation of files

+ 1 - 0
Source/cmFindBase.cxx

@@ -3,6 +3,7 @@
 #include "cmFindBase.h"
 
 #include "cmAlgorithms.h"
+#include "cmMakefile.h"
 #include "cmState.h"
 #include "cmStateTypes.h"
 #include "cmSystemTools.h"

+ 1 - 0
Source/cmFindCommon.cxx

@@ -2,6 +2,7 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmFindCommon.h"
 
+#include "cmMakefile.h"
 #include "cmSystemTools.h"
 
 #include <algorithm>

+ 0 - 2
Source/cmFindFileCommand.cxx

@@ -2,8 +2,6 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmFindFileCommand.h"
 
-#include "cmSystemTools.h"
-
 cmFindFileCommand::cmFindFileCommand()
 {
   this->IncludeFileInPath = true;

+ 5 - 0
Source/cmFindFileCommand.h

@@ -3,8 +3,13 @@
 #ifndef cmFindFileCommand_h
 #define cmFindFileCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+
 #include "cmFindPathCommand.h"
 
+class cmCommand;
+
 /** \class cmFindFileCommand
  * \brief Define a command to search for an executable program.
  *

+ 9 - 2
Source/cmFindLibraryCommand.cxx

@@ -2,12 +2,19 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmFindLibraryCommand.h"
 
+#include <algorithm>
+#include <cmsys/RegularExpression.hxx>
+#include <set>
+#include <stdio.h>
+#include <string.h>
+
 #include "cmGlobalGenerator.h"
+#include "cmMakefile.h"
 #include "cmState.h"
+#include "cmStateTypes.h"
 #include "cmSystemTools.h"
-#include "cmVersion.h"
 
-#include <cmsys/Directory.hxx>
+class cmExecutionStatus;
 
 cmFindLibraryCommand::cmFindLibraryCommand()
 {

+ 7 - 0
Source/cmFindLibraryCommand.h

@@ -3,8 +3,15 @@
 #ifndef cmFindLibraryCommand_h
 #define cmFindLibraryCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmFindBase.h"
 
+class cmCommand;
+class cmExecutionStatus;
+
 /** \class cmFindLibraryCommand
  * \brief Define a command to search for a library.
  *

+ 21 - 14
Source/cmFindPackageCommand.cxx

@@ -2,26 +2,38 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmFindPackageCommand.h"
 
-#include "cmAlgorithms.h"
-#include "cmState.h"
-#include "cmVersion.h"
-
+#include <algorithm>
+#include <assert.h>
 #include <cmSystemTools.h>
 #include <cmsys/Directory.hxx>
-#include <cmsys/Encoding.hxx>
 #include <cmsys/FStream.hxx>
+#include <cmsys/Glob.hxx>
 #include <cmsys/RegularExpression.hxx>
+#include <cmsys/String.h>
+#include <functional>
+#include <iterator>
+#include <sstream>
+#include <stdio.h>
+#include <string.h>
+#include <utility>
 
-#ifdef CMAKE_BUILD_WITH_CMAKE
-#include "cmVariableWatch.h"
-#endif
+#include "cmAlgorithms.h"
+#include "cmMakefile.h"
+#include "cmSearchPath.h"
+#include "cmState.h"
+#include "cmStateTypes.h"
+#include "cmVersion.h"
+#include "cm_auto_ptr.hxx"
+#include "cmake.h"
 
 #if defined(__HAIKU__)
 #include <FindDirectory.h>
 #include <StorageDefs.h>
-#include <string.h>
 #endif
 
+class cmExecutionStatus;
+class cmFileList;
+
 cmFindPackageCommand::PathLabel cmFindPackageCommand::PathLabel::UserRegistry(
   "PACKAGE_REGISTRY");
 cmFindPackageCommand::PathLabel cmFindPackageCommand::PathLabel::Builds(
@@ -1549,11 +1561,6 @@ void cmFindPackageCommand::StoreVersionFound()
   this->Makefile->AddDefinition(ver + "_COUNT", buf);
 }
 
-#include <cm_auto_ptr.hxx>
-#include <cmsys/Glob.hxx>
-#include <cmsys/String.h>
-
-class cmFileList;
 class cmFileListGeneratorBase
 {
 public:

+ 10 - 1
Source/cmFindPackageCommand.h

@@ -3,9 +3,18 @@
 #ifndef cmFindPackageCommand_h
 #define cmFindPackageCommand_h
 
+#include <cmConfigure.h>
+#include <cm_kwiml.h>
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+
 #include "cmFindCommon.h"
 
-class cmFindPackageFileList;
+class cmCommand;
+class cmExecutionStatus;
+class cmSearchPath;
 
 /** \class cmFindPackageCommand
  * \brief Load settings from an external project.

+ 5 - 1
Source/cmFindPathCommand.cxx

@@ -2,9 +2,13 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmFindPathCommand.h"
 
+#include <cmsys/Glob.hxx>
+
+#include "cmMakefile.h"
+#include "cmStateTypes.h"
 #include "cmSystemTools.h"
 
-#include <cmsys/Glob.hxx>
+class cmExecutionStatus;
 
 cmFindPathCommand::cmFindPathCommand()
 {

+ 7 - 0
Source/cmFindPathCommand.h

@@ -3,8 +3,15 @@
 #ifndef cmFindPathCommand_h
 #define cmFindPathCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmFindBase.h"
 
+class cmCommand;
+class cmExecutionStatus;
+
 /** \class cmFindPathCommand
  * \brief Define a command to search for a library.
  *

+ 3 - 1
Source/cmFindProgramCommand.cxx

@@ -2,9 +2,11 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmFindProgramCommand.h"
 
+#include "cmMakefile.h"
+#include "cmStateTypes.h"
 #include "cmSystemTools.h"
 
-#include <stdlib.h>
+class cmExecutionStatus;
 
 #if defined(__APPLE__)
 #include <CoreFoundation/CoreFoundation.h>

+ 7 - 0
Source/cmFindProgramCommand.h

@@ -3,8 +3,15 @@
 #ifndef cmFindProgramCommand_h
 #define cmFindProgramCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmFindBase.h"
 
+class cmCommand;
+class cmExecutionStatus;
+
 /** \class cmFindProgramCommand
  * \brief Define a command to search for an executable program.
  *

+ 8 - 2
Source/cmForEachCommand.cxx

@@ -2,9 +2,15 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmForEachCommand.h"
 
-#include "cmSystemTools.h"
+#include <sstream>
+#include <stdio.h>
+#include <stdlib.h>
 
-#include <cm_auto_ptr.hxx>
+#include "cmExecutionStatus.h"
+#include "cmMakefile.h"
+#include "cmSystemTools.h"
+#include "cm_auto_ptr.hxx"
+#include "cmake.h"
 
 cmForEachFunctionBlocker::cmForEachFunctionBlocker(cmMakefile* mf)
   : Makefile(mf)

+ 7 - 1
Source/cmForEachCommand.h

@@ -3,11 +3,17 @@
 #ifndef cmForEachCommand_h
 #define cmForEachCommand_h
 
-#include "cmCommand.h"
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
 
+#include "cmCommand.h"
 #include "cmFunctionBlocker.h"
 #include "cmListFileCache.h"
 
+class cmExecutionStatus;
+class cmMakefile;
+
 class cmForEachFunctionBlocker : public cmFunctionBlocker
 {
 public:

+ 7 - 1
Source/cmFunctionCommand.cxx

@@ -2,9 +2,15 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmFunctionCommand.h"
 
+#include <algorithm>
+#include <sstream>
+
+#include "cmAlgorithms.h"
+#include "cmExecutionStatus.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
 #include "cmState.h"
 #include "cmSystemTools.h"
-#include "cmake.h"
 
 // define the class for function commands
 class cmFunctionHelperCommand : public cmCommand

+ 8 - 1
Source/cmFunctionCommand.h

@@ -3,9 +3,16 @@
 #ifndef cmFunctionCommand_h
 #define cmFunctionCommand_h
 
-#include "cmCommand.h"
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
 
+#include "cmCommand.h"
 #include "cmFunctionBlocker.h"
+#include "cmListFileCache.h"
+
+class cmExecutionStatus;
+class cmMakefile;
 
 class cmFunctionFunctionBlocker : public cmFunctionBlocker
 {

+ 6 - 2
Source/cmGetCMakePropertyCommand.cxx

@@ -2,11 +2,15 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmGetCMakePropertyCommand.h"
 
+#include <algorithm>
+#include <set>
+
 #include "cmAlgorithms.h"
 #include "cmGlobalGenerator.h"
+#include "cmMakefile.h"
 #include "cmState.h"
-#include "cmStateTypes.h"
-#include "cmake.h"
+
+class cmExecutionStatus;
 
 // cmGetCMakePropertyCommand
 bool cmGetCMakePropertyCommand::InitialPass(

+ 6 - 0
Source/cmGetCMakePropertyCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmGetCMakePropertyCommand_h
 #define cmGetCMakePropertyCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 class cmGetCMakePropertyCommand : public cmCommand
 {
 public:

+ 4 - 0
Source/cmGetDirectoryPropertyCommand.cxx

@@ -3,9 +3,13 @@
 #include "cmGetDirectoryPropertyCommand.h"
 
 #include "cmGlobalGenerator.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
 #include "cmSystemTools.h"
 #include "cmake.h"
 
+class cmExecutionStatus;
+
 // cmGetDirectoryPropertyCommand
 bool cmGetDirectoryPropertyCommand::InitialPass(
   std::vector<std::string> const& args, cmExecutionStatus&)

+ 6 - 0
Source/cmGetDirectoryPropertyCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmGetDirectoryPropertyCommand_h
 #define cmGetDirectoryPropertyCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 class cmGetDirectoryPropertyCommand : public cmCommand
 {
 public:

+ 4 - 0
Source/cmGetFilenameComponentCommand.cxx

@@ -2,8 +2,12 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmGetFilenameComponentCommand.h"
 
+#include "cmMakefile.h"
+#include "cmStateTypes.h"
 #include "cmSystemTools.h"
 
+class cmExecutionStatus;
+
 // cmGetFilenameComponentCommand
 bool cmGetFilenameComponentCommand::InitialPass(
   std::vector<std::string> const& args, cmExecutionStatus&)

+ 6 - 0
Source/cmGetFilenameComponentCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmGetFilenameComponentCommand_h
 #define cmGetFilenameComponentCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmGetFilenameComponentCommand
  * \brief Get a specific component of a filename.
  *

+ 12 - 1
Source/cmGetPropertyCommand.cxx

@@ -2,15 +2,26 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmGetPropertyCommand.h"
 
+#include <sstream>
+
 #include "cmGlobalGenerator.h"
+#include "cmInstalledFile.h"
+#include "cmListFileCache.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
+#include "cmProperty.h"
 #include "cmPropertyDefinition.h"
 #include "cmSourceFile.h"
 #include "cmState.h"
-#include "cmStateTypes.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
 #include "cmTargetPropertyComputer.h"
 #include "cmTest.h"
 #include "cmake.h"
 
+class cmExecutionStatus;
+class cmMessenger;
+
 cmGetPropertyCommand::cmGetPropertyCommand()
 {
   this->InfoType = OutValue;

+ 6 - 0
Source/cmGetPropertyCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmGetPropertyCommand_h
 #define cmGetPropertyCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 class cmGetPropertyCommand : public cmCommand
 {
 public:

+ 3 - 0
Source/cmGetSourceFilePropertyCommand.cxx

@@ -2,8 +2,11 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmGetSourceFilePropertyCommand.h"
 
+#include "cmMakefile.h"
 #include "cmSourceFile.h"
 
+class cmExecutionStatus;
+
 // cmSetSourceFilePropertyCommand
 bool cmGetSourceFilePropertyCommand::InitialPass(
   std::vector<std::string> const& args, cmExecutionStatus&)

+ 6 - 0
Source/cmGetSourceFilePropertyCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmGetSourceFilePropertyCommand_h
 #define cmGetSourceFilePropertyCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 class cmGetSourceFilePropertyCommand : public cmCommand
 {
 public:

+ 10 - 0
Source/cmGetTargetPropertyCommand.cxx

@@ -2,7 +2,17 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmGetTargetPropertyCommand.h"
 
+#include <sstream>
+
+#include "cmListFileCache.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
+#include "cmTarget.h"
 #include "cmTargetPropertyComputer.h"
+#include "cmake.h"
+
+class cmExecutionStatus;
+class cmMessenger;
 
 // cmSetTargetPropertyCommand
 bool cmGetTargetPropertyCommand::InitialPass(

+ 6 - 0
Source/cmGetTargetPropertyCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmGetTargetPropertyCommand_h
 #define cmGetTargetPropertyCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 class cmGetTargetPropertyCommand : public cmCommand
 {
 public:

+ 3 - 1
Source/cmGetTestPropertyCommand.cxx

@@ -2,8 +2,10 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmGetTestPropertyCommand.h"
 
+#include "cmMakefile.h"
 #include "cmTest.h"
-#include "cmake.h"
+
+class cmExecutionStatus;
 
 // cmGetTestPropertyCommand
 bool cmGetTestPropertyCommand::InitialPass(

+ 6 - 0
Source/cmGetTestPropertyCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmGetTestPropertyCommand_h
 #define cmGetTestPropertyCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 class cmGetTestPropertyCommand : public cmCommand
 {
 public:

+ 6 - 7
Source/cmIfCommand.cxx

@@ -2,15 +2,14 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmIfCommand.h"
 
+#include "cmConditionEvaluator.h"
+#include "cmExecutionStatus.h"
+#include "cmExpandedCommandArgument.h"
+#include "cmMakefile.h"
 #include "cmOutputConverter.h"
-#include "cmStringCommand.h"
 #include "cmSystemTools.h"
-
-#include "cmConditionEvaluator.h"
-
-#include <cmsys/RegularExpression.hxx>
-#include <list>
-#include <stdlib.h> // required for atof
+#include "cm_auto_ptr.hxx"
+#include "cmake.h"
 
 static std::string cmIfCommandError(
   std::vector<cmExpandedCommandArgument> const& args)

+ 9 - 1
Source/cmIfCommand.h

@@ -3,9 +3,17 @@
 #ifndef cmIfCommand_h
 #define cmIfCommand_h
 
-#include "cmCommand.h"
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
 
+#include "cmCommand.h"
 #include "cmFunctionBlocker.h"
+#include "cmListFileCache.h"
+
+class cmExecutionStatus;
+class cmExpandedCommandArgument;
+class cmMakefile;
 
 class cmIfFunctionBlocker : public cmFunctionBlocker
 {

+ 7 - 0
Source/cmIncludeCommand.cxx

@@ -2,8 +2,15 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmIncludeCommand.h"
 
+#include <sstream>
+
 #include "cmGlobalGenerator.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
 #include "cmSystemTools.h"
+#include "cmake.h"
+
+class cmExecutionStatus;
 
 // cmIncludeCommand
 bool cmIncludeCommand::InitialPass(std::vector<std::string> const& args,

+ 6 - 0
Source/cmIncludeCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmIncludeCommand_h
 #define cmIncludeCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmIncludeCommand
  * \brief cmIncludeCommand defines a list of distant
  *  files that can be "included" in the current list file.

+ 6 - 0
Source/cmIncludeDirectoryCommand.cxx

@@ -2,8 +2,14 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmIncludeDirectoryCommand.h"
 
+#include <algorithm>
+#include <set>
+
+#include "cmMakefile.h"
 #include "cmSystemTools.h"
 
+class cmExecutionStatus;
+
 // cmIncludeDirectoryCommand
 bool cmIncludeDirectoryCommand::InitialPass(
   std::vector<std::string> const& args, cmExecutionStatus&)

+ 6 - 0
Source/cmIncludeDirectoryCommand.h

@@ -3,8 +3,14 @@
 #ifndef cmIncludeDirectoryCommand_h
 #define cmIncludeDirectoryCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
 
+class cmExecutionStatus;
+
 /** \class cmIncludeDirectoryCommand
  * \brief Add include directories to the build.
  *

+ 3 - 0
Source/cmIncludeExternalMSProjectCommand.cxx

@@ -3,7 +3,10 @@
 #include "cmIncludeExternalMSProjectCommand.h"
 
 #ifdef _WIN32
+#include "cmMakefile.h"
+#include "cmStateTypes.h"
 #include "cmSystemTools.h"
+#include "cmTarget.h"
 #endif
 
 class cmExecutionStatus;

+ 4 - 0
Source/cmIncludeRegularExpressionCommand.cxx

@@ -2,6 +2,10 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmIncludeRegularExpressionCommand.h"
 
+#include "cmMakefile.h"
+
+class cmExecutionStatus;
+
 // cmIncludeRegularExpressionCommand
 bool cmIncludeRegularExpressionCommand::InitialPass(
   std::vector<std::string> const& args, cmExecutionStatus&)

Vissa filer visades inte eftersom för många filer har ändrats