fix a batch of include-what-you-use violations

This commit is contained in:
Daniel Pfeifer 2016-08-24 00:29:15 +02:00
parent 797f7ad87d
commit 5cbb548807
33 changed files with 192 additions and 67 deletions

View File

@ -14,6 +14,9 @@
#include "cmCTestVC.h"
#include <map>
#include <vector>
/** \class cmCTestCVS
* \brief Interaction with cvs command-line tool
*

View File

@ -15,6 +15,8 @@
#include "cmCTestVC.h"
#include <list>
#include <map>
#include <vector>
/** \class cmCTestGlobalVC
* \brief Base class for handling globally-versioned trees

View File

@ -11,6 +11,8 @@
============================================================================*/
#include "cmBreakCommand.h"
#include "cmExecutionStatus.h"
// cmBreakCommand
bool cmBreakCommand::InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status)

View File

@ -11,38 +11,44 @@
============================================================================*/
#include "cmMakefile.h"
#include "cmAlgorithms.h"
#include "cmCommand.h"
#include "cmCommandArgumentParserHelper.h"
#include "cmCommands.h"
#include "cmCustomCommand.h"
#include "cmCustomCommandLines.h"
#include "cmExecutionStatus.h"
#include "cmExpandedCommandArgument.h"
#include "cmFileLockPool.h"
#include "cmFunctionBlocker.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorExpressionEvaluationFile.h"
#include "cmGlobalGenerator.h"
#include "cmInstallGenerator.h"
#include "cmListFileCache.h"
#include "cmOutputConverter.h"
#include "cmSourceFile.h"
#include "cmSourceFileLocation.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmTest.h"
#include "cmTestGenerator.h"
#include "cmVersion.h"
#include "cmake.h"
#ifdef CMAKE_BUILD_WITH_CMAKE
#include "cmVariableWatch.h"
#endif
#include "cmAlgorithms.h"
#include "cmInstallGenerator.h"
#include "cmTestGenerator.h"
#include "cmake.h"
#include <stdlib.h> // required for atoi
#include <cm_auto_ptr.hxx>
#include <cmsys/FStream.hxx>
#include <cmsys/RegularExpression.hxx>
#include <cmsys/SystemTools.hxx>
#include <algorithm>
#include <assert.h>
#include <ctype.h> // for isspace
#include <list>
#include <ctype.h>
#include <sstream>
#include <stdlib.h>
#include <string.h>
#include <utility>
// default is not to be building executables
cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator,

View File

@ -12,16 +12,15 @@
#ifndef cmMakefile_h
#define cmMakefile_h
#include "cmStandardIncludes.h"
#include <cmConfigure.h>
#include "cmAlgorithms.h"
#include "cmExecutionStatus.h"
#include "cmExpandedCommandArgument.h"
#include "cmListFileCache.h"
#include "cmNewLineStyle.h"
#include "cmPolicies.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
#include "cmTargetLinkLibraryType.h"
#include "cmake.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
@ -30,6 +29,13 @@
#include <cm_auto_ptr.hxx>
#include <cmsys/RegularExpression.hxx>
#include <map>
#include <set>
#include <stack>
#include <string>
#include <vector>
#if defined(CMAKE_BUILD_WITH_CMAKE)
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
#include <unordered_map>
@ -38,20 +44,20 @@
#endif
#endif
#include <stack>
class cmFunctionBlocker;
class cmCommand;
class cmCompiledGeneratorExpression;
class cmCustomCommandLines;
class cmExecutionStatus;
class cmExpandedCommandArgument;
class cmExportBuildFileGenerator;
class cmFunctionBlocker;
class cmGeneratorExpressionEvaluationFile;
class cmGlobalGenerator;
class cmInstallGenerator;
class cmSourceFile;
class cmTest;
class cmTestGenerator;
class cmVariableWatch;
class cmake;
class cmMakefileCall;
class cmCMakePolicyCommand;
class cmGeneratorExpressionEvaluationFile;
class cmExportBuildFileGenerator;
/** \class cmMakefile
* \brief Process the input CMakeLists.txt file.

View File

@ -12,12 +12,20 @@
#include "cmMakefileExecutableTargetGenerator.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalUnixMakefileGenerator3.h"
#include "cmLocalGenerator.h"
#include "cmLocalUnixMakefileGenerator3.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
#include "cmOSXBundleGenerator.h"
#include "cmOutputConverter.h"
#include "cmSystemTools.h"
#include "cmake.h"
#include <sstream>
#include <string>
#include <vector>
cmMakefileExecutableTargetGenerator::cmMakefileExecutableTargetGenerator(
cmGeneratorTarget* target)
: cmMakefileTargetGenerator(target)

View File

@ -12,8 +12,12 @@
#ifndef cmMakefileExecutableTargetGenerator_h
#define cmMakefileExecutableTargetGenerator_h
#include <cmConfigure.h>
#include "cmMakefileTargetGenerator.h"
class cmGeneratorTarget;
class cmMakefileExecutableTargetGenerator : public cmMakefileTargetGenerator
{
public:

View File

@ -11,14 +11,21 @@
============================================================================*/
#include "cmMakefileLibraryTargetGenerator.h"
#include "cmAlgorithms.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalUnixMakefileGenerator3.h"
#include "cmLocalGenerator.h"
#include "cmLocalUnixMakefileGenerator3.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
#include "cmOSXBundleGenerator.h"
#include "cmOutputConverter.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmake.h"
#include <sstream>
#include <vector>
cmMakefileLibraryTargetGenerator::cmMakefileLibraryTargetGenerator(
cmGeneratorTarget* target)
: cmMakefileTargetGenerator(target)

View File

@ -12,8 +12,14 @@
#ifndef cmMakefileLibraryTargetGenerator_h
#define cmMakefileLibraryTargetGenerator_h
#include <cmConfigure.h>
#include "cmMakefileTargetGenerator.h"
#include <string>
class cmGeneratorTarget;
class cmMakefileLibraryTargetGenerator : public cmMakefileTargetGenerator
{
public:

View File

@ -13,23 +13,30 @@
#include "cmAlgorithms.h"
#include "cmComputeLinkInformation.h"
#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmGlobalUnixMakefileGenerator3.h"
#include "cmLocalGenerator.h"
#include "cmLocalUnixMakefileGenerator3.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
#include "cmState.h"
#include "cmake.h"
#include "cmMakefileExecutableTargetGenerator.h"
#include "cmMakefileLibraryTargetGenerator.h"
#include "cmMakefileUtilityTargetGenerator.h"
#include "cmOutputConverter.h"
#include "cmSourceFile.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cm_auto_ptr.hxx"
#include "cmake.h"
#include <algorithm>
#include <ctype.h>
#include <sstream>
#include <stdio.h>
#include <utility>
#ifndef _WIN32
#include <unistd.h>

View File

@ -12,18 +12,22 @@
#ifndef cmMakefileTargetGenerator_h
#define cmMakefileTargetGenerator_h
#include "cmCommonTargetGenerator.h"
#include <cmConfigure.h>
#include "cmCommonTargetGenerator.h"
#include "cmLocalUnixMakefileGenerator3.h"
#include "cmOSXBundleGenerator.h"
#include <iosfwd>
#include <map>
#include <set>
#include <string>
#include <vector>
class cmCustomCommandGenerator;
class cmDepends;
class cmGeneratorTarget;
class cmGeneratedFileStream;
class cmGeneratorTarget;
class cmGlobalUnixMakefileGenerator3;
class cmLocalUnixMakefileGenerator3;
class cmMakefile;
class cmSourceFile;
/** \class cmMakefileTargetGenerator

View File

@ -12,10 +12,16 @@
#include "cmMakefileUtilityTargetGenerator.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalUnixMakefileGenerator3.h"
#include "cmLocalUnixMakefileGenerator3.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
#include "cmOSXBundleGenerator.h"
#include "cmOutputConverter.h"
#include <ostream>
#include <string>
#include <vector>
cmMakefileUtilityTargetGenerator::cmMakefileUtilityTargetGenerator(
cmGeneratorTarget* target)

View File

@ -12,8 +12,12 @@
#ifndef cmMakefileUtilityTargetGenerator_h
#define cmMakefileUtilityTargetGenerator_h
#include <cmConfigure.h>
#include "cmMakefileTargetGenerator.h"
class cmGeneratorTarget;
class cmMakefileUtilityTargetGenerator : public cmMakefileTargetGenerator
{
public:

View File

@ -11,6 +11,8 @@
============================================================================*/
#include "cmNewLineStyle.h"
#include <stddef.h>
cmNewLineStyle::cmNewLineStyle()
: NewLineStyle(Invalid)
{

View File

@ -12,7 +12,10 @@
#ifndef cmNewLineStyle_h
#define cmNewLineStyle_h
#include "cmStandardIncludes.h"
#include <cmConfigure.h> // IWYU pragma: keep
#include <string>
#include <vector>
class cmNewLineStyle
{

View File

@ -13,18 +13,30 @@
#include "cmNinjaNormalTargetGenerator.h"
#include "cmAlgorithms.h"
#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalNinjaGenerator.h"
#include "cmLocalGenerator.h"
#include "cmLocalNinjaGenerator.h"
#include "cmMakefile.h"
#include "cmNinjaTypes.h"
#include "cmOSXBundleGenerator.h"
#include "cmOutputConverter.h"
#include "cmSourceFile.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmake.h"
#include <algorithm>
#include <assert.h>
#include <iterator>
#include <limits>
#include <map>
#include <set>
#include <sstream>
#include <stddef.h>
#ifndef _WIN32
#include <unistd.h>

View File

@ -13,14 +13,13 @@
#ifndef cmNinjaNormalTargetGenerator_h
#define cmNinjaNormalTargetGenerator_h
#include <cmConfigure.h>
#include "cmNinjaTargetGenerator.h"
#include "cmNinjaTypes.h"
#include <string>
#include <vector>
#include <set>
class cmSourceFile;
class cmOSXBundleGenerator;
class cmGeneratorTarget;
class cmNinjaNormalTargetGenerator : public cmNinjaTargetGenerator

View File

@ -18,14 +18,22 @@
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalNinjaGenerator.h"
#include "cmLocalGenerator.h"
#include "cmLocalNinjaGenerator.h"
#include "cmMakefile.h"
#include "cmNinjaNormalTargetGenerator.h"
#include "cmNinjaUtilityTargetGenerator.h"
#include "cmOutputConverter.h"
#include "cmSourceFile.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmake.h"
#include <algorithm>
#include <iterator>
#include <map>
#include <sstream>
#include <string.h>
cmNinjaTargetGenerator* cmNinjaTargetGenerator::New(cmGeneratorTarget* target)
{

View File

@ -13,19 +13,23 @@
#ifndef cmNinjaTargetGenerator_h
#define cmNinjaTargetGenerator_h
#include "cmCommonTargetGenerator.h"
#include <cmConfigure.h>
#include "cmCommonTargetGenerator.h"
#include "cmGlobalNinjaGenerator.h"
#include "cmLocalNinjaGenerator.h"
#include "cmNinjaTypes.h"
#include "cmOSXBundleGenerator.h"
class cmTarget;
#include <set>
#include <string>
#include <vector>
class cmCustomCommand;
class cmGeneratedFileStream;
class cmGeneratorTarget;
class cmLocalNinjaGenerator;
class cmMakefile;
class cmSourceFile;
class cmCustomCommand;
class cmNinjaTargetGenerator : public cmCommonTargetGenerator
{

View File

@ -15,9 +15,21 @@
#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalNinjaGenerator.h"
#include "cmLocalNinjaGenerator.h"
#include "cmMakefile.h"
#include "cmNinjaTypes.h"
#include "cmOutputConverter.h"
#include "cmSourceFile.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmake.h"
#include <algorithm>
#include <iterator>
#include <string>
#include <vector>
cmNinjaUtilityTargetGenerator::cmNinjaUtilityTargetGenerator(
cmGeneratorTarget* target)

View File

@ -13,11 +13,11 @@
#ifndef cmNinjaUtilityTargetGenerator_h
#define cmNinjaUtilityTargetGenerator_h
#include <cmConfigure.h>
#include "cmNinjaTargetGenerator.h"
#include "cmNinjaTypes.h"
class cmSourceFile;
class cmGeneratorTarget;
class cmNinjaUtilityTargetGenerator : public cmNinjaTargetGenerator
{

View File

@ -2,14 +2,18 @@
#include "cmAlgorithms.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
#include "cmVersionMacros.h"
#include "cmake.h"
#include <assert.h>
#include <cmConfigure.h>
#include <ctype.h>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <vector>
static bool stringToId(const char* input, cmPolicies::PolicyID& pid)
{

View File

@ -12,12 +12,12 @@
#ifndef cmPolicies_h
#define cmPolicies_h
#include "cmStandardIncludes.h"
#include <cmConfigure.h> // IWYU pragma: keep
#include <bitset>
#include <string>
class cmMakefile;
class cmPolicy;
#define CM_FOR_EACH_POLICY_TABLE(POLICY, SELECT) \
SELECT(POLICY, CMP0000, \

View File

@ -12,6 +12,7 @@
#include "cmProcessTools.h"
#include <cmsys/Process.h>
#include <ostream>
void cmProcessTools::RunProcess(struct cmsysProcess_s* cp, OutputParser* out,
OutputParser* err)

View File

@ -12,7 +12,11 @@
#ifndef cmProcessTools_h
#define cmProcessTools_h
#include "cmStandardIncludes.h"
#include <cmConfigure.h>
#include <iosfwd>
#include <string.h>
#include <string>
/** \class cmProcessTools
* \brief Helper classes for process output parsing

View File

@ -11,7 +11,7 @@
============================================================================*/
#include "cmProperty.h"
#include "cmSystemTools.h"
#include <cmConfigure.h>
void cmProperty::Set(const char* value)
{

View File

@ -12,7 +12,9 @@
#ifndef cmProperty_h
#define cmProperty_h
#include "cmStandardIncludes.h"
#include <cmConfigure.h> // IWYU pragma: keep
#include <string>
class cmProperty
{

View File

@ -11,8 +11,6 @@
============================================================================*/
#include "cmPropertyDefinition.h"
#include "cmSystemTools.h"
void cmPropertyDefinition::DefineProperty(const std::string& name,
cmProperty::ScopeType scope,
const char* shortDescription,

View File

@ -12,8 +12,12 @@
#ifndef cmPropertyDefinition_h
#define cmPropertyDefinition_h
#include <cmConfigure.h> // IWYU pragma: keep
#include "cmProperty.h"
#include <string>
/** \class cmPropertyDefinition
* \brief Property meta-information
*

View File

@ -11,8 +11,7 @@
============================================================================*/
#include "cmPropertyDefinitionMap.h"
#include "cmDocumentationSection.h"
#include "cmSystemTools.h"
#include <utility>
void cmPropertyDefinitionMap::DefineProperty(const std::string& name,
cmProperty::ScopeType scope,

View File

@ -12,9 +12,13 @@
#ifndef cmPropertyDefinitionMap_h
#define cmPropertyDefinitionMap_h
#include <cmConfigure.h> // IWYU pragma: keep
#include "cmProperty.h"
#include "cmPropertyDefinition.h"
class cmDocumentationSection;
#include <map>
#include <string>
class cmPropertyDefinitionMap
: public std::map<std::string, cmPropertyDefinition>

View File

@ -11,12 +11,10 @@
============================================================================*/
#include "cmPropertyMap.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmake.h"
#include <algorithm>
#include <assert.h>
#include <cmConfigure.h>
#include <utility>
cmProperty* cmPropertyMap::GetOrCreateProperty(const std::string& name)
{

View File

@ -12,8 +12,14 @@
#ifndef cmPropertyMap_h
#define cmPropertyMap_h
#include <cmConfigure.h> // IWYU pragma: keep
#include "cmProperty.h"
#include <map>
#include <string>
#include <vector>
class cmPropertyMap : public std::map<std::string, cmProperty>
{
public: