Commit e81c323d authored by Daniel Pfeifer's avatar Daniel Pfeifer

Include necessary headers in commands

parent 2a567c68
Pipeline #32540 passed with stage
......@@ -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(
......
......@@ -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
......
......@@ -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(
......
......@@ -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.
*
......
......@@ -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&)
......
......@@ -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
*
......
......@@ -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(
......
......@@ -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
*
......
......@@ -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,
......
......@@ -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.
*
......
......@@ -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&)
......
......@@ -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.
*
......
......@@ -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&)
......
......@@ -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
*
......
......@@ -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,
......
......@@ -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.
*
......
......@@ -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,
......
......@@ -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
*
......
......@@ -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&)
......
......@@ -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
*
......
......@@ -7,7 +7,7 @@
#include "cmMakefile.h"
#include "cmPolicies.h"
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
class cmExecutionStatus;
......
......@@ -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"
......
......@@ -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,
......
......@@ -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
*
......
......@@ -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)
{
......
......@@ -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.
......
......@@ -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"
......
......@@ -3,6 +3,7 @@
#include "cmConditionEvaluator.h"
#include "cmAlgorithms.h"
#include "cmMakefile.h"
#include "cmOutputConverter.h"
#include "cmState.h"
#include "cmSystemTools.h"
......
......@@ -5,6 +5,8 @@
#include "cmCommand.h"
#include "cmExpandedCommandArgument.h"
#include "cmListFileCache.h"
#include "cmake.h"
#include <list>
......
......@@ -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,
......
......@@ -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
{
......
......@@ -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,
......
......@@ -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
*
......
......@@ -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"
......
......@@ -4,6 +4,7 @@
#define cmCoreTryCompile_h
#include "cmCommand.h"
#include "cmStateTypes.h"
/** \class cmCoreTryCompile
* \brief Base class for cmTryCompileCommand and cmTryRunCommand
......
......@@ -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"
......
......@@ -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&)
......
......@@ -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,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&)
{
......
......@@ -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
......
......@@ -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&)
......
......@@ -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.
*
......
......@@ -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&,
......
......@@ -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.
*
......
......@@ -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&)
{
......