Browse Source

Separate compilation for commands included in cmCommands

Daniel Pfeifer 9 years ago
parent
commit
f69e768d94
62 changed files with 449 additions and 32 deletions
  1. 5 10
      Source/CMakeLists.txt
  2. 4 0
      Source/cmAddCompileOptionsCommand.cxx
  3. 7 0
      Source/cmAddCompileOptionsCommand.h
  4. 9 1
      Source/cmAuxSourceDirectoryCommand.cxx
  5. 7 0
      Source/cmAuxSourceDirectoryCommand.h
  6. 8 0
      Source/cmBuildNameCommand.cxx
  7. 7 0
      Source/cmBuildNameCommand.h
  8. 7 0
      Source/cmCMakeHostSystemInformationCommand.cxx
  9. 10 1
      Source/cmCMakeHostSystemInformationCommand.h
  10. 4 2
      Source/cmCPluginAPI.cxx
  11. 2 0
      Source/cmElseIfCommand.cxx
  12. 8 1
      Source/cmElseIfCommand.h
  13. 13 5
      Source/cmExportCommand.cxx
  14. 7 1
      Source/cmExportCommand.h
  15. 10 2
      Source/cmExportLibraryDependenciesCommand.cxx
  16. 7 0
      Source/cmExportLibraryDependenciesCommand.h
  17. 8 0
      Source/cmFLTKWrapUICommand.cxx
  18. 8 0
      Source/cmFLTKWrapUICommand.h
  19. 6 0
      Source/cmIncludeExternalMSProjectCommand.cxx
  20. 7 0
      Source/cmIncludeExternalMSProjectCommand.h
  21. 8 0
      Source/cmInstallProgramsCommand.cxx
  22. 7 0
      Source/cmInstallProgramsCommand.h
  23. 4 0
      Source/cmLinkLibrariesCommand.cxx
  24. 7 0
      Source/cmLinkLibrariesCommand.h
  25. 7 1
      Source/cmLoadCacheCommand.cxx
  26. 8 0
      Source/cmLoadCacheCommand.h
  27. 9 2
      Source/cmLoadCommandCommand.cxx
  28. 7 0
      Source/cmLoadCommandCommand.h
  29. 11 1
      Source/cmOutputRequiredFilesCommand.cxx
  30. 8 0
      Source/cmOutputRequiredFilesCommand.h
  31. 7 0
      Source/cmQTWrapCPPCommand.cxx
  32. 6 1
      Source/cmQTWrapCPPCommand.h
  33. 7 0
      Source/cmQTWrapUICommand.cxx
  34. 6 1
      Source/cmQTWrapUICommand.h
  35. 5 0
      Source/cmRemoveCommand.cxx
  36. 7 0
      Source/cmRemoveCommand.h
  37. 4 0
      Source/cmRemoveDefinitionsCommand.cxx
  38. 7 0
      Source/cmRemoveDefinitionsCommand.h
  39. 8 0
      Source/cmSourceGroupCommand.cxx
  40. 7 0
      Source/cmSourceGroupCommand.h
  41. 4 0
      Source/cmSubdirDependsCommand.cxx
  42. 7 0
      Source/cmSubdirDependsCommand.h
  43. 7 0
      Source/cmTargetCompileDefinitionsCommand.cxx
  44. 9 0
      Source/cmTargetCompileDefinitionsCommand.h
  45. 8 0
      Source/cmTargetCompileFeaturesCommand.cxx
  46. 9 0
      Source/cmTargetCompileFeaturesCommand.h
  47. 9 0
      Source/cmTargetCompileOptionsCommand.cxx
  48. 9 0
      Source/cmTargetCompileOptionsCommand.h
  49. 10 0
      Source/cmTargetIncludeDirectoriesCommand.cxx
  50. 9 0
      Source/cmTargetIncludeDirectoriesCommand.h
  51. 9 1
      Source/cmTargetSourcesCommand.cxx
  52. 9 0
      Source/cmTargetSourcesCommand.h
  53. 5 2
      Source/cmUseMangledMesaCommand.cxx
  54. 7 0
      Source/cmUseMangledMesaCommand.h
  55. 8 0
      Source/cmUtilitySourceCommand.cxx
  56. 7 0
      Source/cmUtilitySourceCommand.h
  57. 5 0
      Source/cmVariableRequiresCommand.cxx
  58. 7 0
      Source/cmVariableRequiresCommand.h
  59. 7 0
      Source/cmVariableWatchCommand.cxx
  60. 8 0
      Source/cmVariableWatchCommand.h
  61. 5 0
      Source/cmWriteFileCommand.cxx
  62. 7 0
      Source/cmWriteFileCommand.h

+ 5 - 10
Source/CMakeLists.txt

@@ -401,9 +401,8 @@ set(SRCS
   cm_codecvt.cxx
   )
 
-set(COMMAND_INCLUDES "#include \"cmTargetPropCommandBase.cxx\"\n")
-list(APPEND SRCS cmTargetPropCommandBase.cxx)
-set_property(SOURCE cmTargetPropCommandBase.cxx PROPERTY HEADER_FILE_ONLY ON)
+set(COMMAND_INCLUDES "#include \"cmTargetPropCommandBase.h\"\n")
+list(APPEND SRCS cmTargetPropCommandBase.cxx cmTargetPropCommandBase.h)
 set(NEW_COMMANDS "")
 foreach(command_file
     cmAddCompileOptionsCommand
@@ -418,6 +417,7 @@ foreach(command_file
     cmInstallProgramsCommand
     cmLinkLibrariesCommand
     cmLoadCacheCommand
+    cmLoadCommandCommand
     cmOutputRequiredFilesCommand
     cmQTWrapCPPCommand
     cmQTWrapUICommand
@@ -435,15 +435,10 @@ foreach(command_file
     cmVariableRequiresCommand
     cmVariableWatchCommand
     cmWriteFileCommand
-    # This one must be last because it includes windows.h and
-    # windows.h #defines GetCurrentDirectory which is a member
-    # of cmMakefile
-    cmLoadCommandCommand
     )
-  set(COMMAND_INCLUDES "${COMMAND_INCLUDES}#include \"${command_file}.cxx\"\n")
+  set(COMMAND_INCLUDES "${COMMAND_INCLUDES}#include \"${command_file}.h\"\n")
   set(NEW_COMMANDS "${NEW_COMMANDS}commands.push_back(new ${command_file});\n")
-  list(APPEND SRCS ${command_file}.cxx)
-  set_property(SOURCE ${command_file}.cxx PROPERTY HEADER_FILE_ONLY ON)
+  list(APPEND SRCS ${command_file}.cxx ${command_file}.h)
 endforeach()
 configure_file(cmCommands.cxx.in ${CMAKE_CURRENT_BINARY_DIR}/cmCommands.cxx @ONLY)
 

+ 4 - 0
Source/cmAddCompileOptionsCommand.cxx

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

+ 7 - 0
Source/cmAddCompileOptionsCommand.h

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

+ 9 - 1
Source/cmAuxSourceDirectoryCommand.cxx

@@ -2,9 +2,17 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmAuxSourceDirectoryCommand.h"
 
+#include <algorithm>
+#include <cmsys/Directory.hxx>
+#include <stddef.h>
+
+#include "cmAlgorithms.h"
+#include "cmMakefile.h"
 #include "cmSourceFile.h"
+#include "cmSystemTools.h"
+#include "cmake.h"
 
-#include <cmsys/Directory.hxx>
+class cmExecutionStatus;
 
 // cmAuxSourceDirectoryCommand
 bool cmAuxSourceDirectoryCommand::InitialPass(

+ 7 - 0
Source/cmAuxSourceDirectoryCommand.h

@@ -3,7 +3,14 @@
 #ifndef cmAuxSourceDirectoryCommand_h
 #define cmAuxSourceDirectoryCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmTypeMacro.h"
+
+class cmExecutionStatus;
 
 /** \class cmAuxSourceDirectoryCommand
  * \brief Specify auxiliary source code directories.

+ 8 - 0
Source/cmBuildNameCommand.cxx

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

+ 7 - 0
Source/cmBuildNameCommand.h

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

+ 7 - 0
Source/cmCMakeHostSystemInformationCommand.cxx

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

+ 10 - 1
Source/cmCMakeHostSystemInformationCommand.h

@@ -3,9 +3,18 @@
 #ifndef cmCMakeHostSystemInformationCommand_h
 #define cmCMakeHostSystemInformationCommand_h
 
+#include <cmConfigure.h>
+#include <stddef.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmTypeMacro.h"
 
-#include <cmsys/SystemInformation.hxx>
+class cmExecutionStatus;
+namespace cmsys {
+class SystemInformation;
+} // namespace cmsys
 
 /** \class cmCMakeHostSystemInformationCommand
  * \brief Query host system specific information

+ 4 - 2
Source/cmCPluginAPI.cxx

@@ -7,10 +7,12 @@
 
 #include "cmCPluginAPI.h"
 
+#include "cmExecutionStatus.h"
+#include "cmGlobalGenerator.h"
 #include "cmMakefile.h"
-#include "cmVersion.h"
-
 #include "cmSourceFile.h"
+#include "cmState.h"
+#include "cmVersion.h"
 
 #include <stdlib.h>
 

+ 2 - 0
Source/cmElseIfCommand.cxx

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

+ 8 - 1
Source/cmElseIfCommand.h

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

+ 13 - 5
Source/cmExportCommand.cxx

@@ -2,15 +2,22 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmExportCommand.h"
 
-#include "cmGeneratedFileStream.h"
-#include "cmGlobalGenerator.h"
-#include "cmake.h"
-
-#include <cmsys/Encoding.hxx>
 #include <cmsys/RegularExpression.hxx>
+#include <map>
+#include <sstream>
 
 #include "cmExportBuildAndroidMKGenerator.h"
 #include "cmExportBuildFileGenerator.h"
+#include "cmExportSetMap.h"
+#include "cmGeneratedFileStream.h"
+#include "cmGlobalGenerator.h"
+#include "cmMakefile.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
+#include "cmake.h"
+
+class cmExecutionStatus;
 
 #if defined(__HAIKU__)
 #include <FindDirectory.h>
@@ -271,6 +278,7 @@ bool cmExportCommand::HandlePackage(std::vector<std::string> const& args)
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
 #include <windows.h>
+
 #undef GetCurrentDirectory
 void cmExportCommand::ReportRegistryError(std::string const& msg,
                                           std::string const& key, long err)

+ 7 - 1
Source/cmExportCommand.h

@@ -3,9 +3,15 @@
 #ifndef cmExportCommand_h
 #define cmExportCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmCommandArgumentsHelper.h"
+#include "cmTypeMacro.h"
 
-class cmExportBuildFileGenerator;
+class cmExecutionStatus;
 class cmExportSet;
 
 /** \class cmExportLibraryDependenciesCommand

+ 10 - 2
Source/cmExportLibraryDependenciesCommand.cxx

@@ -2,12 +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 "cmGeneratedFileStream.h"
 #include "cmGlobalGenerator.h"
-#include "cmVersion.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
+#include "cmTargetLinkLibraryType.h"
 #include "cmake.h"
 
-#include <cm_auto_ptr.hxx>
+class cmExecutionStatus;
 
 bool cmExportLibraryDependenciesCommand::InitialPass(
   std::vector<std::string> const& args, cmExecutionStatus&)

+ 7 - 0
Source/cmExportLibraryDependenciesCommand.h

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

+ 8 - 0
Source/cmFLTKWrapUICommand.cxx

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

+ 8 - 0
Source/cmFLTKWrapUICommand.h

@@ -3,7 +3,15 @@
 #ifndef cmFLTKWrapUICommand_h
 #define cmFLTKWrapUICommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmTypeMacro.h"
+
+class cmExecutionStatus;
+class cmSourceFile;
 
 /** \class cmFLTKWrapUICommand
  * \brief Create .h and .cxx files rules for FLTK user interfaces files

+ 6 - 0
Source/cmIncludeExternalMSProjectCommand.cxx

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

+ 7 - 0
Source/cmIncludeExternalMSProjectCommand.h

@@ -3,7 +3,14 @@
 #ifndef cmIncludeExternalMSProjectCommand_h
 #define cmIncludeExternalMSProjectCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmTypeMacro.h"
+
+class cmExecutionStatus;
 
 /** \class cmIncludeExternalMSProjectCommand
  * \brief Specify an external MS project file for inclusion in the workspace.

+ 8 - 0
Source/cmInstallProgramsCommand.cxx

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

+ 7 - 0
Source/cmInstallProgramsCommand.h

@@ -3,7 +3,14 @@
 #ifndef cmInstallProgramsCommand_h
 #define cmInstallProgramsCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmTypeMacro.h"
+
+class cmExecutionStatus;
 
 /** \class cmInstallProgramsCommand
  * \brief Specifies where to install some programs

+ 4 - 0
Source/cmLinkLibrariesCommand.cxx

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

+ 7 - 0
Source/cmLinkLibrariesCommand.h

@@ -3,7 +3,14 @@
 #ifndef cmLinkLibrariesCommand_h
 #define cmLinkLibrariesCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmTypeMacro.h"
+
+class cmExecutionStatus;
 
 /** \class cmLinkLibrariesCommand
  * \brief Specify a list of libraries to link into executables.

+ 7 - 1
Source/cmLoadCacheCommand.cxx

@@ -3,7 +3,13 @@
 #include "cmLoadCacheCommand.h"
 
 #include <cmsys/FStream.hxx>
-#include <cmsys/RegularExpression.hxx>
+
+#include "cmMakefile.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
+#include "cmake.h"
+
+class cmExecutionStatus;
 
 // cmLoadCacheCommand
 bool cmLoadCacheCommand::InitialPass(std::vector<std::string> const& args,

+ 8 - 0
Source/cmLoadCacheCommand.h

@@ -3,7 +3,15 @@
 #ifndef cmLoadCacheCommand_h
 #define cmLoadCacheCommand_h
 
+#include <cmConfigure.h>
+#include <set>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmTypeMacro.h"
+
+class cmExecutionStatus;
 
 /** \class cmLoadCacheCommand
  * \brief load a cache file

+ 9 - 2
Source/cmLoadCommandCommand.cxx

@@ -5,16 +5,23 @@
 #include "cmCPluginAPI.cxx"
 #include "cmCPluginAPI.h"
 #include "cmDynamicLoader.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
 
-#include <cmsys/DynamicLoader.hxx>
+class cmExecutionStatus;
 
+#include <signal.h>
+#include <sstream>
+#include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
 #ifdef __QNX__
 #include <malloc.h> /* for malloc/free on QNX */
 #endif
 
-#include <signal.h>
 extern "C" void TrapsForSignalsCFunction(int sig);
 
 // a class for loadabple commands

+ 7 - 0
Source/cmLoadCommandCommand.h

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

+ 11 - 1
Source/cmOutputRequiredFilesCommand.cxx

@@ -2,8 +2,18 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmOutputRequiredFilesCommand.h"
 
-#include "cmAlgorithms.h"
 #include <cmsys/FStream.hxx>
+#include <cmsys/RegularExpression.hxx>
+
+#include "cmAlgorithms.h"
+#include "cmGeneratorExpression.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
+#include "cmSourceFile.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
+
+class cmExecutionStatus;
 
 /** \class cmDependInformation
  * \brief Store dependency information for a single source file.

+ 8 - 0
Source/cmOutputRequiredFilesCommand.h

@@ -3,9 +3,17 @@
 #ifndef cmOutputRequiredFilesCommand_h
 #define cmOutputRequiredFilesCommand_h
 
+#include <cmConfigure.h>
+#include <set>
+#include <stdio.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmTypeMacro.h"
 
 class cmDependInformation;
+class cmExecutionStatus;
 
 class cmOutputRequiredFilesCommand : public cmCommand
 {

+ 7 - 0
Source/cmQTWrapCPPCommand.cxx

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

+ 6 - 1
Source/cmQTWrapCPPCommand.h

@@ -3,9 +3,14 @@
 #ifndef cmQTWrapCPPCommand_h
 #define cmQTWrapCPPCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmTypeMacro.h"
 
-#include "cmSourceFile.h"
+class cmExecutionStatus;
 
 /** \class cmQTWrapCPPCommand
  * \brief Create moc file rules for Qt classes

+ 7 - 0
Source/cmQTWrapUICommand.cxx

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

+ 6 - 1
Source/cmQTWrapUICommand.h

@@ -3,9 +3,14 @@
 #ifndef cmQTWrapUICommand_h
 #define cmQTWrapUICommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmTypeMacro.h"
 
-#include "cmSourceFile.h"
+class cmExecutionStatus;
 
 /** \class cmQTWrapUICommand
  * \brief Create .h and .cxx files rules for Qt user interfaces files

+ 5 - 0
Source/cmRemoveCommand.cxx

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

+ 7 - 0
Source/cmRemoveCommand.h

@@ -3,7 +3,14 @@
 #ifndef cmRemoveCommand_h
 #define cmRemoveCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmTypeMacro.h"
+
+class cmExecutionStatus;
 
 /** \class cmRemoveCommand
  * \brief remove command

+ 4 - 0
Source/cmRemoveDefinitionsCommand.cxx

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

+ 7 - 0
Source/cmRemoveDefinitionsCommand.h

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

+ 8 - 0
Source/cmSourceGroupCommand.cxx

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

+ 7 - 0
Source/cmSourceGroupCommand.h

@@ -3,7 +3,14 @@
 #ifndef cmSourceGroupCommand_h
 #define cmSourceGroupCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmTypeMacro.h"
+
+class cmExecutionStatus;
 
 /** \class cmSourceGroupCommand
  * \brief Adds a cmSourceGroup to the cmMakefile.

+ 4 - 0
Source/cmSubdirDependsCommand.cxx

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

+ 7 - 0
Source/cmSubdirDependsCommand.h

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

+ 7 - 0
Source/cmTargetCompileDefinitionsCommand.cxx

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

+ 9 - 0
Source/cmTargetCompileDefinitionsCommand.h

@@ -3,7 +3,16 @@
 #ifndef cmTargetCompileDefinitionsCommand_h
 #define cmTargetCompileDefinitionsCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmTargetPropCommandBase.h"
+#include "cmTypeMacro.h"
+
+class cmCommand;
+class cmExecutionStatus;
+class cmTarget;
 
 class cmTargetCompileDefinitionsCommand : public cmTargetPropCommandBase
 {

+ 8 - 0
Source/cmTargetCompileFeaturesCommand.cxx

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

+ 9 - 0
Source/cmTargetCompileFeaturesCommand.h

@@ -3,7 +3,16 @@
 #ifndef cmTargetCompileFeaturesCommand_h
 #define cmTargetCompileFeaturesCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmTargetPropCommandBase.h"
+#include "cmTypeMacro.h"
+
+class cmCommand;
+class cmExecutionStatus;
+class cmTarget;
 
 class cmTargetCompileFeaturesCommand : public cmTargetPropCommandBase
 {

+ 9 - 0
Source/cmTargetCompileOptionsCommand.cxx

@@ -2,7 +2,16 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmTargetCompileOptionsCommand.h"
 
+#include <algorithm>
+#include <sstream>
+
 #include "cmAlgorithms.h"
+#include "cmListFileCache.h"
+#include "cmMakefile.h"
+#include "cmTarget.h"
+#include "cmake.h"
+
+class cmExecutionStatus;
 
 bool cmTargetCompileOptionsCommand::InitialPass(
   std::vector<std::string> const& args, cmExecutionStatus&)

+ 9 - 0
Source/cmTargetCompileOptionsCommand.h

@@ -3,7 +3,16 @@
 #ifndef cmTargetCompileOptionsCommand_h
 #define cmTargetCompileOptionsCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmTargetPropCommandBase.h"
+#include "cmTypeMacro.h"
+
+class cmCommand;
+class cmExecutionStatus;
+class cmTarget;
 
 class cmTargetCompileOptionsCommand : public cmTargetPropCommandBase
 {

+ 10 - 0
Source/cmTargetIncludeDirectoriesCommand.cxx

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

+ 9 - 0
Source/cmTargetIncludeDirectoriesCommand.h

@@ -3,7 +3,16 @@
 #ifndef cmTargetIncludeDirectoriesCommand_h
 #define cmTargetIncludeDirectoriesCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmTargetPropCommandBase.h"
+#include "cmTypeMacro.h"
+
+class cmCommand;
+class cmExecutionStatus;
+class cmTarget;
 
 class cmTargetIncludeDirectoriesCommand : public cmTargetPropCommandBase
 {

+ 9 - 1
Source/cmTargetSourcesCommand.cxx

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

+ 9 - 0
Source/cmTargetSourcesCommand.h

@@ -3,7 +3,16 @@
 #ifndef cmTargetSourcesCommand_h
 #define cmTargetSourcesCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmTargetPropCommandBase.h"
+#include "cmTypeMacro.h"
+
+class cmCommand;
+class cmExecutionStatus;
+class cmTarget;
 
 class cmTargetSourcesCommand : public cmTargetPropCommandBase
 {

+ 5 - 2
Source/cmUseMangledMesaCommand.cxx

@@ -2,11 +2,14 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmUseMangledMesaCommand.h"
 
-#include "cmSystemTools.h"
-
 #include <cmsys/FStream.hxx>
 #include <cmsys/RegularExpression.hxx>
 
+#include "cmPolicies.h"
+#include "cmSystemTools.h"
+
+class cmExecutionStatus;
+
 bool cmUseMangledMesaCommand::InitialPass(std::vector<std::string> const& args,
                                           cmExecutionStatus&)
 {

+ 7 - 0
Source/cmUseMangledMesaCommand.h

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

+ 8 - 0
Source/cmUtilitySourceCommand.cxx

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

+ 7 - 0
Source/cmUtilitySourceCommand.h

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

+ 5 - 0
Source/cmVariableRequiresCommand.cxx

@@ -2,7 +2,12 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmVariableRequiresCommand.h"
 
+#include "cmMakefile.h"
+#include "cmPolicies.h"
 #include "cmState.h"
+#include "cmSystemTools.h"
+
+class cmExecutionStatus;
 
 // cmLibraryCommand
 bool cmVariableRequiresCommand::InitialPass(

+ 7 - 0
Source/cmVariableRequiresCommand.h

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

+ 7 - 0
Source/cmVariableWatchCommand.cxx

@@ -2,7 +2,14 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmVariableWatchCommand.h"
 
+#include <sstream>
+
+#include "cmExecutionStatus.h"
+#include "cmListFileCache.h"
+#include "cmMakefile.h"
+#include "cmSystemTools.h"
 #include "cmVariableWatch.h"
+#include "cmake.h"
 
 struct cmVariableWatchCallbackData
 {

+ 8 - 0
Source/cmVariableWatchCommand.h

@@ -3,7 +3,15 @@
 #ifndef cmVariableWatchCommand_h
 #define cmVariableWatchCommand_h
 
+#include <cmConfigure.h>
+#include <set>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmTypeMacro.h"
+
+class cmExecutionStatus;
 
 /** \class cmVariableWatchCommand
  * \brief Watch when the variable changes and invoke command

+ 5 - 0
Source/cmWriteFileCommand.cxx

@@ -8,6 +8,11 @@
 // include sys/stat.h after sys/types.h
 #include <sys/stat.h>
 
+#include "cmMakefile.h"
+#include "cmSystemTools.h"
+
+class cmExecutionStatus;
+
 // cmLibraryCommand
 bool cmWriteFileCommand::InitialPass(std::vector<std::string> const& args,
                                      cmExecutionStatus&)

+ 7 - 0
Source/cmWriteFileCommand.h

@@ -3,7 +3,14 @@
 #ifndef cmWriteFileCommand_h
 #define cmWriteFileCommand_h
 
+#include <cmConfigure.h>
+#include <string>
+#include <vector>
+
 #include "cmCommand.h"
+#include "cmTypeMacro.h"
+
+class cmExecutionStatus;
 
 /** \class cmWriteFileCommand
  * \brief Writes a message to a file