Commit 2e620f0b authored by Daniel Pfeifer's avatar Daniel Pfeifer Committed by Brad King

Fix several include-what-you-use findings

parent f52bcc2a
......@@ -22,6 +22,7 @@
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmStateDirectory.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmake.h"
......
......@@ -5,6 +5,7 @@
#include "CMakeSetupDialog.h"
#include "cmAlgorithms.h"
#include "cmDocumentation.h"
#include "cmDocumentationEntry.h"
#include "cmVersion.h"
#include "cmake.h"
#include <QApplication>
......@@ -17,6 +18,7 @@
#include <cmsys/CommandLineArguments.hxx>
#include <cmsys/Encoding.hxx>
#include <cmsys/SystemTools.hxx>
#include <iostream>
#include "cmSystemTools.h" // IWYU pragma: keep
......
......@@ -3,9 +3,17 @@
#ifndef cmAlgorithms_h
#define cmAlgorithms_h
#include <cmConfigure.h>
#include "cmStandardIncludes.h"
#include <cmConfigure.h> // IWYU pragma: keep
#include <algorithm>
#include <cm_kwiml.h>
#include <functional>
#include <iterator>
#include <sstream>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
inline bool cmHasLiteralPrefixImpl(const std::string& str1, const char* str2,
size_t N)
......
......@@ -2,9 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCMakeMinimumRequired.h"
#include <sstream>
#include <stdio.h>
#include "cmMakefile.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
#include "cmake.h"
class cmExecutionStatus;
// cmCMakeMinimumRequired
bool cmCMakeMinimumRequired::InitialPass(std::vector<std::string> const& args,
......
......@@ -3,8 +3,14 @@
#ifndef cmCMakeMinimumRequired_h
#define cmCMakeMinimumRequired_h
#include <cmConfigure.h>
#include <string>
#include <vector>
#include "cmCommand.h"
class cmExecutionStatus;
/** \class cmCMakeMinimumRequired
* \brief cmake_minimum_required command
*
......
......@@ -2,6 +2,27 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTest.h"
#include <cm_curl.h>
#include <cm_zlib.h>
#include <cmsys/Base64.h>
#include <cmsys/Directory.hxx>
#include <cmsys/FStream.hxx>
#include <cmsys/Glob.hxx>
#include <cmsys/Process.h>
#include <cmsys/String.hxx>
#include <cmsys/SystemInformation.hxx>
#include <ctype.h>
#include <iostream>
#include <map>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
#include "cmAlgorithms.h"
#include "cmCTestBuildAndTestHandler.h"
#include "cmCTestBuildHandler.h"
......@@ -21,35 +42,15 @@
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmStateSnapshot.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
#include "cmVersionConfig.h"
#include "cmXMLWriter.h"
#include "cm_auto_ptr.hxx"
#include "cmake.h"
#include <cm_auto_ptr.hxx>
#include <cm_curl.h>
#include <cm_zlib.h>
#include <cmsys/Base64.h>
#include <cmsys/Directory.hxx>
#include <cmsys/FStream.hxx>
#include <cmsys/Glob.hxx>
#include <cmsys/Process.h>
#include <cmsys/String.hxx>
#include <cmsys/SystemInformation.hxx>
#include <ctype.h>
#include <iostream>
#include <map>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
#if defined(__BEOS__) || defined(__HAIKU__)
#include <be/kernel/OS.h> /* disable_debugger() API. */
#endif
......
......@@ -2,11 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCacheManager.h"
#include "cmGeneratedFileStream.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
#include "cmake.h"
#include <algorithm>
#include <cmsys/FStream.hxx>
#include <cmsys/Glob.hxx>
......@@ -14,6 +9,12 @@
#include <stdio.h>
#include <string.h>
#include "cmGeneratedFileStream.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
#include "cmake.h"
cmCacheManager::cmCacheManager()
{
this->CacheMajorVersion = 0;
......
......@@ -5,9 +5,6 @@
#include <cmConfigure.h> // IWYU pragma: keep
#include "cmPropertyMap.h"
#include "cmState.h"
#include <iosfwd>
#include <map>
#include <set>
......@@ -15,6 +12,9 @@
#include <utility>
#include <vector>
#include "cmPropertyMap.h"
#include "cmStateTypes.h"
class cmake;
/** \class cmCacheManager
......
......@@ -5,10 +5,12 @@
#include <cmConfigure.h>
#include "cmStandardIncludes.h"
#include <set>
#include <string>
#include <vector>
class cmCommandArgumentsHelper;
class cmCommandArgumentGroup;
class cmCommandArgumentsHelper;
/* cmCommandArgumentsHelper, cmCommandArgumentGroup and cmCommandArgument (i.e.
its derived classes cmCAXXX can be used to simplify the processing of
......
......@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCommonTargetGenerator.h"
#include <algorithm>
#include <cmConfigure.h>
#include <set>
#include <sstream>
......@@ -16,8 +15,8 @@
#include "cmLocalCommonGenerator.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmOutputConverter.h"
#include "cmSourceFile.h"
#include "cmStateDirectory.h"
#include "cmStateTypes.h"
cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt)
......
......@@ -4,19 +4,16 @@
#define cmCommonTargetGenerator_h
#include <cmConfigure.h> // IWYU pragma: keep
#include "cmOutputConverter.h"
#include <map>
#include <string>
#include <vector>
class cmGeneratorTarget;
class cmGlobalCommonGenerator;
class cmLinkLineComputer;
class cmLocalCommonGenerator;
class cmMakefile;
class cmSourceFile;
class cmLinkLineComputer;
/** \class cmCommonTargetGenerator
* \brief Common infrastructure for Makefile and Ninja per-target generators
......
......@@ -2,12 +2,22 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmConditionEvaluator.h"
#include <algorithm>
#include <cmConfigure.h>
#include <cmsys/RegularExpression.hxx>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cmAlgorithms.h"
#include "cmMakefile.h"
#include "cmOutputConverter.h"
#include "cmState.h"
#include "cmSystemTools.h"
class cmCommand;
class cmTest;
static std::string const keyAND = "AND";
static std::string const keyCOMMAND = "COMMAND";
static std::string const keyDEFINED = "DEFINED";
......
......@@ -3,12 +3,18 @@
#ifndef cmConditionEvaluator_h
#define cmConditionEvaluator_h
#include "cmCommand.h"
#include <cmConfigure.h> // IWYU pragma: keep
#include <list>
#include <string>
#include <vector>
#include "cmExpandedCommandArgument.h"
#include "cmListFileCache.h"
#include "cmPolicies.h"
#include "cmake.h"
#include <list>
class cmMakefile;
class cmConditionEvaluator
{
......
......@@ -2,16 +2,24 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCoreTryCompile.h"
#include <cmConfigure.h>
#include <cmsys/Directory.hxx>
#include <set>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include "cmAlgorithms.h"
#include "cmExportTryCompileFileGenerator.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmOutputConverter.h"
#include "cmPolicies.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
#include "cmVersion.h"
#include "cmake.h"
#include <cmsys/Directory.hxx>
#include <assert.h>
static std::string const kCMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN =
"CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN";
......
......@@ -3,6 +3,11 @@
#ifndef cmCoreTryCompile_h
#define cmCoreTryCompile_h
#include <cmConfigure.h> // IWYU pragma: keep
#include <string>
#include <vector>
#include "cmCommand.h"
#include "cmStateTypes.h"
......
......@@ -2,10 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCreateTestSourceList.h"
#include <algorithm>
#include "cmMakefile.h"
#include "cmSourceFile.h"
#include "cmSystemTools.h"
class cmExecutionStatus;
// cmCreateTestSourceList
bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& args,
cmExecutionStatus&)
......
......@@ -3,8 +3,15 @@
#ifndef cmCreateTestSourceList_h
#define cmCreateTestSourceList_h
#include <cmConfigure.h>
#include <string>
#include <vector>
#include "cmCommand.h"
class cmExecutionStatus;
/** \class cmCreateTestSourceList
* \brief Test driver generation command
*
......
......@@ -3,6 +3,7 @@
#include "cmDefinitions.h"
#include <assert.h>
#include <cmConfigure.h>
#include <set>
#include <utility>
......
......@@ -3,14 +3,14 @@
#ifndef cmDefinitions_h
#define cmDefinitions_h
#include <cmConfigure.h>
#include "cmLinkedTree.h"
#include "cm_unordered_map.hxx"
#include <cmConfigure.h> // IWYU pragma: keep
#include <string>
#include <vector>
#include "cmLinkedTree.h"
#include "cm_unordered_map.hxx"
/** \class cmDefinitions
* \brief Store a scope of variable definitions for CMake language.
*
......
......@@ -2,16 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmDependsC.h"
#include <cmsys/FStream.hxx>
#include <utility>
#include "cmAlgorithms.h"
#include "cmFileTimeComparison.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmOutputConverter.h"
#include "cmSystemTools.h"
#include <cmsys/FStream.hxx>
#include <utility>
#define INCLUDE_REGEX_LINE \
"^[ \t]*#[ \t]*(include|import)[ \t]*[<\"]([^\">]+)([\">])"
......
......@@ -2,14 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmDependsFortran.h"
#include "cmFortranParser.h" /* Interface to parser object. */
#include "cmGeneratedFileStream.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmOutputConverter.h"
#include "cmStateDirectory.h"
#include "cmSystemTools.h"
#include <assert.h>
#include <cmsys/FStream.hxx>
#include <iostream>
......@@ -18,6 +10,15 @@
#include <string.h>
#include <utility>
#include "cmFortranParser.h" /* Interface to parser object. */
#include "cmGeneratedFileStream.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmOutputConverter.h"
#include "cmStateDirectory.h"
#include "cmStateSnapshot.h"
#include "cmSystemTools.h"
// TODO: Test compiler for the case of the mod file. Some always
// use lower case and some always use upper case. I do not know if any
// use the case from the source code.
......
......@@ -8,6 +8,8 @@
#include <string>
#include <vector>
class cmDependsJavaParserHelper;
#define YYSTYPE cmDependsJavaParserHelper::ParserType
#define YYSTYPE_IS_DECLARED
#define YY_EXTRA_TYPE cmDependsJavaParserHelper*
......
......@@ -3,10 +3,6 @@
#ifndef cmExecutionStatus_h
#define cmExecutionStatus_h
#include <cmConfigure.h>
#include "cmStandardIncludes.h"
/** \class cmExecutionStatus
* \brief Superclass for all command status classes
*
......
......@@ -3,9 +3,9 @@
#ifndef cmExpandedCommandArgument_h
#define cmExpandedCommandArgument_h
#include <cmConfigure.h>
#include <cmConfigure.h> // IWYU pragma: keep
#include "cmStandardIncludes.h"
#include <string>
/** \class cmExpandedCommandArgument
* \brief Represents an expanded command argument
......
......@@ -2,14 +2,22 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExportBuildAndroidMKGenerator.h"
#include "cmExportSet.h"
#include <algorithm>
#include <map>
#include <sstream>
#include <utility>
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmLinkItem.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmTargetExport.h"
#include <algorithm>
#include "cmPolicies.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
#include "cm_auto_ptr.hxx"
#include "cmake.h"
cmExportBuildAndroidMKGenerator::cmExportBuildAndroidMKGenerator()
{
......
......@@ -3,10 +3,16 @@
#ifndef cmExportBuildAndroidMKGenerator_h
#define cmExportBuildAndroidMKGenerator_h
#include <cmConfigure.h>
#include <iosfwd>
#include <string>
#include <vector>
#include "cmExportBuildFileGenerator.h"
#include "cmListFileCache.h"
#include "cmExportFileGenerator.h"
class cmExportSet;
class cmGeneratorTarget;
/** \class cmExportBuildAndroidMKGenerator
* \brief Generate a file exporting targets from a build tree.
......
......@@ -2,16 +2,17 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExportInstallAndroidMKGenerator.h"
#include "cmAlgorithms.h"
#include <ostream>
#include <stddef.h>
#include "cmExportBuildAndroidMKGenerator.h"
#include "cmExportSet.h"
#include "cmExportSetMap.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmInstallExportGenerator.h"
#include "cmInstallTargetGenerator.h"
#include "cmLocalGenerator.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
#include "cmTargetExport.h"
cmExportInstallAndroidMKGenerator::cmExportInstallAndroidMKGenerator(
......
......@@ -3,10 +3,18 @@
#ifndef cmExportInstallAndroidMKGenerator_h
#define cmExportInstallAndroidMKGenerator_h
#include <cmConfigure.h>
#include <iosfwd>
#include <set>
#include <string>
#include <vector>
#include "cmExportFileGenerator.h"
#include "cmExportInstallFileGenerator.h"
class cmGeneratorTarget;
class cmInstallExportGenerator;
class cmInstallTargetGenerator;
/** \class cmExportInstallAndroidMKGenerator
* \brief Generate a file exporting targets from an install tree.
......
......@@ -2,6 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExtraCodeBlocksGenerator.h"
#include <map>
#include <ostream>
#include <string.h>
#include <utility>
#include "cmAlgorithms.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
......@@ -14,12 +19,6 @@
#include "cmXMLWriter.h"
#include "cmake.h"
#include <algorithm>
#include <map>
#include <ostream>
#include <string.h>
#include <utility>
/* Some useful URLs:
Homepage:
http://www.codeblocks.org
......
......@@ -2,13 +2,20 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmExtraEclipseCDT4Generator.h"
#include <algorithm>
#include <assert.h>
#include <cmsys/RegularExpression.hxx>
#include <map>
#include <sstream>
#include <stdio.h>
#include <utility>
#include "cmGeneratedFileStream.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmOutputConverter.h"
#include "cmSourceFile.h"
#include "cmSourceGroup.h"
#include "cmState.h"
......@@ -17,14 +24,6 @@
#include "cmXMLWriter.h"