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

Fix several include-what-you-use findings

parent f52bcc2a
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "cmGlobalGenerator.h" #include "cmGlobalGenerator.h"
#include "cmMakefile.h" #include "cmMakefile.h"
#include "cmState.h" #include "cmState.h"
#include "cmStateDirectory.h"
#include "cmStateTypes.h" #include "cmStateTypes.h"
#include "cmSystemTools.h" #include "cmSystemTools.h"
#include "cmake.h" #include "cmake.h"
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "CMakeSetupDialog.h" #include "CMakeSetupDialog.h"
#include "cmAlgorithms.h" #include "cmAlgorithms.h"
#include "cmDocumentation.h" #include "cmDocumentation.h"
#include "cmDocumentationEntry.h"
#include "cmVersion.h" #include "cmVersion.h"
#include "cmake.h" #include "cmake.h"
#include <QApplication> #include <QApplication>
...@@ -17,6 +18,7 @@ ...@@ -17,6 +18,7 @@
#include <cmsys/CommandLineArguments.hxx> #include <cmsys/CommandLineArguments.hxx>
#include <cmsys/Encoding.hxx> #include <cmsys/Encoding.hxx>
#include <cmsys/SystemTools.hxx> #include <cmsys/SystemTools.hxx>
#include <iostream>
#include "cmSystemTools.h" // IWYU pragma: keep #include "cmSystemTools.h" // IWYU pragma: keep
......
...@@ -3,9 +3,17 @@ ...@@ -3,9 +3,17 @@
#ifndef cmAlgorithms_h #ifndef cmAlgorithms_h
#define cmAlgorithms_h #define cmAlgorithms_h
#include <cmConfigure.h> #include <cmConfigure.h> // IWYU pragma: keep
#include "cmStandardIncludes.h" #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, inline bool cmHasLiteralPrefixImpl(const std::string& str1, const char* str2,
size_t N) size_t N)
......
...@@ -2,9 +2,15 @@ ...@@ -2,9 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */ file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCMakeMinimumRequired.h" #include "cmCMakeMinimumRequired.h"
#include <sstream>
#include <stdio.h>
#include "cmMakefile.h" #include "cmMakefile.h"
#include "cmSystemTools.h" #include "cmSystemTools.h"
#include "cmVersion.h" #include "cmVersion.h"
#include "cmake.h"
class cmExecutionStatus;
// cmCMakeMinimumRequired // cmCMakeMinimumRequired
bool cmCMakeMinimumRequired::InitialPass(std::vector<std::string> const& args, bool cmCMakeMinimumRequired::InitialPass(std::vector<std::string> const& args,
......
...@@ -3,8 +3,14 @@ ...@@ -3,8 +3,14 @@
#ifndef cmCMakeMinimumRequired_h #ifndef cmCMakeMinimumRequired_h
#define cmCMakeMinimumRequired_h #define cmCMakeMinimumRequired_h
#include <cmConfigure.h>
#include <string>
#include <vector>
#include "cmCommand.h" #include "cmCommand.h"
class cmExecutionStatus;
/** \class cmCMakeMinimumRequired /** \class cmCMakeMinimumRequired
* \brief cmake_minimum_required command * \brief cmake_minimum_required command
* *
......
...@@ -2,6 +2,27 @@ ...@@ -2,6 +2,27 @@
file Copyright.txt or https://cmake.org/licensing for details. */ file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTest.h" #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 "cmAlgorithms.h"
#include "cmCTestBuildAndTestHandler.h" #include "cmCTestBuildAndTestHandler.h"
#include "cmCTestBuildHandler.h" #include "cmCTestBuildHandler.h"
...@@ -21,35 +42,15 @@ ...@@ -21,35 +42,15 @@
#include "cmGlobalGenerator.h" #include "cmGlobalGenerator.h"
#include "cmMakefile.h" #include "cmMakefile.h"
#include "cmState.h" #include "cmState.h"
#include "cmStateSnapshot.h"
#include "cmStateTypes.h" #include "cmStateTypes.h"
#include "cmSystemTools.h" #include "cmSystemTools.h"
#include "cmVersion.h" #include "cmVersion.h"
#include "cmVersionConfig.h" #include "cmVersionConfig.h"
#include "cmXMLWriter.h" #include "cmXMLWriter.h"
#include "cm_auto_ptr.hxx"
#include "cmake.h" #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__) #if defined(__BEOS__) || defined(__HAIKU__)
#include <be/kernel/OS.h> /* disable_debugger() API. */ #include <be/kernel/OS.h> /* disable_debugger() API. */
#endif #endif
......
...@@ -2,11 +2,6 @@ ...@@ -2,11 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */ file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCacheManager.h" #include "cmCacheManager.h"
#include "cmGeneratedFileStream.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
#include "cmake.h"
#include <algorithm> #include <algorithm>
#include <cmsys/FStream.hxx> #include <cmsys/FStream.hxx>
#include <cmsys/Glob.hxx> #include <cmsys/Glob.hxx>
...@@ -14,6 +9,12 @@ ...@@ -14,6 +9,12 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "cmGeneratedFileStream.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
#include "cmake.h"
cmCacheManager::cmCacheManager() cmCacheManager::cmCacheManager()
{ {
this->CacheMajorVersion = 0; this->CacheMajorVersion = 0;
......
...@@ -5,9 +5,6 @@ ...@@ -5,9 +5,6 @@
#include <cmConfigure.h> // IWYU pragma: keep #include <cmConfigure.h> // IWYU pragma: keep
#include "cmPropertyMap.h"
#include "cmState.h"
#include <iosfwd> #include <iosfwd>
#include <map> #include <map>
#include <set> #include <set>
...@@ -15,6 +12,9 @@ ...@@ -15,6 +12,9 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "cmPropertyMap.h"
#include "cmStateTypes.h"
class cmake; class cmake;
/** \class cmCacheManager /** \class cmCacheManager
......
...@@ -5,10 +5,12 @@ ...@@ -5,10 +5,12 @@
#include <cmConfigure.h> #include <cmConfigure.h>
#include "cmStandardIncludes.h" #include <set>
#include <string>
#include <vector>
class cmCommandArgumentsHelper;
class cmCommandArgumentGroup; class cmCommandArgumentGroup;
class cmCommandArgumentsHelper;
/* cmCommandArgumentsHelper, cmCommandArgumentGroup and cmCommandArgument (i.e. /* cmCommandArgumentsHelper, cmCommandArgumentGroup and cmCommandArgument (i.e.
its derived classes cmCAXXX can be used to simplify the processing of its derived classes cmCAXXX can be used to simplify the processing of
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */ file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCommonTargetGenerator.h" #include "cmCommonTargetGenerator.h"
#include <algorithm>
#include <cmConfigure.h> #include <cmConfigure.h>
#include <set> #include <set>
#include <sstream> #include <sstream>
...@@ -16,8 +15,8 @@ ...@@ -16,8 +15,8 @@
#include "cmLocalCommonGenerator.h" #include "cmLocalCommonGenerator.h"
#include "cmLocalGenerator.h" #include "cmLocalGenerator.h"
#include "cmMakefile.h" #include "cmMakefile.h"
#include "cmOutputConverter.h"
#include "cmSourceFile.h" #include "cmSourceFile.h"
#include "cmStateDirectory.h"
#include "cmStateTypes.h" #include "cmStateTypes.h"
cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt) cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt)
......
...@@ -4,19 +4,16 @@ ...@@ -4,19 +4,16 @@
#define cmCommonTargetGenerator_h #define cmCommonTargetGenerator_h
#include <cmConfigure.h> // IWYU pragma: keep #include <cmConfigure.h> // IWYU pragma: keep
#include "cmOutputConverter.h"
#include <map> #include <map>
#include <string> #include <string>
#include <vector> #include <vector>
class cmGeneratorTarget; class cmGeneratorTarget;
class cmGlobalCommonGenerator; class cmGlobalCommonGenerator;
class cmLinkLineComputer;
class cmLocalCommonGenerator; class cmLocalCommonGenerator;
class cmMakefile; class cmMakefile;
class cmSourceFile; class cmSourceFile;
class cmLinkLineComputer;
/** \class cmCommonTargetGenerator /** \class cmCommonTargetGenerator
* \brief Common infrastructure for Makefile and Ninja per-target generators * \brief Common infrastructure for Makefile and Ninja per-target generators
......
...@@ -2,12 +2,22 @@ ...@@ -2,12 +2,22 @@
file Copyright.txt or https://cmake.org/licensing for details. */ file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmConditionEvaluator.h" #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 "cmAlgorithms.h"
#include "cmMakefile.h" #include "cmMakefile.h"
#include "cmOutputConverter.h"
#include "cmState.h" #include "cmState.h"
#include "cmSystemTools.h" #include "cmSystemTools.h"
class cmCommand;
class cmTest;
static std::string const keyAND = "AND"; static std::string const keyAND = "AND";
static std::string const keyCOMMAND = "COMMAND"; static std::string const keyCOMMAND = "COMMAND";
static std::string const keyDEFINED = "DEFINED"; static std::string const keyDEFINED = "DEFINED";
......
...@@ -3,12 +3,18 @@ ...@@ -3,12 +3,18 @@
#ifndef cmConditionEvaluator_h #ifndef cmConditionEvaluator_h
#define cmConditionEvaluator_h #define cmConditionEvaluator_h
#include "cmCommand.h" #include <cmConfigure.h> // IWYU pragma: keep
#include <list>
#include <string>
#include <vector>
#include "cmExpandedCommandArgument.h" #include "cmExpandedCommandArgument.h"
#include "cmListFileCache.h" #include "cmListFileCache.h"
#include "cmPolicies.h"
#include "cmake.h" #include "cmake.h"
#include <list> class cmMakefile;
class cmConditionEvaluator class cmConditionEvaluator
{ {
......
...@@ -2,16 +2,24 @@ ...@@ -2,16 +2,24 @@
file Copyright.txt or https://cmake.org/licensing for details. */ file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCoreTryCompile.h" #include "cmCoreTryCompile.h"
#include <cmConfigure.h>
#include <cmsys/Directory.hxx>
#include <set>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include "cmAlgorithms.h" #include "cmAlgorithms.h"
#include "cmExportTryCompileFileGenerator.h" #include "cmExportTryCompileFileGenerator.h"
#include "cmGlobalGenerator.h" #include "cmGlobalGenerator.h"
#include "cmMakefile.h" #include "cmMakefile.h"
#include "cmOutputConverter.h" #include "cmOutputConverter.h"
#include "cmPolicies.h"
#include "cmState.h" #include "cmState.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
#include "cmVersion.h"
#include "cmake.h" #include "cmake.h"
#include <cmsys/Directory.hxx>
#include <assert.h>
static std::string const kCMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN = static std::string const kCMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN =
"CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN"; "CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN";
......
...@@ -3,6 +3,11 @@ ...@@ -3,6 +3,11 @@
#ifndef cmCoreTryCompile_h #ifndef cmCoreTryCompile_h
#define cmCoreTryCompile_h #define cmCoreTryCompile_h
#include <cmConfigure.h> // IWYU pragma: keep
#include <string>
#include <vector>
#include "cmCommand.h" #include "cmCommand.h"
#include "cmStateTypes.h" #include "cmStateTypes.h"
......
...@@ -2,10 +2,14 @@ ...@@ -2,10 +2,14 @@
file Copyright.txt or https://cmake.org/licensing for details. */ file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCreateTestSourceList.h" #include "cmCreateTestSourceList.h"
#include <algorithm>
#include "cmMakefile.h" #include "cmMakefile.h"
#include "cmSourceFile.h" #include "cmSourceFile.h"
#include "cmSystemTools.h" #include "cmSystemTools.h"
class cmExecutionStatus;
// cmCreateTestSourceList // cmCreateTestSourceList
bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& args, bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& args,
cmExecutionStatus&) cmExecutionStatus&)
......
...@@ -3,8 +3,15 @@ ...@@ -3,8 +3,15 @@
#ifndef cmCreateTestSourceList_h #ifndef cmCreateTestSourceList_h
#define cmCreateTestSourceList_h #define cmCreateTestSourceList_h
#include <cmConfigure.h>
#include <string>
#include <vector>
#include "cmCommand.h" #include "cmCommand.h"
class cmExecutionStatus;
/** \class cmCreateTestSourceList /** \class cmCreateTestSourceList
* \brief Test driver generation command * \brief Test driver generation command
* *
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include "cmDefinitions.h" #include "cmDefinitions.h"
#include <assert.h> #include <assert.h>
#include <cmConfigure.h>
#include <set> #include <set>
#include <utility> #include <utility>
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
#ifndef cmDefinitions_h #ifndef cmDefinitions_h
#define cmDefinitions_h #define cmDefinitions_h
#include <cmConfigure.h> #include <cmConfigure.h> // IWYU pragma: keep
#include "cmLinkedTree.h"
#include "cm_unordered_map.hxx"
#include <string> #include <string>
#include <vector> #include <vector>
#include "cmLinkedTree.h"
#include "cm_unordered_map.hxx"
/** \class cmDefinitions /** \class cmDefinitions
* \brief Store a scope of variable definitions for CMake language. * \brief Store a scope of variable definitions for CMake language.
* *
......
...@@ -2,16 +2,15 @@ ...@@ -2,16 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */ file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmDependsC.h" #include "cmDependsC.h"
#include <cmsys/FStream.hxx>
#include <utility>
#include "cmAlgorithms.h" #include "cmAlgorithms.h"
#include "cmFileTimeComparison.h" #include "cmFileTimeComparison.h"
#include "cmLocalGenerator.h" #include "cmLocalGenerator.h"
#include "cmMakefile.h" #include "cmMakefile.h"
#include "cmOutputConverter.h"
#include "cmSystemTools.h" #include "cmSystemTools.h"
#include <cmsys/FStream.hxx>
#include <utility>
#define INCLUDE_REGEX_LINE \ #define INCLUDE_REGEX_LINE \
"^[ \t]*#[ \t]*(include|import)[ \t]*[<\"]([^\">]+)([\">])" "^[ \t]*#[ \t]*(include|import)[ \t]*[<\"]([^\">]+)([\">])"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment