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
......@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmMacroCommand.h"
#include <algorithm>
#include <sstream>
#include <stdio.h>
......
......@@ -2,6 +2,16 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmMakefile.h"
#include <algorithm>
#include <assert.h>
#include <cmsys/FStream.hxx>
#include <cmsys/RegularExpression.hxx>
#include <ctype.h>
#include <sstream>
#include <stdlib.h>
#include <string.h>
#include <utility>
#include "cmAlgorithms.h"
#include "cmCommand.h"
#include "cmCommandArgumentParserHelper.h"
......@@ -14,6 +24,7 @@
#include "cmGeneratorExpression.h"
#include "cmGeneratorExpressionEvaluationFile.h"
#include "cmGlobalGenerator.h"
#include "cmInstallGenerator.h" // IWYU pragma: keep
#include "cmListFileCache.h"
#include "cmSourceFile.h"
#include "cmSourceFileLocation.h"
......@@ -21,28 +32,17 @@
#include "cmStateDirectory.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmTargetLinkLibraryType.h"
#include "cmTest.h"
#include "cmTestGenerator.h" // IWYU pragma: keep
#include "cmVersion.h"
#include "cm_auto_ptr.hxx"
#include "cmake.h"
#include "cmInstallGenerator.h" // IWYU pragma: keep
#include "cmTestGenerator.h" // IWYU pragma: keep
#ifdef CMAKE_BUILD_WITH_CMAKE
#include "cmVariableWatch.h"
#endif
#include <algorithm>
#include <assert.h>
#include <cm_auto_ptr.hxx>
#include <cmsys/FStream.hxx>
#include <cmsys/RegularExpression.hxx>
#include <ctype.h>
#include <sstream>
#include <stdlib.h>
#include <string.h>
#include <utility>
class cmMessenger;
// default is not to be building executables
......
......@@ -5,13 +5,21 @@
#include <cmConfigure.h>
#include <cmsys/RegularExpression.hxx>
#include <map>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include "cmAlgorithms.h"
#include "cmListFileCache.h"
#include "cmNewLineStyle.h"
#include "cmPolicies.h"
#include "cmStateSnapshot.h"
#include "cmStateTypes.h"
#include "cmTarget.h"
#include "cmTargetLinkLibraryType.h"
#include "cm_auto_ptr.hxx"
#include "cm_unordered_map.hxx"
#include "cmake.h"
......@@ -19,15 +27,6 @@
#include "cmSourceGroup.h"
#endif
#include <cm_auto_ptr.hxx>
#include <cmsys/RegularExpression.hxx>
#include <map>
#include <set>
#include <stack>
#include <string>
#include <vector>
class cmCommand;
class cmCompiledGeneratorExpression;
class cmCustomCommandLines;
......@@ -40,6 +39,7 @@ class cmGlobalGenerator;
class cmInstallGenerator;
class cmMessenger;
class cmSourceFile;
class cmState;
class cmTest;
class cmTestGenerator;
class cmVariableWatch;
......
......@@ -2,6 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmMakefileExecutableTargetGenerator.h"
#include <sstream>
#include <string>
#include <vector>
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalUnixMakefileGenerator3.h"
......@@ -13,13 +17,12 @@
#include "cmOutputConverter.h"
#include "cmRulePlaceholderExpander.h"
#include "cmState.h"
#include "cmStateDirectory.h"
#include "cmStateSnapshot.h"
#include "cmSystemTools.h"
#include "cm_auto_ptr.hxx"
#include "cmake.h"
#include <sstream>
#include <string>
#include <vector>
cmMakefileExecutableTargetGenerator::cmMakefileExecutableTargetGenerator(
cmGeneratorTarget* target)
: cmMakefileTargetGenerator(target)
......
......@@ -2,6 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmMakefileLibraryTargetGenerator.h"
#include <cmConfigure.h> // IWYU pragma: keep
#include <sstream>
#include <vector>
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalUnixMakefileGenerator3.h"
......@@ -13,13 +18,13 @@
#include "cmOutputConverter.h"
#include "cmRulePlaceholderExpander.h"
#include "cmState.h"
#include "cmStateDirectory.h"
#include "cmStateSnapshot.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cm_auto_ptr.hxx"
#include "cmake.h"
#include <sstream>
#include <vector>
cmMakefileLibraryTargetGenerator::cmMakefileLibraryTargetGenerator(
cmGeneratorTarget* target)
: cmMakefileTargetGenerator(target)
......
......@@ -2,6 +2,10 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmMakefileTargetGenerator.h"
#include <sstream>
#include <stdio.h>
#include <utility>
#include "cmAlgorithms.h"
#include "cmComputeLinkInformation.h"
#include "cmCustomCommand.h"
......@@ -10,8 +14,6 @@
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalUnixMakefileGenerator3.h"
#include "cmLinkLineComputer.h"
#include "cmLocalGenerator.h"
#include "cmLocalUnixMakefileGenerator3.h"
#include "cmMakefile.h"
#include "cmMakefileExecutableTargetGenerator.h"
......@@ -21,17 +23,13 @@
#include "cmRulePlaceholderExpander.h"
#include "cmSourceFile.h"
#include "cmState.h"
#include "cmStateDirectory.h"
#include "cmStateSnapshot.h"
#include "cmStateTypes.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>
#endif
......
......@@ -5,22 +5,24 @@
#include <cmConfigure.h>
#include "cmCommonTargetGenerator.h"
#include "cmLocalUnixMakefileGenerator3.h"
#include "cmOSXBundleGenerator.h"
#include <iosfwd>
#include <map>
#include <set>
#include <string>
#include <vector>
#include "cmCommonTargetGenerator.h"
#include "cmLocalUnixMakefileGenerator3.h"
#include "cmOSXBundleGenerator.h"
class cmCustomCommandGenerator;
class cmGeneratedFileStream;
class cmGeneratorTarget;
class cmGlobalUnixMakefileGenerator3;
class cmSourceFile;
class cmLinkLineComputer;
class cmOutputConverter;
class cmSourceFile;
class cmStateDirectory;
/** \class cmMakefileTargetGenerator
* \brief Support Routines for writing makefiles
......
......@@ -2,17 +2,17 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmMakefileUtilityTargetGenerator.h"
#include <ostream>
#include <string>
#include <vector>
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalUnixMakefileGenerator3.h"
#include "cmLocalUnixMakefileGenerator3.h"
#include "cmMakefile.h"
#include "cmOSXBundleGenerator.h"
#include "cmOutputConverter.h"
#include <ostream>
#include <string>
#include <vector>
#include "cmSystemTools.h"
cmMakefileUtilityTargetGenerator::cmMakefileUtilityTargetGenerator(
cmGeneratorTarget* target)
......
......@@ -2,8 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmMessageCommand.h"
#include <algorithm>
#include "cmAlgorithms.h"
#include "cmMakefile.h"
#include "cmMessenger.h"
......
......@@ -2,7 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmNinjaLinkLineComputer.h"
#include "cmGlobalNinjaGenerator.h"
#include "cmStateDirectory.h"
class cmOutputConverter;
cmNinjaLinkLineComputer::cmNinjaLinkLineComputer(
cmOutputConverter* outputConverter, cmStateDirectory stateDir,
......
......@@ -4,10 +4,15 @@
#ifndef cmNinjaLinkLineComputer_h
#define cmNinjaLinkLineComputer_h
#include <cmConfigure.h>
#include <string>
#include "cmLinkLineComputer.h"
#include "cmState.h"
class cmGlobalNinjaGenerator;
class cmOutputConverter;
class cmStateDirectory;
class cmNinjaLinkLineComputer : public cmLinkLineComputer
{
......
......@@ -2,6 +2,15 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmNinjaNormalTargetGenerator.h"
#include <algorithm>
#include <assert.h>
#include <iterator>
#include <limits>
#include <map>
#include <set>
#include <sstream>
#include <stddef.h>
#include "cmAlgorithms.h"
#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
......@@ -18,19 +27,13 @@
#include "cmRulePlaceholderExpander.h"
#include "cmSourceFile.h"
#include "cmState.h"
#include "cmStateDirectory.h"
#include "cmStateSnapshot.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cm_auto_ptr.hxx"
#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>
#endif
......
......@@ -2,10 +2,20 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmNinjaTargetGenerator.h"
#include <algorithm>
#include <assert.h>
#include <cm_jsoncpp_value.h>
#include <cm_jsoncpp_writer.h>
#include <iterator>
#include <map>
#include <sstream>
#include <string.h>
#include "cmAlgorithms.h"
#include "cmComputeLinkInformation.h"
#include "cmCustomCommandGenerator.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalNinjaGenerator.h"
#include "cmLocalGenerator.h"
......@@ -19,16 +29,9 @@
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cm_auto_ptr.hxx"
#include "cmake.h"
#include "cm_jsoncpp_writer.h"
#include <algorithm>
#include <iterator>
#include <map>
#include <sstream>
#include <string.h>
cmNinjaTargetGenerator* cmNinjaTargetGenerator::New(cmGeneratorTarget* target)
{
switch (target->GetType()) {
......
......@@ -3,9 +3,11 @@
#ifndef cmNinjaTypes_h
#define cmNinjaTypes_h
#include <cmConfigure.h>
#include <cmConfigure.h> // IWYU pragma: keep
#include "cmStandardIncludes.h"
#include <map>
#include <string>
#include <vector>
typedef std::vector<std::string> cmNinjaDeps;
typedef std::map<std::string, std::string> cmNinjaVars;
......
......@@ -2,8 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmOptionCommand.h"
#include <algorithm>
#include "cmAlgorithms.h"
#include "cmMakefile.h"
#include "cmState.h"
......
......@@ -2,16 +2,17 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmOutputConverter.h"
#include "cmAlgorithms.h"
#include "cmState.h"
#include "cmStateDirectory.h"
#include "cmSystemTools.h"
#include <algorithm>
#include <assert.h>
#include <ctype.h>
#include <set>
#include <sstream>
#include <vector>
#include "cmAlgorithms.h"
#include "cmState.h"
#include "cmStateDirectory.h"
#include "cmSystemTools.h"
cmOutputConverter::cmOutputConverter(cmStateSnapshot snapshot)
: StateSnapshot(snapshot)
......
......@@ -5,10 +5,12 @@
#include <cmConfigure.h> // IWYU pragma: keep
#include <string>
#include "cmStateSnapshot.h"
#include <string>
#include <vector>
class cmState;
class cmStateDirectory;
class cmOutputConverter
{
......
......@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmParseArgumentsCommand.h"
#include <algorithm>
#include <map>
#include <set>
#include <sstream>
......
......@@ -2,6 +2,8 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmPathLabel.h"
#include <stddef.h>
cmPathLabel::cmPathLabel(const std::string& label)
: Label(label)
, Hash(0)
......
......@@ -3,9 +3,9 @@
#ifndef cmPathLabel_h
#define cmPathLabel_h
#include <cmConfigure.h>
#include <cmConfigure.h> // IWYU pragma: keep
#include "cmStandardIncludes.h"
#include <string>
/** \class cmPathLabel
* \brief Helper class for text based labels
......
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