summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CTestCustom.cmake.in3
-rw-r--r--Help/release/dev/cpack-deb-long-filenames.rst6
-rw-r--r--Modules/CPackDeb.cmake33
-rw-r--r--Modules/FindHDF5.cmake70
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/WiX/cmWIXRichTextFormatWriter.h2
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx8
-rw-r--r--Source/CPack/cmCPackComponentGroup.h2
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx12
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx5
-rw-r--r--Source/CPack/cmCPackOSXX11Generator.cxx11
-rw-r--r--Source/CPack/cmCPackPKGGenerator.cxx9
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.cxx16
-rw-r--r--Source/CPack/cmCPackProductBuildGenerator.cxx10
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx4
-rw-r--r--Source/CursesDialog/ccmake.cxx23
-rw-r--r--Source/CursesDialog/cmCursesBoolWidget.cxx5
-rw-r--r--Source/CursesDialog/cmCursesBoolWidget.h3
-rw-r--r--Source/CursesDialog/cmCursesCacheEntryComposite.cxx10
-rw-r--r--Source/CursesDialog/cmCursesCacheEntryComposite.h6
-rw-r--r--Source/CursesDialog/cmCursesDummyWidget.cxx3
-rw-r--r--Source/CursesDialog/cmCursesDummyWidget.h3
-rw-r--r--Source/CursesDialog/cmCursesFilePathWidget.cxx3
-rw-r--r--Source/CursesDialog/cmCursesFilePathWidget.h2
-rw-r--r--Source/CursesDialog/cmCursesForm.cxx2
-rw-r--r--Source/CursesDialog/cmCursesForm.h2
-rw-r--r--Source/CursesDialog/cmCursesLabelWidget.cxx2
-rw-r--r--Source/CursesDialog/cmCursesLabelWidget.h5
-rw-r--r--Source/CursesDialog/cmCursesLongMessageForm.cxx9
-rw-r--r--Source/CursesDialog/cmCursesLongMessageForm.h6
-rw-r--r--Source/CursesDialog/cmCursesMainForm.cxx17
-rw-r--r--Source/CursesDialog/cmCursesMainForm.h10
-rw-r--r--Source/CursesDialog/cmCursesOptionsWidget.cxx3
-rw-r--r--Source/CursesDialog/cmCursesOptionsWidget.h6
-rw-r--r--Source/CursesDialog/cmCursesPathWidget.cxx4
-rw-r--r--Source/CursesDialog/cmCursesPathWidget.h7
-rw-r--r--Source/CursesDialog/cmCursesStandardIncludes.h2
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.cxx7
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.h5
-rw-r--r--Source/CursesDialog/cmCursesWidget.cxx2
-rw-r--r--Source/CursesDialog/cmCursesWidget.h5
-rw-r--r--Source/QtDialog/AddCacheEntry.cxx3
-rw-r--r--Source/QtDialog/CMakeSetup.cxx17
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx4
-rw-r--r--Source/QtDialog/Compilers.h4
-rw-r--r--Source/QtDialog/FirstConfigure.cxx21
-rw-r--r--Source/QtDialog/QCMake.h4
-rw-r--r--Source/QtDialog/QCMakeCacheView.cxx20
-rw-r--r--Source/QtDialog/QCMakeWidgets.cxx6
-rw-r--r--Source/QtDialog/QCMakeWidgets.h7
-rw-r--r--Source/bindexplib.h2
-rw-r--r--Source/cmAlgorithms.h2
-rw-r--r--Source/cmCTest.cxx56
-rw-r--r--Source/cmCTest.h26
-rw-r--r--Source/cmCallVisualStudioMacro.h2
-rw-r--r--Source/cmCommandArgumentParserHelper.cxx12
-rw-r--r--Source/cmCommandArgumentParserHelper.h5
-rw-r--r--Source/cmCommandArgumentsHelper.h2
-rw-r--r--Source/cmConditionEvaluator.cxx1
-rw-r--r--Source/cmConfigure.cmake.h.in2
-rw-r--r--Source/cmCryptoHash.cxx2
-rw-r--r--Source/cmCryptoHash.h4
-rw-r--r--Source/cmCurl.cxx13
-rw-r--r--Source/cmCurl.h5
-rw-r--r--Source/cmCustomCommand.cxx2
-rw-r--r--Source/cmCustomCommand.h8
-rw-r--r--Source/cmCustomCommandGenerator.cxx7
-rw-r--r--Source/cmCustomCommandGenerator.h7
-rw-r--r--Source/cmDefinitions.cxx2
-rw-r--r--Source/cmDefinitions.h9
-rw-r--r--Source/cmDepends.cxx3
-rw-r--r--Source/cmDepends.h9
-rw-r--r--Source/cmDependsC.cxx5
-rw-r--r--Source/cmDependsC.h9
-rw-r--r--Source/cmDependsFortran.cxx8
-rw-r--r--Source/cmDependsFortran.h7
-rw-r--r--Source/cmDependsJava.cxx1
-rw-r--r--Source/cmDependsJava.h7
-rw-r--r--Source/cmDependsJavaLexer.cxx2
-rw-r--r--Source/cmDependsJavaParserHelper.cxx7
-rw-r--r--Source/cmDependsJavaParserHelper.h5
-rw-r--r--Source/cmDocumentation.cxx11
-rw-r--r--Source/cmDocumentation.h14
-rw-r--r--Source/cmDocumentationFormatter.cxx6
-rw-r--r--Source/cmDocumentationFormatter.h4
-rw-r--r--Source/cmDocumentationSection.h7
-rw-r--r--Source/cmDynamicLoader.cxx7
-rw-r--r--Source/cmDynamicLoader.h2
-rw-r--r--Source/cmELF.cxx8
-rw-r--r--Source/cmELF.h5
-rw-r--r--Source/cmExecutionStatus.h2
-rw-r--r--Source/cmExpandedCommandArgument.h2
-rw-r--r--Source/cmExportBuildFileGenerator.cxx14
-rw-r--r--Source/cmExportBuildFileGenerator.h10
-rw-r--r--Source/cmExportFileGenerator.cxx13
-rw-r--r--Source/cmExportFileGenerator.h14
-rw-r--r--Source/cmExportInstallFileGenerator.cxx10
-rw-r--r--Source/cmExportInstallFileGenerator.h10
-rw-r--r--Source/cmExportSet.h7
-rw-r--r--Source/cmExportSetMap.cxx2
-rw-r--r--Source/cmExportSetMap.h5
-rw-r--r--Source/cmExportTryCompileFileGenerator.cxx11
-rw-r--r--Source/cmExportTryCompileFileGenerator.h12
-rw-r--r--Source/cmExprLexer.cxx2
-rw-r--r--Source/cmExprParserHelper.cxx6
-rw-r--r--Source/cmExprParserHelper.h8
-rw-r--r--Source/cmExternalMakefileProjectGenerator.cxx2
-rw-r--r--Source/cmExternalMakefileProjectGenerator.h6
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx13
-rw-r--r--Source/cmExtraCodeBlocksGenerator.h7
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx16
-rw-r--r--Source/cmExtraCodeLiteGenerator.h6
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx19
-rw-r--r--Source/cmExtraEclipseCDT4Generator.h10
-rw-r--r--Source/cmExtraKateGenerator.cxx12
-rw-r--r--Source/cmExtraKateGenerator.h6
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx11
-rw-r--r--Source/cmExtraSublimeTextGenerator.h12
-rw-r--r--Source/cmFileLock.h4
-rw-r--r--Source/cmFileLockPool.h5
-rw-r--r--Source/cmFileLockResult.cxx1
-rw-r--r--Source/cmFileLockResult.h4
-rw-r--r--Source/cmFilePathUuid.cxx4
-rw-r--r--Source/cmFilePathUuid.h8
-rw-r--r--Source/cmFileTimeComparison.cxx13
-rw-r--r--Source/cmFileTimeComparison.h2
-rw-r--r--Source/cmFortranParser.h2
-rw-r--r--Source/cmFortranParserImpl.cxx9
-rw-r--r--Source/cmFunctionBlocker.h2
-rw-r--r--Source/cmGeneratedFileStream.cxx2
-rw-r--r--Source/cmGeneratedFileStream.h3
-rw-r--r--Source/cmGeneratorExpression.cxx8
-rw-r--r--Source/cmGeneratorExpression.h14
-rw-r--r--Source/cmGeneratorExpressionContext.cxx2
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.cxx8
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.h11
-rw-r--r--Source/cmGeneratorExpressionEvaluationFile.cxx9
-rw-r--r--Source/cmGeneratorExpressionEvaluationFile.h5
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx17
-rw-r--r--Source/cmGeneratorExpressionEvaluator.h6
-rw-r--r--Source/cmGeneratorExpressionLexer.h4
-rw-r--r--Source/cmGeneratorExpressionNode.cxx36
-rw-r--r--Source/cmGeneratorExpressionNode.h20
-rw-r--r--Source/cmGeneratorExpressionParser.cxx3
-rw-r--r--Source/cmGeneratorExpressionParser.h5
-rw-r--r--Source/cmGeneratorTarget.cxx20
-rw-r--r--Source/cmGeneratorTarget.h13
-rw-r--r--Source/cmGhsMultiGpj.h2
-rw-r--r--Source/cmGhsMultiTargetGenerator.cxx1
-rw-r--r--Source/cmGlobalCommonGenerator.cxx2
-rw-r--r--Source/cmGlobalCommonGenerator.h4
-rw-r--r--Source/cmGlobalGenerator.cxx20
-rw-r--r--Source/cmGlobalGenerator.h32
-rw-r--r--Source/cmGlobalGeneratorFactory.h4
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx1
-rw-r--r--Source/cmGlobalKdevelopGenerator.cxx12
-rw-r--r--Source/cmGlobalKdevelopGenerator.h5
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx13
-rw-r--r--Source/cmGlobalNinjaGenerator.h22
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx12
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h18
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx1
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx1
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx1
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx1
-rw-r--r--Source/cmGlobalWatcomWMakeGenerator.cxx4
-rw-r--r--Source/cmGlobalWatcomWMakeGenerator.h10
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx70
-rw-r--r--Source/cmGraphAdjacencyList.h2
-rw-r--r--Source/cmGraphVizWriter.cxx14
-rw-r--r--Source/cmGraphVizWriter.h12
-rw-r--r--Source/cmHexFileConverter.h2
-rw-r--r--Source/cmIDEOptions.h2
-rw-r--r--Source/cmInstallCommandArguments.h2
-rw-r--r--Source/cmInstallDirectoryGenerator.cxx3
-rw-r--r--Source/cmInstallDirectoryGenerator.h8
-rw-r--r--Source/cmInstallExportGenerator.cxx18
-rw-r--r--Source/cmInstallExportGenerator.h12
-rw-r--r--Source/cmInstallFilesGenerator.cxx6
-rw-r--r--Source/cmInstallFilesGenerator.h9
-rw-r--r--Source/cmInstallGenerator.cxx2
-rw-r--r--Source/cmInstallGenerator.h6
-rw-r--r--Source/cmInstallScriptGenerator.cxx5
-rw-r--r--Source/cmInstallScriptGenerator.h5
-rw-r--r--Source/cmInstallTargetGenerator.cxx10
-rw-r--r--Source/cmInstallTargetGenerator.h8
-rw-r--r--Source/cmInstalledFile.cxx4
-rw-r--r--Source/cmInstalledFile.h7
-rw-r--r--Source/cmLinkedTree.h2
-rw-r--r--Source/cmListFileCache.cxx7
-rw-r--r--Source/cmListFileCache.h7
-rw-r--r--Source/cmLocalCommonGenerator.cxx5
-rw-r--r--Source/cmLocalCommonGenerator.h9
-rw-r--r--Source/cmLocalGenerator.cxx16
-rw-r--r--Source/cmLocalGenerator.h20
-rw-r--r--Source/cmLocalNinjaGenerator.cxx9
-rw-r--r--Source/cmLocalNinjaGenerator.h18
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx16
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.h15
-rw-r--r--Source/cmLocalVisualStudio10Generator.cxx2
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx1
-rw-r--r--Source/cmLocalXCodeGenerator.cxx1
-rw-r--r--Source/cmLocale.h2
-rw-r--r--Source/cmMakefile.cxx13
-rw-r--r--Source/cmMakefile.h4
-rw-r--r--Source/cmMessenger.cxx8
-rw-r--r--Source/cmMessenger.h7
-rw-r--r--Source/cmNinjaTypes.h2
-rw-r--r--Source/cmOSXBundleGenerator.cxx6
-rw-r--r--Source/cmOSXBundleGenerator.h11
-rw-r--r--Source/cmObject.h2
-rw-r--r--Source/cmOrderDirectories.cxx6
-rw-r--r--Source/cmOrderDirectories.h10
-rw-r--r--Source/cmOutputConverter.cxx8
-rw-r--r--Source/cmOutputConverter.h6
-rw-r--r--Source/cmPathLabel.h2
-rw-r--r--Source/cmPolicies.cxx7
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx29
-rw-r--r--Source/cmQtAutoGeneratorInitializer.h7
-rw-r--r--Source/cmQtAutoGenerators.cxx13
-rw-r--r--Source/cmQtAutoGenerators.h3
-rw-r--r--Source/cmRST.cxx5
-rw-r--r--Source/cmRST.h7
-rw-r--r--Source/cmScriptGenerator.cxx2
-rw-r--r--Source/cmScriptGenerator.h6
-rw-r--r--Source/cmSearchPath.h2
-rw-r--r--Source/cmSourceFile.cxx5
-rw-r--r--Source/cmSourceFile.h10
-rw-r--r--Source/cmSourceFileLocation.cxx7
-rw-r--r--Source/cmSourceFileLocation.h4
-rw-r--r--Source/cmSourceGroup.h6
-rw-r--r--Source/cmSystemTools.cxx68
-rw-r--r--Source/cmTargetDepend.h2
-rw-r--r--Source/cmTargetExport.h2
-rw-r--r--Source/cmTestGenerator.cxx1
-rw-r--r--Source/cmTimestamp.h2
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h2
-rw-r--r--Source/cmVisualStudioSlnData.h2
-rw-r--r--Source/cmVisualStudioSlnParser.h2
-rw-r--r--Source/cmVisualStudioWCEPlatformParser.h2
-rw-r--r--Source/cmXCodeObject.h2
-rw-r--r--Source/cmXMLParser.cxx12
-rw-r--r--Source/cmake.cxx41
-rw-r--r--Source/cmake.h20
-rw-r--r--Source/cmakemain.cxx13
-rw-r--r--Source/cmcmd.cxx26
-rw-r--r--Source/cmcmd.h5
-rw-r--r--Source/ctest.cxx17
-rw-r--r--Tests/CMakeLib/run_compile_commands.cxx20
-rw-r--r--Tests/CMakeLib/testGeneratedFileStream.cxx5
-rw-r--r--Tests/CMakeLib/testRST.cxx9
-rw-r--r--Tests/CMakeLib/testSystemTools.cxx4
-rw-r--r--Tests/CMakeLib/testUTF8.cxx2
-rw-r--r--Tests/CMakeLib/testXMLSafe.cxx8
-rw-r--r--Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake5
-rw-r--r--Tests/RunCMake/CPack/DEB/LONG_FILENAMES-Prerequirements.cmake7
-rw-r--r--Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake26
-rw-r--r--Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake3
-rw-r--r--Tests/RunCMake/CPack/DEB/Prerequirements.cmake7
-rw-r--r--Tests/RunCMake/CPack/LONG_FILENAMES.cmake10
-rw-r--r--Tests/RunCMake/CPack/RunCMakeTest.cmake1
-rw-r--r--Utilities/cmlibuv/src/unix/pipe.c7
-rw-r--r--Utilities/cmlibuv/src/unix/tty.c7
263 files changed, 1655 insertions, 601 deletions
diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in
index a39049b..1699492 100644
--- a/CTestCustom.cmake.in
+++ b/CTestCustom.cmake.in
@@ -62,6 +62,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
"warning.*This version of Mac OS X is unsupported"
"clang.*: warning: argument unused during compilation: .-g"
"note: in expansion of macro" # diagnostic context note
+ "note: expanded from macro" # diagnostic context note
"cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*rand.*may return deterministic values"
"cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*rand.*isn.*t random" # we do not do crypto
"cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*srand.*seed choices are.*poor" # we do not do crypto
@@ -82,6 +83,8 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
"cm_sha2.*warning: Value stored to.*is never read"
"testProcess.*warning: Dereference of null pointer .loaded from variable .invalidAddress.."
"liblzma/simple/x86.c:[0-9]+:[0-9]+: warning: The result of the '<<' expression is undefined"
+ "libuv/src/.*:[0-9]+:[0-9]+: warning: Dereference of null pointer"
+ "libuv/src/.*:[0-9]+:[0-9]+: warning: The left operand of '==' is a garbage value"
)
if(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
diff --git a/Help/release/dev/cpack-deb-long-filenames.rst b/Help/release/dev/cpack-deb-long-filenames.rst
new file mode 100644
index 0000000..6113eaf
--- /dev/null
+++ b/Help/release/dev/cpack-deb-long-filenames.rst
@@ -0,0 +1,6 @@
+cpack-deb-long-filenames
+------------------------
+
+* The :module:`CPackDeb` module learned to support long file names
+ when archive format is set to GNU tar.
+ See :variable:`CPACK_DEBIAN_ARCHIVE_TYPE`
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index c9678d6..1a7b923 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -177,6 +177,24 @@
#
# See https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
#
+# .. variable:: CPACK_DEBIAN_ARCHIVE_TYPE
+#
+# The archive format used for creating the Debian package.
+#
+# * Mandatory : YES
+# * Default : "paxr"
+#
+# Possible values are:
+#
+# - paxr
+# - gnutar
+#
+# .. note::
+#
+# Default pax archive format is the most portable format and generates
+# packages that do not treat sparse files specially.
+# GNU tar format on the other hand supports longer filenames.
+#
# .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE
#
# The compression used for creating the Debian package.
@@ -842,12 +860,24 @@ function(cpack_deb_prepare_package_vars)
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
endif()
+ if(CPACK_DEBIAN_ARCHIVE_TYPE)
+ set(archive_types_ "paxr;gnutar")
+ cmake_policy(PUSH)
+ cmake_policy(SET CMP0057 NEW)
+ if(NOT CPACK_DEBIAN_ARCHIVE_TYPE IN_LIST archive_types_)
+ message(FATAL_ERROR "CPACK_DEBIAN_ARCHIVE_TYPE set to unsupported"
+ "type ${CPACK_DEBIAN_ARCHIVE_TYPE}")
+ endif()
+ cmake_policy(POP)
+ else()
+ set(CPACK_DEBIAN_ARCHIVE_TYPE "paxr")
+ endif()
+
# Compression: (recommended)
if(NOT CPACK_DEBIAN_COMPRESSION_TYPE)
set(CPACK_DEBIAN_COMPRESSION_TYPE "gzip")
endif()
-
# Recommends:
# You should set: CPACK_DEBIAN_PACKAGE_RECOMMENDS
@@ -1000,6 +1030,7 @@ function(cpack_deb_prepare_package_vars)
set(GEN_CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_DEBIAN_PACKAGE_MAINTAINER}" PARENT_SCOPE)
set(GEN_CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_DEBIAN_PACKAGE_DESCRIPTION}" PARENT_SCOPE)
set(GEN_CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}" PARENT_SCOPE)
+ set(GEN_CPACK_DEBIAN_ARCHIVE_TYPE "${CPACK_DEBIAN_ARCHIVE_TYPE}" PARENT_SCOPE)
set(GEN_CPACK_DEBIAN_COMPRESSION_TYPE "${CPACK_DEBIAN_COMPRESSION_TYPE}" PARENT_SCOPE)
set(GEN_CPACK_DEBIAN_PACKAGE_RECOMMENDS "${CPACK_DEBIAN_PACKAGE_RECOMMENDS}" PARENT_SCOPE)
set(GEN_CPACK_DEBIAN_PACKAGE_SUGGESTS "${CPACK_DEBIAN_PACKAGE_SUGGESTS}" PARENT_SCOPE)
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 5e0996c..2f4ed82 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -183,7 +183,7 @@ endmacro()
# Test first if the current compilers automatically wrap HDF5
-function(_HDF5_test_regular_compiler_C success version)
+function(_HDF5_test_regular_compiler_C success version is_parallel)
set(scratch_directory
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/hdf5)
if(NOT ${success} OR
@@ -214,10 +214,21 @@ function(_HDF5_test_regular_compiler_C success version)
set(${version} ${HDF5_CXX_VERSION}.${CMAKE_MATCH_3})
endif()
set(${version} ${${version}} PARENT_SCOPE)
+
+ execute_process(COMMAND ${CMAKE_C_COMPILER} -showconfig
+ OUTPUT_VARIABLE config_output
+ ERROR_VARIABLE config_error
+ RESULT_VARIABLE config_result
+ )
+ if(config_output MATCHES "Parallel HDF5: yes")
+ set(${is_parallel} TRUE PARENT_SCOPE)
+ else()
+ set(${is_parallel} FALSE PARENT_SCOPE)
+ endif()
endif()
endfunction()
-function(_HDF5_test_regular_compiler_CXX success version)
+function(_HDF5_test_regular_compiler_CXX success version is_parallel)
set(scratch_directory ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/hdf5)
if(NOT ${success} OR
NOT EXISTS ${scratch_directory}/compiler_has_h5_cxx)
@@ -248,10 +259,21 @@ function(_HDF5_test_regular_compiler_CXX success version)
set(${version} ${HDF5_CXX_VERSION}.${CMAKE_MATCH_3})
endif()
set(${version} ${${version}} PARENT_SCOPE)
+
+ execute_process(COMMAND ${CMAKE_CXX_COMPILER} -showconfig
+ OUTPUT_VARIABLE config_output
+ ERROR_VARIABLE config_error
+ RESULT_VARIABLE config_result
+ )
+ if(config_output MATCHES "Parallel HDF5: yes")
+ set(${is_parallel} TRUE PARENT_SCOPE)
+ else()
+ set(${is_parallel} FALSE PARENT_SCOPE)
+ endif()
endif()
endfunction()
-function(_HDF5_test_regular_compiler_Fortran success)
+function(_HDF5_test_regular_compiler_Fortran success is_parallel)
if(NOT ${success})
set(scratch_directory
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/hdf5)
@@ -266,12 +288,24 @@ function(_HDF5_test_regular_compiler_Fortran success)
" call h5close_f(error)\n"
"end\n")
try_compile(${success} ${scratch_directory} ${test_file})
+ if(${success})
+ execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -showconfig
+ OUTPUT_VARIABLE config_output
+ ERROR_VARIABLE config_error
+ RESULT_VARIABLE config_result
+ )
+ if(config_output MATCHES "Parallel HDF5: yes")
+ set(${is_parallel} TRUE PARENT_SCOPE)
+ else()
+ set(${is_parallel} FALSE PARENT_SCOPE)
+ endif()
+ endif()
endif()
endfunction()
# Invoke the HDF5 wrapper compiler. The compiler return value is stored to the
# return_value argument, the text output is stored to the output variable.
-macro( _HDF5_invoke_compiler language output return_value version)
+macro( _HDF5_invoke_compiler language output return_value version is_parallel)
set(${version})
if(HDF5_USE_STATIC_LIBRARIES)
set(lib_type_args -noshlib)
@@ -309,6 +343,11 @@ macro( _HDF5_invoke_compiler language output return_value version)
string(REPLACE "HDF5 Version: " "" ${version} "${version_match}")
string(REPLACE "-patch" "." ${version} "${${version}}")
endif()
+ if(config_output MATCHES "Parallel HDF5: yes")
+ set(${is_parallel} TRUE)
+ else()
+ set(${is_parallel} FALSE)
+ endif()
endmacro()
# Parse a compile line for definitions, includes, library paths, and libraries.
@@ -386,6 +425,7 @@ endif()
if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
find_package(HDF5 QUIET NO_MODULE)
if( HDF5_FOUND)
+ set(HDF5_IS_PARALLEL ${HDF5_ENABLE_PARALLEL})
set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
set(HDF5_LIBRARIES)
set(HDF5_C_TARGET hdf5)
@@ -446,14 +486,17 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
if(__lang STREQUAL "C")
_HDF5_test_regular_compiler_C(
HDF5_${__lang}_COMPILER_NO_INTERROGATE
- HDF5_${__lang}_VERSION)
+ HDF5_${__lang}_VERSION
+ HDF5_${__lang}_IS_PARALLEL)
elseif(__lang STREQUAL "CXX")
_HDF5_test_regular_compiler_CXX(
HDF5_${__lang}_COMPILER_NO_INTERROGATE
- HDF5_${__lang}_VERSION)
+ HDF5_${__lang}_VERSION
+ HDF5_${__lang}_IS_PARALLEL)
elseif(__lang STREQUAL "Fortran")
_HDF5_test_regular_compiler_Fortran(
- HDF5_${__lang}_COMPILER_NO_INTERROGATE)
+ HDF5_${__lang}_COMPILER_NO_INTERROGATE
+ HDF5_${__lang}_IS_PARALLEL)
else()
continue()
endif()
@@ -490,7 +533,7 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
if(HDF5_${__lang}_COMPILER_EXECUTABLE)
_HDF5_invoke_compiler(${__lang} HDF5_${__lang}_COMPILE_LINE
- HDF5_${__lang}_RETURN_VALUE HDF5_${__lang}_VERSION)
+ HDF5_${__lang}_RETURN_VALUE HDF5_${__lang}_VERSION HDF5_${__lang}_IS_PARALLEL)
if(HDF5_${__lang}_RETURN_VALUE EQUAL 0)
message(STATUS "HDF5: Using hdf5 compiler wrapper to determine ${__lang} configuration")
_HDF5_parse_compile_line( HDF5_${__lang}_COMPILE_LINE
@@ -554,6 +597,15 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
message(WARNING "HDF5 Version found for language ${__lang}, ${HDF5_${__lang}_VERSION} is different than previously found version ${HDF5_VERSION}")
endif()
endif()
+ if(DEFINED HDF5_${__lang}_IS_PARALLEL)
+ if(NOT DEFINED HDF5_IS_PARALLEL)
+ set(HDF5_IS_PARALLEL ${HDF5_${__lang}_IS_PARALLEL})
+ elseif(NOT HDF5_IS_PARALLEL AND HDF5_${__lang}_IS_PARALLEL)
+ message(WARNING "HDF5 found for language ${__lang} is parallel but previously found language is not parallel.")
+ elseif(HDF5_IS_PARALLEL AND NOT HDF5_${__lang}_IS_PARALLEL)
+ message(WARNING "HDF5 found for language ${__lang} is not parallel but previously found language is parallel.")
+ endif()
+ endif()
endforeach()
else()
set(_HDF5_NEED_TO_SEARCH True)
@@ -613,7 +665,7 @@ if( NOT HDF5_FOUND )
set(HDF5_CXX_HL_LIBRARY_NAMES hdf5_hl_cpp ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_CXX_LIBRARY_NAMES})
set(HDF5_Fortran_LIBRARY_NAMES hdf5_fortran ${HDF5_C_LIBRARY_NAMES})
- set(HDF5_Fortran_HL_LIBRARY_NAMES hdf5_hl_fortran ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_Fortran_LIBRARY_NAMES})
+ set(HDF5_Fortran_HL_LIBRARY_NAMES hdf5hl_fortran ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_Fortran_LIBRARY_NAMES})
foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS)
# find the HDF5 include directories
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index b8c7439..fb13b21 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 6)
-set(CMake_VERSION_PATCH 20160902)
+set(CMake_VERSION_PATCH 20160906)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h
index acf1fa6..63a2ec0 100644
--- a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h
+++ b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h
@@ -13,6 +13,8 @@
#ifndef cmWIXRichTextFormatWriter_h
#define cmWIXRichTextFormatWriter_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
#include <cmsys/FStream.hxx>
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index 0d3725d..377fee1 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -87,17 +87,17 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
*/
#define DECLARE_AND_OPEN_ARCHIVE(filename, archive) \
cmGeneratedFileStream gf; \
- gf.Open(filename.c_str(), false, true); \
+ gf.Open((filename).c_str(), false, true); \
if (!GenerateHeader(&gf)) { \
cmCPackLogger(cmCPackLog::LOG_ERROR, \
"Problem to generate Header for archive < " \
- << filename << ">." << std::endl); \
+ << (filename) << ">." << std::endl); \
return 0; \
} \
cmArchiveWrite archive(gf, this->Compress, this->ArchiveFormat); \
- if (!archive) { \
+ if (!(archive)) { \
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem to create archive < " \
- << filename << ">. ERROR =" << archive.GetError() \
+ << (filename) << ">. ERROR =" << (archive).GetError() \
<< std::endl); \
return 0; \
}
diff --git a/Source/CPack/cmCPackComponentGroup.h b/Source/CPack/cmCPackComponentGroup.h
index 01a9e76..78b81b3 100644
--- a/Source/CPack/cmCPackComponentGroup.h
+++ b/Source/CPack/cmCPackComponentGroup.h
@@ -13,6 +13,8 @@
#ifndef cmCPackComponentGroup_h
#define cmCPackComponentGroup_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
class cmCPackComponentGroup;
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 1f3ac51..b909598 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -419,6 +419,12 @@ int cmCPackDebGenerator::createDeb()
<< debian_compression_type << std::endl);
}
+ const char* debian_archive_type =
+ this->GetOption("GEN_CPACK_DEBIAN_ARCHIVE_TYPE");
+ if (!debian_archive_type) {
+ debian_archive_type = "paxr";
+ }
+
std::string filename_data_tar =
strGenWDIR + "/data.tar" + compression_suffix;
@@ -431,7 +437,8 @@ int cmCPackDebGenerator::createDeb()
<< filename_data_tar << "\" for writing" << std::endl);
return 0;
}
- cmArchiveWrite data_tar(fileStream_data_tar, tar_compression_type, "paxr");
+ cmArchiveWrite data_tar(fileStream_data_tar, tar_compression_type,
+ debian_archive_type);
// uid/gid should be the one of the root user, and this root user has
// always uid/gid equal to 0.
@@ -535,7 +542,8 @@ int cmCPackDebGenerator::createDeb()
return 0;
}
cmArchiveWrite control_tar(fileStream_control_tar,
- cmArchiveWrite::CompressGZip, "paxr");
+ cmArchiveWrite::CompressGZip,
+ debian_archive_type);
// sets permissions and uid/gid for the files
control_tar.SetUIDAndGID(0u, 0u);
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index 640e437..14436da 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -330,8 +330,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
if (!cpack_dmg_disable_applications_symlink) {
std::ostringstream application_link;
application_link << staging.str() << "/Applications";
- cmSystemTools::CreateSymlink("/Applications",
- application_link.str().c_str());
+ cmSystemTools::CreateSymlink("/Applications", application_link.str());
}
// Optionally add a custom volume icon ...
@@ -755,7 +754,7 @@ std::string cmCPackDragNDropGenerator::GetComponentInstallDirNameSuffix(
// the current COMPONENT belongs to.
std::string groupVar =
"CPACK_COMPONENT_" + cmSystemTools::UpperCase(componentName) + "_GROUP";
- const char* _groupName = GetOption(groupVar.c_str());
+ const char* _groupName = GetOption(groupVar);
if (_groupName) {
std::string groupName = _groupName;
diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx
index c0d2553..c36439f 100644
--- a/Source/CPack/cmCPackOSXX11Generator.cxx
+++ b/Source/CPack/cmCPackOSXX11Generator.cxx
@@ -102,15 +102,14 @@ int cmCPackOSXX11Generator::PackageFiles()
}
std::string applicationsLinkName = diskImageDirectory + "/Applications";
- cmSystemTools::CreateSymlink("/Applications", applicationsLinkName.c_str());
+ cmSystemTools::CreateSymlink("/Applications", applicationsLinkName);
- if (!this->CopyResourcePlistFile("VolumeIcon.icns",
- diskImageDirectory.c_str(),
+ if (!this->CopyResourcePlistFile("VolumeIcon.icns", diskImageDirectory,
".VolumeIcon.icns", true) ||
- !this->CopyResourcePlistFile("DS_Store", diskImageDirectory.c_str(),
- ".DS_Store", true) ||
+ !this->CopyResourcePlistFile("DS_Store", diskImageDirectory, ".DS_Store",
+ true) ||
!this->CopyResourcePlistFile("background.png",
- diskImageBackgroundImageDir.c_str(),
+ diskImageBackgroundImageDir,
"background.png", true) ||
!this->CopyResourcePlistFile("RuntimeScript", dir) ||
!this->CopyResourcePlistFile("OSXX11.Info.plist", contDir,
diff --git a/Source/CPack/cmCPackPKGGenerator.cxx b/Source/CPack/cmCPackPKGGenerator.cxx
index 19b587a..e5b96e3 100644
--- a/Source/CPack/cmCPackPKGGenerator.cxx
+++ b/Source/CPack/cmCPackPKGGenerator.cxx
@@ -225,8 +225,7 @@ void cmCPackPKGGenerator::CreateChoice(const cmCPackComponent& component,
dirName += '/';
dirName += component.Name;
dirName += this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX");
- unsigned long installedSize =
- component.GetInstalledSizeInKbytes(dirName.c_str());
+ unsigned long installedSize = component.GetInstalledSizeInKbytes(dirName);
xout.StartElement("pkg-ref");
xout.Attribute("id", packageId);
@@ -283,7 +282,7 @@ bool cmCPackPKGGenerator::CopyCreateResourceFile(const std::string& name,
{
std::string uname = cmSystemTools::UpperCase(name);
std::string cpackVar = "CPACK_RESOURCE_FILE_" + uname;
- const char* inFileName = this->GetOption(cpackVar.c_str());
+ const char* inFileName = this->GetOption(cpackVar);
if (!inFileName) {
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPack option: "
<< cpackVar.c_str()
@@ -314,7 +313,7 @@ bool cmCPackPKGGenerator::CopyCreateResourceFile(const std::string& name,
// Set this so that distribution.dist gets the right name (without
// the path).
- this->SetOption(("CPACK_RESOURCE_FILE_" + uname + "_NOPATH").c_str(),
+ this->SetOption("CPACK_RESOURCE_FILE_" + uname + "_NOPATH",
(name + ext).c_str());
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
@@ -358,7 +357,7 @@ int cmCPackPKGGenerator::CopyInstallScript(const std::string& resdir,
std::string dst = resdir;
dst += "/";
dst += name;
- cmSystemTools::CopyFileAlways(script.c_str(), dst.c_str());
+ cmSystemTools::CopyFileAlways(script, dst);
cmSystemTools::SetPermissions(dst.c_str(), 0777);
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
"copy script : " << script << "\ninto " << dst << std::endl);
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx
index ce329ca..0704e9f 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.cxx
+++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx
@@ -118,13 +118,13 @@ int cmCPackPackageMakerGenerator::PackageFiles()
// then copy them into the resource directory and make
// them executable
if (preflight) {
- this->CopyInstallScript(resDir.c_str(), preflight, "preflight");
+ this->CopyInstallScript(resDir, preflight, "preflight");
}
if (postflight) {
- this->CopyInstallScript(resDir.c_str(), postflight, "postflight");
+ this->CopyInstallScript(resDir, postflight, "postflight");
}
if (postupgrade) {
- this->CopyInstallScript(resDir.c_str(), postupgrade, "postupgrade");
+ this->CopyInstallScript(resDir, postupgrade, "postupgrade");
}
} else if (postflight) {
// create a postflight component to house the script
@@ -160,7 +160,7 @@ int cmCPackPackageMakerGenerator::PackageFiles()
// copy postflight script into resource directory of .pkg
std::string resourceDir = packageFile + "/Contents/Resources";
- this->CopyInstallScript(resourceDir.c_str(), postflight, "postflight");
+ this->CopyInstallScript(resourceDir, postflight, "postflight");
}
if (!this->Components.empty()) {
@@ -254,9 +254,9 @@ int cmCPackPackageMakerGenerator::PackageFiles()
this->SetOption("CPACK_MODULE_VERSION_SUFFIX", "");
// Copy or create all of the resource files we need.
- if (!this->CopyCreateResourceFile("License", resDir.c_str()) ||
- !this->CopyCreateResourceFile("ReadMe", resDir.c_str()) ||
- !this->CopyCreateResourceFile("Welcome", resDir.c_str()) ||
+ if (!this->CopyCreateResourceFile("License", resDir) ||
+ !this->CopyCreateResourceFile("ReadMe", resDir) ||
+ !this->CopyCreateResourceFile("Welcome", resDir) ||
!this->CopyResourcePlistFile("Info.plist") ||
!this->CopyResourcePlistFile("Description.plist")) {
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files"
@@ -372,7 +372,7 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
}
// Get path to the real PackageMaker, not a symlink:
- pkgPath = cmSystemTools::GetRealPath(pkgPath.c_str());
+ pkgPath = cmSystemTools::GetRealPath(pkgPath);
// Up from there to find the version.plist file in the "Contents" dir:
std::string contents_dir;
contents_dir = cmSystemTools::GetFilenamePath(pkgPath);
diff --git a/Source/CPack/cmCPackProductBuildGenerator.cxx b/Source/CPack/cmCPackProductBuildGenerator.cxx
index c2a13d0..d867046 100644
--- a/Source/CPack/cmCPackProductBuildGenerator.cxx
+++ b/Source/CPack/cmCPackProductBuildGenerator.cxx
@@ -73,9 +73,9 @@ int cmCPackProductBuildGenerator::PackageFiles()
// Copy or create all of the resource files we need.
std::string resDir = packageDirFileName + "/Contents";
- if (!this->CopyCreateResourceFile("License", resDir.c_str()) ||
- !this->CopyCreateResourceFile("ReadMe", resDir.c_str()) ||
- !this->CopyCreateResourceFile("Welcome", resDir.c_str())) {
+ if (!this->CopyCreateResourceFile("License", resDir) ||
+ !this->CopyCreateResourceFile("ReadMe", resDir) ||
+ !this->CopyCreateResourceFile("Welcome", resDir)) {
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files"
<< std::endl);
return 0;
@@ -185,10 +185,10 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage(
// then copy them into the script directory and make
// them executable
if (preflight) {
- this->CopyInstallScript(scriptDir.c_str(), preflight, "preinstall");
+ this->CopyInstallScript(scriptDir, preflight, "preinstall");
}
if (postflight) {
- this->CopyInstallScript(scriptDir.c_str(), postflight, "postinstall");
+ this->CopyInstallScript(scriptDir, postflight, "postinstall");
}
// The command that will be used to run ProductBuild
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index cdf292c..754bb5f 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -366,11 +366,11 @@ int cmCTestBuildHandler::ProcessHandler()
regexes.clear(); \
cmCTestOptionalLog(this->CTest, DEBUG, \
this << "Add " #regexes << std::endl, this->Quiet); \
- for (it = strings.begin(); it != strings.end(); ++it) { \
+ for (it = (strings).begin(); it != (strings).end(); ++it) { \
cmCTestOptionalLog(this->CTest, DEBUG, \
"Add " #strings ": " << *it << std::endl, \
this->Quiet); \
- regexes.push_back(it->c_str()); \
+ (regexes).push_back(it->c_str()); \
}
cmCTestBuildHandlerPopulateRegexVector(this->CustomErrorMatches,
this->ErrorMatchRegex);
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx
index 80bb55d..2e062bc 100644
--- a/Source/CursesDialog/ccmake.cxx
+++ b/Source/CursesDialog/ccmake.cxx
@@ -9,19 +9,22 @@
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
-#include "cmCursesStandardIncludes.h"
-
-#include "../cmDocumentation.h"
-#include "../cmSystemTools.h"
-#include "../cmake.h"
-
-#include <signal.h>
-#include <sys/ioctl.h>
+#include <cmConfigure.h>
+#include "cmCursesForm.h"
#include "cmCursesMainForm.h"
-#include <cmsys/Encoding.hxx>
+#include "cmCursesStandardIncludes.h"
+#include "cmDocumentation.h"
+#include "cmDocumentationEntry.h"
+#include "cmSystemTools.h"
+#include "cmake.h"
-#include <form.h>
+#include <cmsys/Encoding.hxx>
+#include <iostream>
+#include <signal.h>
+#include <string.h>
+#include <string>
+#include <vector>
static const char* cmDocumentationName[][2] = {
{ CM_NULLPTR, " ccmake - Curses Interface for CMake." },
diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx
index 99f7dcc..de95bae 100644
--- a/Source/CursesDialog/cmCursesBoolWidget.cxx
+++ b/Source/CursesDialog/cmCursesBoolWidget.cxx
@@ -11,7 +11,10 @@
============================================================================*/
#include "cmCursesBoolWidget.h"
-#include "cmCursesMainForm.h"
+#include "cmCursesWidget.h"
+#include "cmState.h"
+
+#include <string>
cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, int left,
int top)
diff --git a/Source/CursesDialog/cmCursesBoolWidget.h b/Source/CursesDialog/cmCursesBoolWidget.h
index d2899ee..b9f1b16 100644
--- a/Source/CursesDialog/cmCursesBoolWidget.h
+++ b/Source/CursesDialog/cmCursesBoolWidget.h
@@ -12,6 +12,9 @@
#ifndef cmCursesBoolWidget_h
#define cmCursesBoolWidget_h
+#include <cmConfigure.h>
+
+#include "cmCursesStandardIncludes.h"
#include "cmCursesWidget.h"
class cmCursesMainForm;
diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
index 462cb6e..d115c77 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
@@ -11,18 +11,20 @@
============================================================================*/
#include "cmCursesCacheEntryComposite.h"
-#include "../cmState.h"
-#include "../cmSystemTools.h"
-#include "../cmake.h"
#include "cmCursesBoolWidget.h"
-#include "cmCursesDummyWidget.h"
#include "cmCursesFilePathWidget.h"
#include "cmCursesLabelWidget.h"
#include "cmCursesOptionsWidget.h"
#include "cmCursesPathWidget.h"
#include "cmCursesStringWidget.h"
+#include "cmCursesWidget.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
+#include "cmake.h"
#include <assert.h>
+#include <cmConfigure.h>
+#include <vector>
cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
const std::string& key, int labelwidth, int entrywidth)
diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.h b/Source/CursesDialog/cmCursesCacheEntryComposite.h
index c9c8238..c717e1a 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.h
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h
@@ -12,8 +12,12 @@
#ifndef cmCursesCacheEntryComposite_h
#define cmCursesCacheEntryComposite_h
-#include "cmCursesLabelWidget.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+#include <string>
+
+class cmCursesLabelWidget;
+class cmCursesWidget;
class cmake;
class cmCursesCacheEntryComposite
diff --git a/Source/CursesDialog/cmCursesDummyWidget.cxx b/Source/CursesDialog/cmCursesDummyWidget.cxx
index a960090..fe73e7e 100644
--- a/Source/CursesDialog/cmCursesDummyWidget.cxx
+++ b/Source/CursesDialog/cmCursesDummyWidget.cxx
@@ -11,6 +11,9 @@
============================================================================*/
#include "cmCursesDummyWidget.h"
+#include "cmCursesWidget.h"
+#include "cmState.h"
+
cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, int left,
int top)
: cmCursesWidget(width, height, left, top)
diff --git a/Source/CursesDialog/cmCursesDummyWidget.h b/Source/CursesDialog/cmCursesDummyWidget.h
index e6ca91e..cf88e6e 100644
--- a/Source/CursesDialog/cmCursesDummyWidget.h
+++ b/Source/CursesDialog/cmCursesDummyWidget.h
@@ -12,6 +12,9 @@
#ifndef cmCursesDummyWidget_h
#define cmCursesDummyWidget_h
+#include <cmConfigure.h>
+
+#include "cmCursesStandardIncludes.h"
#include "cmCursesWidget.h"
class cmCursesMainForm;
diff --git a/Source/CursesDialog/cmCursesFilePathWidget.cxx b/Source/CursesDialog/cmCursesFilePathWidget.cxx
index 28a74a9..654e0d4 100644
--- a/Source/CursesDialog/cmCursesFilePathWidget.cxx
+++ b/Source/CursesDialog/cmCursesFilePathWidget.cxx
@@ -11,6 +11,9 @@
============================================================================*/
#include "cmCursesFilePathWidget.h"
+#include "cmCursesPathWidget.h"
+#include "cmState.h"
+
cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, int left,
int top)
: cmCursesPathWidget(width, height, left, top)
diff --git a/Source/CursesDialog/cmCursesFilePathWidget.h b/Source/CursesDialog/cmCursesFilePathWidget.h
index 72adc77..86c78ce 100644
--- a/Source/CursesDialog/cmCursesFilePathWidget.h
+++ b/Source/CursesDialog/cmCursesFilePathWidget.h
@@ -12,6 +12,8 @@
#ifndef cmCursesFilePathWidget_h
#define cmCursesFilePathWidget_h
+#include <cmConfigure.h> // IWYU pragma: keep
+
#include "cmCursesPathWidget.h"
class cmCursesFilePathWidget : public cmCursesPathWidget
diff --git a/Source/CursesDialog/cmCursesForm.cxx b/Source/CursesDialog/cmCursesForm.cxx
index b3320c9..699dabc 100644
--- a/Source/CursesDialog/cmCursesForm.cxx
+++ b/Source/CursesDialog/cmCursesForm.cxx
@@ -11,6 +11,8 @@
============================================================================*/
#include "cmCursesForm.h"
+#include <cmConfigure.h>
+
cmsys::ofstream cmCursesForm::DebugFile;
bool cmCursesForm::Debug = false;
diff --git a/Source/CursesDialog/cmCursesForm.h b/Source/CursesDialog/cmCursesForm.h
index c0192fc..bf97c66 100644
--- a/Source/CursesDialog/cmCursesForm.h
+++ b/Source/CursesDialog/cmCursesForm.h
@@ -12,6 +12,8 @@
#ifndef cmCursesForm_h
#define cmCursesForm_h
+#include <cmConfigure.h> // IWYU pragma: keep
+
#include "cmCursesStandardIncludes.h"
#include <cmsys/FStream.hxx>
diff --git a/Source/CursesDialog/cmCursesLabelWidget.cxx b/Source/CursesDialog/cmCursesLabelWidget.cxx
index 784738b..0ed9240 100644
--- a/Source/CursesDialog/cmCursesLabelWidget.cxx
+++ b/Source/CursesDialog/cmCursesLabelWidget.cxx
@@ -11,6 +11,8 @@
============================================================================*/
#include "cmCursesLabelWidget.h"
+#include "cmCursesWidget.h"
+
cmCursesLabelWidget::cmCursesLabelWidget(int width, int height, int left,
int top, const std::string& name)
: cmCursesWidget(width, height, left, top)
diff --git a/Source/CursesDialog/cmCursesLabelWidget.h b/Source/CursesDialog/cmCursesLabelWidget.h
index ff645af..990078b 100644
--- a/Source/CursesDialog/cmCursesLabelWidget.h
+++ b/Source/CursesDialog/cmCursesLabelWidget.h
@@ -12,8 +12,13 @@
#ifndef cmCursesLabelWidget_h
#define cmCursesLabelWidget_h
+#include <cmConfigure.h>
+
+#include "cmCursesStandardIncludes.h"
#include "cmCursesWidget.h"
+#include <string>
+
class cmCursesMainForm;
class cmCursesLabelWidget : public cmCursesWidget
diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx
index 47f98a2..75b136c 100644
--- a/Source/CursesDialog/cmCursesLongMessageForm.cxx
+++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx
@@ -11,10 +11,13 @@
============================================================================*/
#include "cmCursesLongMessageForm.h"
-#include "../cmSystemTools.h"
-#include "../cmVersion.h"
-#include "../cmake.h"
+#include "cmCursesForm.h"
#include "cmCursesMainForm.h"
+#include "cmCursesStandardIncludes.h"
+#include "cmVersion.h"
+
+#include <stdio.h>
+#include <string.h>
inline int ctrl(int z)
{
diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h
index a12ed2f..f8e8544 100644
--- a/Source/CursesDialog/cmCursesLongMessageForm.h
+++ b/Source/CursesDialog/cmCursesLongMessageForm.h
@@ -12,11 +12,13 @@
#ifndef cmCursesLongMessageForm_h
#define cmCursesLongMessageForm_h
-#include "cmCursesStandardIncludes.h"
+#include <cmConfigure.h>
#include "cmCursesForm.h"
+#include "cmCursesStandardIncludes.h"
-class cmCursesCacheEntryComposite;
+#include <string>
+#include <vector>
class cmCursesLongMessageForm : public cmCursesForm
{
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index 1d036c4..d8d1a7d 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -11,19 +11,22 @@
============================================================================*/
#include "cmCursesMainForm.h"
-#include "../cmSystemTools.h"
-#include "../cmVersion.h"
-#include "../cmake.h"
#include "cmAlgorithms.h"
-#include "cmCursesBoolWidget.h"
#include "cmCursesCacheEntryComposite.h"
#include "cmCursesDummyWidget.h"
-#include "cmCursesFilePathWidget.h"
+#include "cmCursesForm.h"
#include "cmCursesLabelWidget.h"
#include "cmCursesLongMessageForm.h"
-#include "cmCursesPathWidget.h"
+#include "cmCursesStandardIncludes.h"
#include "cmCursesStringWidget.h"
+#include "cmCursesWidget.h"
#include "cmState.h"
+#include "cmSystemTools.h"
+#include "cmVersion.h"
+#include "cmake.h"
+
+#include <stdio.h>
+#include <string.h>
inline int ctrl(int z)
{
@@ -742,8 +745,6 @@ void cmCursesMainForm::FixValue(cmState::CacheEntryType type,
}
}
-#include <unistd.h>
-
void cmCursesMainForm::HandleInput()
{
int x = 0, y = 0;
diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h
index d17ee33..1140945 100644
--- a/Source/CursesDialog/cmCursesMainForm.h
+++ b/Source/CursesDialog/cmCursesMainForm.h
@@ -12,13 +12,17 @@
#ifndef cmCursesMainForm_h
#define cmCursesMainForm_h
-#include "cmCursesStandardIncludes.h"
+#include <cmConfigure.h>
-#include "../cmState.h"
#include "cmCursesForm.h"
+#include "cmCursesStandardIncludes.h"
+#include "cmState.h"
+
+#include <stddef.h>
+#include <string>
+#include <vector>
class cmCursesCacheEntryComposite;
-class cmCursesWidget;
class cmake;
/** \class cmCursesMainForm
diff --git a/Source/CursesDialog/cmCursesOptionsWidget.cxx b/Source/CursesDialog/cmCursesOptionsWidget.cxx
index 9a88aef..f7a8cc6 100644
--- a/Source/CursesDialog/cmCursesOptionsWidget.cxx
+++ b/Source/CursesDialog/cmCursesOptionsWidget.cxx
@@ -11,7 +11,8 @@
============================================================================*/
#include "cmCursesOptionsWidget.h"
-#include "cmCursesMainForm.h"
+#include "cmCursesWidget.h"
+#include "cmState.h"
#define ctrl(z) ((z)&037)
diff --git a/Source/CursesDialog/cmCursesOptionsWidget.h b/Source/CursesDialog/cmCursesOptionsWidget.h
index f88b6bc..80dccad 100644
--- a/Source/CursesDialog/cmCursesOptionsWidget.h
+++ b/Source/CursesDialog/cmCursesOptionsWidget.h
@@ -12,8 +12,14 @@
#ifndef cmCursesOptionsWidget_h
#define cmCursesOptionsWidget_h
+#include <cmConfigure.h>
+
+#include "cmCursesStandardIncludes.h"
#include "cmCursesWidget.h"
+#include <string>
+#include <vector>
+
class cmCursesMainForm;
class cmCursesOptionsWidget : public cmCursesWidget
diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx
index 33fffd1..2ee64c7 100644
--- a/Source/CursesDialog/cmCursesPathWidget.cxx
+++ b/Source/CursesDialog/cmCursesPathWidget.cxx
@@ -12,8 +12,12 @@
#include "cmCursesPathWidget.h"
#include "cmCursesMainForm.h"
+#include "cmCursesStringWidget.h"
+#include "cmState.h"
#include "cmSystemTools.h"
+#include <vector>
+
cmCursesPathWidget::cmCursesPathWidget(int width, int height, int left,
int top)
: cmCursesStringWidget(width, height, left, top)
diff --git a/Source/CursesDialog/cmCursesPathWidget.h b/Source/CursesDialog/cmCursesPathWidget.h
index cd26df6..0ffce04 100644
--- a/Source/CursesDialog/cmCursesPathWidget.h
+++ b/Source/CursesDialog/cmCursesPathWidget.h
@@ -12,8 +12,15 @@
#ifndef cmCursesPathWidget_h
#define cmCursesPathWidget_h
+#include <cmConfigure.h>
+
+#include "cmCursesStandardIncludes.h"
#include "cmCursesStringWidget.h"
+#include <string>
+
+class cmCursesMainForm;
+
class cmCursesPathWidget : public cmCursesStringWidget
{
public:
diff --git a/Source/CursesDialog/cmCursesStandardIncludes.h b/Source/CursesDialog/cmCursesStandardIncludes.h
index 7b44df9..4929958 100644
--- a/Source/CursesDialog/cmCursesStandardIncludes.h
+++ b/Source/CursesDialog/cmCursesStandardIncludes.h
@@ -12,7 +12,7 @@
#ifndef cmCursesStandardIncludes_h
#define cmCursesStandardIncludes_h
-#include "../cmStandardIncludes.h"
+#include <cmConfigure.h>
#if defined(__sun__) && defined(__GNUC__)
#define _MSE_INT_H
diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx
index db98a00..726a128 100644
--- a/Source/CursesDialog/cmCursesStringWidget.cxx
+++ b/Source/CursesDialog/cmCursesStringWidget.cxx
@@ -11,7 +11,14 @@
============================================================================*/
#include "cmCursesStringWidget.h"
+#include "cmCursesForm.h"
#include "cmCursesMainForm.h"
+#include "cmCursesStandardIncludes.h"
+#include "cmCursesWidget.h"
+#include "cmState.h"
+
+#include <stdio.h>
+#include <string.h>
inline int ctrl(int z)
{
diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h
index c8ca482..2bcf7e6 100644
--- a/Source/CursesDialog/cmCursesStringWidget.h
+++ b/Source/CursesDialog/cmCursesStringWidget.h
@@ -12,8 +12,13 @@
#ifndef cmCursesStringWidget_h
#define cmCursesStringWidget_h
+#include <cmConfigure.h>
+
+#include "cmCursesStandardIncludes.h"
#include "cmCursesWidget.h"
+#include <string>
+
class cmCursesMainForm;
/** \class cmCursesStringWidget
diff --git a/Source/CursesDialog/cmCursesWidget.cxx b/Source/CursesDialog/cmCursesWidget.cxx
index 49f2795..ed76e7c 100644
--- a/Source/CursesDialog/cmCursesWidget.cxx
+++ b/Source/CursesDialog/cmCursesWidget.cxx
@@ -11,6 +11,8 @@
============================================================================*/
#include "cmCursesWidget.h"
+#include <cmConfigure.h>
+
cmCursesWidget::cmCursesWidget(int width, int height, int left, int top)
{
this->Field = new_field(height, width, top, left, 0, 0);
diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h
index 2ac5bb8..3f438af 100644
--- a/Source/CursesDialog/cmCursesWidget.h
+++ b/Source/CursesDialog/cmCursesWidget.h
@@ -12,9 +12,12 @@
#ifndef cmCursesWidget_h
#define cmCursesWidget_h
+#include <cmConfigure.h> // IWYU pragma: keep
+
#include "cmCursesStandardIncludes.h"
+#include "cmState.h"
-#include "../cmState.h"
+#include <string>
class cmCursesMainForm;
diff --git a/Source/QtDialog/AddCacheEntry.cxx b/Source/QtDialog/AddCacheEntry.cxx
index dc7a4b0..a94c54b 100644
--- a/Source/QtDialog/AddCacheEntry.cxx
+++ b/Source/QtDialog/AddCacheEntry.cxx
@@ -64,7 +64,8 @@ QVariant AddCacheEntry::value() const
QWidget* w = this->StackedWidget->currentWidget();
if (qobject_cast<QLineEdit*>(w)) {
return static_cast<QLineEdit*>(w)->text();
- } else if (qobject_cast<QCheckBox*>(w)) {
+ }
+ if (qobject_cast<QCheckBox*>(w)) {
return static_cast<QCheckBox*>(w)->isChecked();
}
return QVariant();
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index ee3389c..4de4bef 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -27,18 +27,21 @@
#include <cmsys/Encoding.hxx>
#include <cmsys/SystemTools.hxx>
-static const char* cmDocumentationName[][2] = { { 0,
+#include "cmSystemTools.h" // IWYU pragma: keep
+
+static const char* cmDocumentationName[][2] = { { CM_NULLPTR,
" cmake-gui - CMake GUI." },
- { 0, 0 } };
+ { CM_NULLPTR, CM_NULLPTR } };
static const char* cmDocumentationUsage[][2] = {
- { 0, " cmake-gui [options]\n"
- " cmake-gui [options] <path-to-source>\n"
- " cmake-gui [options] <path-to-existing-build>" },
- { 0, 0 }
+ { CM_NULLPTR, " cmake-gui [options]\n"
+ " cmake-gui [options] <path-to-source>\n"
+ " cmake-gui [options] <path-to-existing-build>" },
+ { CM_NULLPTR, CM_NULLPTR }
};
-static const char* cmDocumentationOptions[][2] = { { 0, 0 } };
+static const char* cmDocumentationOptions[]
+ [2] = { { CM_NULLPTR, CM_NULLPTR } };
#if defined(Q_OS_MAC)
static int cmOSXInstall(std::string dir);
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index fda3e58..5b84597 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -41,7 +41,7 @@
QCMakeThread::QCMakeThread(QObject* p)
: QThread(p)
- , CMakeInstance(NULL)
+ , CMakeInstance(CM_NULLPTR)
{
}
@@ -57,7 +57,7 @@ void QCMakeThread::run()
emit this->cmakeInitialized();
this->exec();
delete this->CMakeInstance;
- this->CMakeInstance = NULL;
+ this->CMakeInstance = CM_NULLPTR;
}
CMakeSetupDialog::CMakeSetupDialog()
diff --git a/Source/QtDialog/Compilers.h b/Source/QtDialog/Compilers.h
index bdb1962..276e2a5 100644
--- a/Source/QtDialog/Compilers.h
+++ b/Source/QtDialog/Compilers.h
@@ -3,6 +3,8 @@
#ifndef COMPILERS_HPP
#define COMPILERS_HPP
+#include <cmConfigure.h>
+
#include <QWidget>
#include <ui_Compilers.h>
@@ -11,7 +13,7 @@ class Compilers : public QWidget, public Ui::Compilers
{
Q_OBJECT
public:
- Compilers(QWidget* p = NULL)
+ Compilers(QWidget* p = CM_NULLPTR)
: QWidget(p)
{
this->setupUi(this);
diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx
index ca5e3b5..c34751a 100644
--- a/Source/QtDialog/FirstConfigure.cxx
+++ b/Source/QtDialog/FirstConfigure.cxx
@@ -129,8 +129,9 @@ bool StartCompilerSetup::crossCompilerSetup() const
void StartCompilerSetup::onSelectionChanged(bool on)
{
- if (on)
+ if (on) {
selectionChanged();
+ }
}
void StartCompilerSetup::onGeneratorChanged(QString const& name)
@@ -144,12 +145,15 @@ void StartCompilerSetup::onGeneratorChanged(QString const& name)
int StartCompilerSetup::nextId() const
{
- if (compilerSetup())
+ if (compilerSetup()) {
return NativeSetup;
- if (crossCompilerSetup())
+ }
+ if (crossCompilerSetup()) {
return CrossSetup;
- if (crossCompilerToolChainFile())
+ }
+ if (crossCompilerToolChainFile()) {
return ToolchainSetup;
+ }
return -1;
}
@@ -515,7 +519,8 @@ QString FirstConfigure::getCCompiler() const
{
if (this->compilerSetup()) {
return this->mNativeCompilerSetupPage->getCCompiler();
- } else if (this->crossCompilerSetup()) {
+ }
+ if (this->crossCompilerSetup()) {
return this->mCrossCompilerSetupPage->getCCompiler();
}
return QString();
@@ -525,7 +530,8 @@ QString FirstConfigure::getCXXCompiler() const
{
if (this->compilerSetup()) {
return this->mNativeCompilerSetupPage->getCXXCompiler();
- } else if (this->crossCompilerSetup()) {
+ }
+ if (this->crossCompilerSetup()) {
return this->mCrossCompilerSetupPage->getCXXCompiler();
}
return QString();
@@ -535,7 +541,8 @@ QString FirstConfigure::getFortranCompiler() const
{
if (this->compilerSetup()) {
return this->mNativeCompilerSetupPage->getFortranCompiler();
- } else if (this->crossCompilerSetup()) {
+ }
+ if (this->crossCompilerSetup()) {
return this->mCrossCompilerSetupPage->getFortranCompiler();
}
return QString();
diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h
index a818c6b..7eadb09 100644
--- a/Source/QtDialog/QCMake.h
+++ b/Source/QtDialog/QCMake.h
@@ -13,6 +13,8 @@
#ifndef QCMake_h
#define QCMake_h
+#include <cmConfigure.h>
+
#include "cmake.h"
#ifdef _MSC_VER
@@ -71,7 +73,7 @@ class QCMake : public QObject
{
Q_OBJECT
public:
- QCMake(QObject* p = 0);
+ QCMake(QObject* p = CM_NULLPTR);
~QCMake();
public slots:
/// load the cache file in a directory
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx
index cc1f4aa..88ea049 100644
--- a/Source/QtDialog/QCMakeCacheView.cxx
+++ b/Source/QtDialog/QCMakeCacheView.cxx
@@ -33,7 +33,7 @@ public:
}
protected:
- bool filterAcceptsRow(int row, const QModelIndex& p) const
+ bool filterAcceptsRow(int row, const QModelIndex& p) const CM_OVERRIDE
{
QStringList strs;
const QAbstractItemModel* m = this->sourceModel();
@@ -87,7 +87,7 @@ public:
protected:
bool ShowAdvanced;
- bool filterAcceptsRow(int row, const QModelIndex& p) const
+ bool filterAcceptsRow(int row, const QModelIndex& p) const CM_OVERRIDE
{
const QAbstractItemModel* m = this->sourceModel();
QModelIndex idx = m->index(row, 0, p);
@@ -160,7 +160,8 @@ QModelIndex QCMakeCacheView::moveCursor(CursorAction act,
// want home/end to go to begin/end of rows, not columns
if (act == MoveHome) {
return this->model()->index(0, 1);
- } else if (act == MoveEnd) {
+ }
+ if (act == MoveEnd) {
return this->model()->index(this->model()->rowCount() - 1, 1);
}
return QTreeView::moveCursor(act, mod);
@@ -538,15 +539,16 @@ void QCMakeCacheModelDelegate::setFileDialogFlag(bool f)
this->FileDialogFlag = f;
}
-QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p,
- const QStyleOptionViewItem&,
- const QModelIndex& idx) const
+QWidget* QCMakeCacheModelDelegate::createEditor(
+ QWidget* p, const QStyleOptionViewItem& /*option*/,
+ const QModelIndex& idx) const
{
QModelIndex var = idx.sibling(idx.row(), 0);
int type = var.data(QCMakeCacheModel::TypeRole).toInt();
if (type == QCMakeProperty::BOOL) {
- return NULL;
- } else if (type == QCMakeProperty::PATH) {
+ return CM_NULLPTR;
+ }
+ if (type == QCMakeProperty::PATH) {
QCMakePathEditor* editor =
new QCMakePathEditor(p, var.data(Qt::DisplayRole).toString());
QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this,
@@ -645,7 +647,7 @@ QSize QCMakeCacheModelDelegate::sizeHint(const QStyleOptionViewItem& option,
QStyleOptionButton opt;
opt.QStyleOption::operator=(option);
sz = sz.expandedTo(
- style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, NULL)
+ style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, CM_NULLPTR)
.size());
return sz;
diff --git a/Source/QtDialog/QCMakeWidgets.cxx b/Source/QtDialog/QCMakeWidgets.cxx
index 4b3eb34..fc481b8 100644
--- a/Source/QtDialog/QCMakeWidgets.cxx
+++ b/Source/QtDialog/QCMakeWidgets.cxx
@@ -67,7 +67,7 @@ void QCMakeFilePathEditor::chooseFile()
this->fileDialogExists(true);
path =
QFileDialog::getOpenFileName(this, title, info.absolutePath(), QString(),
- NULL, QFileDialog::DontResolveSymlinks);
+ CM_NULLPTR, QFileDialog::DontResolveSymlinks);
this->fileDialogExists(false);
if (!path.isEmpty()) {
@@ -99,7 +99,7 @@ void QCMakePathEditor::chooseFile()
// use same QDirModel for all completers
static QDirModel* fileDirModel()
{
- static QDirModel* m = NULL;
+ static QDirModel* m = CM_NULLPTR;
if (!m) {
m = new QDirModel();
}
@@ -107,7 +107,7 @@ static QDirModel* fileDirModel()
}
static QDirModel* pathDirModel()
{
- static QDirModel* m = NULL;
+ static QDirModel* m = CM_NULLPTR;
if (!m) {
m = new QDirModel();
m->setFilter(QDir::AllDirs | QDir::Drives | QDir::NoDotAndDotDot);
diff --git a/Source/QtDialog/QCMakeWidgets.h b/Source/QtDialog/QCMakeWidgets.h
index f1e87ce..0d95e63 100644
--- a/Source/QtDialog/QCMakeWidgets.h
+++ b/Source/QtDialog/QCMakeWidgets.h
@@ -13,6 +13,8 @@
#ifndef QCMakeWidgets_h
#define QCMakeWidgets_h
+#include <cmConfigure.h>
+
#include <QComboBox>
#include <QCompleter>
#include <QLineEdit>
@@ -43,7 +45,7 @@ class QCMakePathEditor : public QCMakeFileEditor
{
Q_OBJECT
public:
- QCMakePathEditor(QWidget* p = NULL, const QString& var = QString());
+ QCMakePathEditor(QWidget* p = CM_NULLPTR, const QString& var = QString());
void chooseFile();
};
@@ -52,7 +54,8 @@ class QCMakeFilePathEditor : public QCMakeFileEditor
{
Q_OBJECT
public:
- QCMakeFilePathEditor(QWidget* p = NULL, const QString& var = QString());
+ QCMakeFilePathEditor(QWidget* p = CM_NULLPTR,
+ const QString& var = QString());
void chooseFile();
};
diff --git a/Source/bindexplib.h b/Source/bindexplib.h
index 8661a4a..715808a 100644
--- a/Source/bindexplib.h
+++ b/Source/bindexplib.h
@@ -13,6 +13,8 @@
#ifndef bindexplib_h
#define bindexplib_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h
index ee803c8..a6c71d2 100644
--- a/Source/cmAlgorithms.h
+++ b/Source/cmAlgorithms.h
@@ -12,6 +12,8 @@
#ifndef cmAlgorithms_h
#define cmAlgorithms_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
inline bool cmHasLiteralPrefixImpl(const std::string& str1, const char* str2,
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index b4ddc3e..6523e3e 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -9,52 +9,54 @@
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
-#include "cmCurl.h" // include before anything that includes windows.h
-
#include "cmCTest.h"
#include "cmAlgorithms.h"
-#include "cmCTestCommand.h"
-#include "cmCTestStartCommand.h"
-#include "cmDynamicLoader.h"
-#include "cmGeneratedFileStream.h"
-#include "cmGlobalGenerator.h"
-#include "cmMakefile.h"
-#include "cmState.h"
-#include "cmVersionMacros.h"
-#include "cmXMLWriter.h"
-#include "cmake.h"
-#include <cmsys/Base64.h>
-#include <cmsys/Directory.hxx>
-#include <cmsys/FStream.hxx>
-#include <cmsys/SystemInformation.hxx>
-
#include "cmCTestBuildAndTestHandler.h"
#include "cmCTestBuildHandler.h"
#include "cmCTestConfigureHandler.h"
#include "cmCTestCoverageHandler.h"
+#include "cmCTestGenericHandler.h"
#include "cmCTestMemCheckHandler.h"
#include "cmCTestScriptHandler.h"
+#include "cmCTestStartCommand.h"
#include "cmCTestSubmitHandler.h"
#include "cmCTestTestHandler.h"
#include "cmCTestUpdateHandler.h"
#include "cmCTestUploadHandler.h"
-
+#include "cmCurl.h"
+#include "cmDynamicLoader.h"
+#include "cmGeneratedFileStream.h"
+#include "cmGlobalGenerator.h"
+#include "cmMakefile.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
#include "cmVersion.h"
+#include "cmVersionConfig.h"
+#include "cmXMLWriter.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/RegularExpression.hxx>
-
+#include <cmsys/String.hxx>
+#include <cmsys/SystemInformation.hxx>
#include <ctype.h>
-#include <float.h>
-#include <math.h>
+#include <iostream>
+#include <map>
+#include <sstream>
+#include <stdio.h>
#include <stdlib.h>
-
-#include <cm_auto_ptr.hxx>
-
-#include <cm_zlib.h>
-#include <cmsys/Base64.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. */
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index b6657c9..a73cd83 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -13,18 +13,20 @@
#ifndef cmCTest_h
#define cmCTest_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h>
-#include "cmListFileCache.h"
+#include <cmsys/String.hxx>
+#include <map>
+#include <set>
+#include <sstream>
+#include <string>
#include <time.h>
+#include <vector>
-class cmake;
-class cmMakefile;
class cmCTestGenericHandler;
-class cmGeneratedFileStream;
-class cmCTestCommand;
-class cmCTestScriptHandler;
class cmCTestStartCommand;
+class cmGeneratedFileStream;
+class cmMakefile;
class cmXMLWriter;
#define cmCTestLog(ctSelf, logType, msg) \
@@ -43,16 +45,6 @@ class cmXMLWriter;
cmCTestLog_msg.str().c_str(), suppress); \
} while (0)
-#ifdef cerr
-#undef cerr
-#endif
-#define cerr no_cerr_use_cmCTestLog
-
-#ifdef cout
-#undef cout
-#endif
-#define cout no_cout_use_cmCTestLog
-
/** \class cmCTest
* \brief Represents a ctest invocation.
*
diff --git a/Source/cmCallVisualStudioMacro.h b/Source/cmCallVisualStudioMacro.h
index e516fe2..fd735cf 100644
--- a/Source/cmCallVisualStudioMacro.h
+++ b/Source/cmCallVisualStudioMacro.h
@@ -12,6 +12,8 @@
#ifndef cmCallVisualStudioMacro_h
#define cmCallVisualStudioMacro_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
/** \class cmCallVisualStudioMacro
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx
index 68111a0..473634d 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -11,12 +11,18 @@
============================================================================*/
#include "cmCommandArgumentParserHelper.h"
+#include <cm_kwiml.h>
+
+#include "cmCommandArgumentLexer.h"
#include "cmMakefile.h"
-#include "cmOutputConverter.h"
#include "cmState.h"
#include "cmSystemTools.h"
+#include "cmake.h"
-#include "cmCommandArgumentLexer.h"
+#include <cmConfigure.h>
+#include <iostream>
+#include <sstream>
+#include <string.h>
int cmCommandArgument_yyparse(yyscan_t yyscanner);
//
@@ -74,7 +80,7 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key,
std::string str;
if (cmSystemTools::GetEnv(var, str)) {
if (this->EscapeQuotes) {
- return this->AddString(cmSystemTools::EscapeQuotes(str.c_str()));
+ return this->AddString(cmSystemTools::EscapeQuotes(str));
}
return this->AddString(str);
}
diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h
index 97b706c..6faf12b 100644
--- a/Source/cmCommandArgumentParserHelper.h
+++ b/Source/cmCommandArgumentParserHelper.h
@@ -12,7 +12,10 @@
#ifndef cmCommandArgumentParserHelper_h
#define cmCommandArgumentParserHelper_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <string>
+#include <vector>
#define YYSTYPE cmCommandArgumentParserHelper::ParserType
#define YYSTYPE_IS_DECLARED
diff --git a/Source/cmCommandArgumentsHelper.h b/Source/cmCommandArgumentsHelper.h
index 9133148..19a6f8d 100644
--- a/Source/cmCommandArgumentsHelper.h
+++ b/Source/cmCommandArgumentsHelper.h
@@ -12,6 +12,8 @@
#ifndef cmCommandArgumentsHelper_h
#define cmCommandArgumentsHelper_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
class cmCommandArgumentsHelper;
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index d7532b3..94f03e8 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -14,6 +14,7 @@
#include "cmAlgorithms.h"
#include "cmOutputConverter.h"
+#include "cmSystemTools.h"
static std::string const keyAND = "AND";
static std::string const keyCOMMAND = "COMMAND";
diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in
index cb671dd..ccea22d 100644
--- a/Source/cmConfigure.cmake.h.in
+++ b/Source/cmConfigure.cmake.h.in
@@ -12,7 +12,7 @@
#ifndef cmConfigure_h
#define cmConfigure_h
-#include <cmsys/Configure.hxx>
+#include <cmsys/Configure.hxx> // IWYU pragma: keep
#ifdef _MSC_VER
#pragma warning(disable : 4786)
diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx
index 8e2d87e..a3d3dd5 100644
--- a/Source/cmCryptoHash.cxx
+++ b/Source/cmCryptoHash.cxx
@@ -12,8 +12,10 @@
#include "cmCryptoHash.h"
#include "cm_sha2.h"
+
#include <cmsys/FStream.hxx>
#include <cmsys/MD5.h>
+#include <string.h>
CM_AUTO_PTR<cmCryptoHash> cmCryptoHash::New(const char* algo)
{
diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h
index 4e92b06..0be2918 100644
--- a/Source/cmCryptoHash.h
+++ b/Source/cmCryptoHash.h
@@ -12,9 +12,11 @@
#ifndef cmCryptoHash_h
#define cmCryptoHash_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h>
#include <cm_auto_ptr.hxx>
+#include <string>
+#include <vector>
/**
* @brief Abstract base class for cryptographic hash generators
diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx
index 5bc4f91..91da239 100644
--- a/Source/cmCurl.cxx
+++ b/Source/cmCurl.cxx
@@ -11,7 +11,13 @@
============================================================================*/
#include "cmCurl.h"
+#include "cmThirdParty.h"
+
+#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \
+ !defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH)
+#define CMAKE_FIND_CAFILE
#include "cmSystemTools.h"
+#endif
// curl versions before 7.21.5 did not provide this error code
#if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x071505
@@ -19,9 +25,9 @@
#endif
#define check_curl_result(result, errstr) \
- if (result != CURLE_OK && result != CURLE_NOT_BUILT_IN) { \
+ if ((result) != CURLE_OK && (result) != CURLE_NOT_BUILT_IN) { \
e += e.empty() ? "" : "\n"; \
- e += errstr; \
+ e += (errstr); \
e += ::curl_easy_strerror(result); \
}
@@ -32,8 +38,7 @@ std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile)
::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile);
check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
}
-#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \
- !defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH)
+#ifdef CMAKE_FIND_CAFILE
#define CMAKE_CAFILE_FEDORA "/etc/pki/tls/certs/ca-bundle.crt"
else if (cmSystemTools::FileExists(CMAKE_CAFILE_FEDORA, true)) {
::CURLcode res =
diff --git a/Source/cmCurl.h b/Source/cmCurl.h
index 26bf94e..6434f50 100644
--- a/Source/cmCurl.h
+++ b/Source/cmCurl.h
@@ -12,9 +12,10 @@
#ifndef cmCurl_h
#define cmCurl_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h>
-#include "cm_curl.h"
+#include <cm_curl.h>
+#include <string>
std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile = CM_NULLPTR);
diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx
index eaa49b0..89a04d1 100644
--- a/Source/cmCustomCommand.cxx
+++ b/Source/cmCustomCommand.cxx
@@ -13,7 +13,7 @@
#include "cmMakefile.h"
-#include <cm_auto_ptr.hxx>
+#include <cmConfigure.h>
cmCustomCommand::cmCustomCommand()
: Backtrace()
diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h
index 34753f4..b855bb9 100644
--- a/Source/cmCustomCommand.h
+++ b/Source/cmCustomCommand.h
@@ -12,9 +12,15 @@
#ifndef cmCustomCommand_h
#define cmCustomCommand_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+#include "cmCustomCommandLines.h"
#include "cmListFileCache.h"
+
+#include <string>
+#include <utility>
+#include <vector>
+
class cmMakefile;
/** \class cmCustomCommand
diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx
index 6165bcf..8b8579b 100644
--- a/Source/cmCustomCommandGenerator.cxx
+++ b/Source/cmCustomCommandGenerator.cxx
@@ -12,10 +12,17 @@
#include "cmCustomCommandGenerator.h"
#include "cmCustomCommand.h"
+#include "cmCustomCommandLines.h"
#include "cmGeneratorExpression.h"
+#include "cmGeneratorTarget.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmOutputConverter.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
+#include "cm_auto_ptr.hxx"
+
+#include <cmConfigure.h>
cmCustomCommandGenerator::cmCustomCommandGenerator(cmCustomCommand const& cc,
const std::string& config,
diff --git a/Source/cmCustomCommandGenerator.h b/Source/cmCustomCommandGenerator.h
index a361153..f4cd9fd 100644
--- a/Source/cmCustomCommandGenerator.h
+++ b/Source/cmCustomCommandGenerator.h
@@ -12,11 +12,14 @@
#ifndef cmCustomCommandGenerator_h
#define cmCustomCommandGenerator_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <string>
+#include <vector>
class cmCustomCommand;
-class cmLocalGenerator;
class cmGeneratorExpression;
+class cmLocalGenerator;
class cmCustomCommandGenerator
{
diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index e0fb59b..fecc488 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -12,6 +12,8 @@
#include "cmDefinitions.h"
#include <assert.h>
+#include <set>
+#include <utility>
cmDefinitions::Def cmDefinitions::NoDef;
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index 8f1813c..d1423ec 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -12,20 +12,23 @@
#ifndef cmDefinitions_h
#define cmDefinitions_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h>
#include "cmLinkedTree.h"
+#include <string>
+#include <vector>
+
#if defined(CMAKE_BUILD_WITH_CMAKE)
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
#include <unordered_map>
#else
#include "cmsys/hash_map.hxx"
#endif
+#else
+#include <map>
#endif
-#include <list>
-
/** \class cmDefinitions
* \brief Store a scope of variable definitions for CMake language.
*
diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx
index ce72eda..23ff3a4 100644
--- a/Source/cmDepends.cxx
+++ b/Source/cmDepends.cxx
@@ -16,8 +16,11 @@
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmSystemTools.h"
+
#include <cmsys/FStream.hxx>
+#include <sstream>
#include <string.h>
+#include <utility>
cmDepends::cmDepends(cmLocalGenerator* lg, const char* targetDir)
: CompileDirectory()
diff --git a/Source/cmDepends.h b/Source/cmDepends.h
index 0e1cbb9..5ed784d 100644
--- a/Source/cmDepends.h
+++ b/Source/cmDepends.h
@@ -12,7 +12,14 @@
#ifndef cmDepends_h
#define cmDepends_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h>
+
+#include <iosfwd>
+#include <map>
+#include <set>
+#include <stddef.h>
+#include <string>
+#include <vector>
class cmFileTimeComparison;
class cmLocalGenerator;
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx
index 928f7ec..fbbf42f 100644
--- a/Source/cmDependsC.cxx
+++ b/Source/cmDependsC.cxx
@@ -15,10 +15,11 @@
#include "cmFileTimeComparison.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
+#include "cmOutputConverter.h"
#include "cmSystemTools.h"
-#include <cmsys/FStream.hxx>
-#include <ctype.h> // isspace
+#include <cmsys/FStream.hxx>
+#include <utility>
#define INCLUDE_REGEX_LINE \
"^[ \t]*#[ \t]*(include|import)[ \t]*[<\"]([^\">]+)([\">])"
diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h
index bde07b7..5606fb3 100644
--- a/Source/cmDependsC.h
+++ b/Source/cmDependsC.h
@@ -12,10 +12,19 @@
#ifndef cmDependsC_h
#define cmDependsC_h
+#include <cmConfigure.h>
+
#include "cmDepends.h"
#include <cmsys/RegularExpression.hxx>
+#include <iosfwd>
+#include <map>
#include <queue>
+#include <set>
+#include <string>
+#include <vector>
+
+class cmLocalGenerator;
/** \class cmDependsC
* \brief Dependency scanner for C and C++ object files.
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index 8c0acce..1eece98 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -11,14 +11,20 @@
============================================================================*/
#include "cmDependsFortran.h"
+#include "cmFortranParser.h" /* Interface to parser object. */
#include "cmGeneratedFileStream.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
+#include "cmOutputConverter.h"
#include "cmSystemTools.h"
-#include "cmFortranParser.h" /* Interface to parser object. */
#include <assert.h>
#include <cmsys/FStream.hxx>
+#include <iostream>
+#include <map>
+#include <stdlib.h>
+#include <string.h>
+#include <utility>
// 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
diff --git a/Source/cmDependsFortran.h b/Source/cmDependsFortran.h
index f4385eb..b6de46f 100644
--- a/Source/cmDependsFortran.h
+++ b/Source/cmDependsFortran.h
@@ -12,10 +12,17 @@
#ifndef cmFortran_h
#define cmFortran_h
+#include <cmConfigure.h>
+#include <iosfwd>
+#include <set>
+#include <string>
+#include <vector>
+
#include "cmDepends.h"
class cmDependsFortranInternals;
class cmFortranSourceInfo;
+class cmLocalGenerator;
/** \class cmDependsFortran
* \brief Dependency scanner for Fortran object files.
diff --git a/Source/cmDependsJava.cxx b/Source/cmDependsJava.cxx
index a9130e6..18bc695 100644
--- a/Source/cmDependsJava.cxx
+++ b/Source/cmDependsJava.cxx
@@ -11,7 +11,6 @@
============================================================================*/
#include "cmDependsJava.h"
-#include "cmDependsJavaParserHelper.h"
#include "cmSystemTools.h"
cmDependsJava::cmDependsJava()
diff --git a/Source/cmDependsJava.h b/Source/cmDependsJava.h
index 5bb3039..95265c5 100644
--- a/Source/cmDependsJava.h
+++ b/Source/cmDependsJava.h
@@ -12,8 +12,15 @@
#ifndef cmDependsJava_h
#define cmDependsJava_h
+#include <cmConfigure.h>
+
#include "cmDepends.h"
+#include <iosfwd>
+#include <map>
+#include <set>
+#include <string>
+
/** \class cmDependsJava
* \brief Dependency scanner for Java class files.
*/
diff --git a/Source/cmDependsJavaLexer.cxx b/Source/cmDependsJavaLexer.cxx
index f7676d9..5d644ce 100644
--- a/Source/cmDependsJavaLexer.cxx
+++ b/Source/cmDependsJavaLexer.cxx
@@ -1,3 +1,5 @@
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
#line 2 "cmDependsJavaLexer.cxx"
diff --git a/Source/cmDependsJavaParserHelper.cxx b/Source/cmDependsJavaParserHelper.cxx
index 79c4669..8d77ca6 100644
--- a/Source/cmDependsJavaParserHelper.cxx
+++ b/Source/cmDependsJavaParserHelper.cxx
@@ -11,9 +11,16 @@
============================================================================*/
#include "cmDependsJavaParserHelper.h"
+#include <cmConfigure.h>
+
#include "cmDependsJavaLexer.h"
#include "cmSystemTools.h"
+
#include <cmsys/FStream.hxx>
+#include <iostream>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
int cmDependsJava_yyparse(yyscan_t yyscanner);
diff --git a/Source/cmDependsJavaParserHelper.h b/Source/cmDependsJavaParserHelper.h
index 6ff0245..731bbcc 100644
--- a/Source/cmDependsJavaParserHelper.h
+++ b/Source/cmDependsJavaParserHelper.h
@@ -12,7 +12,10 @@
#ifndef cmDependsJavaParserHelper_h
#define cmDependsJavaParserHelper_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <string>
+#include <vector>
#define YYSTYPE cmDependsJavaParserHelper::ParserType
#define YYSTYPE_IS_DECLARED
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 5516cf1..70612d1 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -12,17 +12,18 @@
#include "cmDocumentation.h"
#include "cmAlgorithms.h"
+#include "cmDocumentationEntry.h"
+#include "cmDocumentationSection.h"
#include "cmRST.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
-#include <cmsys/Directory.hxx>
+#include <algorithm>
#include <cmsys/FStream.hxx>
#include <cmsys/Glob.hxx>
-
#include <ctype.h>
-
-#include <algorithm>
+#include <string.h>
+#include <utility>
static const char* cmDocumentationStandardOptions[][2] = {
{ "--help,-help,-usage,-h,-H,/?", "Print usage information and exit." },
@@ -165,7 +166,7 @@ bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os)
#define GET_OPT_ARGUMENT(target) \
if ((i + 1 < argc) && !this->IsOption(argv[i + 1])) { \
- target = argv[i + 1]; \
+ (target) = argv[i + 1]; \
i = i + 1; \
};
diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h
index ac36c8b..7661eb7 100644
--- a/Source/cmDocumentation.h
+++ b/Source/cmDocumentation.h
@@ -12,15 +12,17 @@
#ifndef _cmDocumentation_h
#define _cmDocumentation_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h>
#include "cmDocumentationFormatter.h"
-#include "cmDocumentationSection.h"
-#include "cmake.h"
-namespace cmsys {
-class Directory;
-}
+#include <iosfwd>
+#include <map>
+#include <string>
+#include <vector>
+
+class cmDocumentationSection;
+struct cmDocumentationEntry;
/** Class to generate documentation. */
class cmDocumentation : public cmDocumentationEnums
diff --git a/Source/cmDocumentationFormatter.cxx b/Source/cmDocumentationFormatter.cxx
index 4816bb9..5a718a2 100644
--- a/Source/cmDocumentationFormatter.cxx
+++ b/Source/cmDocumentationFormatter.cxx
@@ -11,8 +11,14 @@
============================================================================*/
#include "cmDocumentationFormatter.h"
+#include "cmDocumentationEntry.h"
#include "cmDocumentationSection.h"
+#include <ostream>
+#include <string.h>
+#include <string>
+#include <vector>
+
cmDocumentationFormatter::cmDocumentationFormatter()
: TextWidth(77)
, TextIndent("")
diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h
index 7c4c35b..09fb20b 100644
--- a/Source/cmDocumentationFormatter.h
+++ b/Source/cmDocumentationFormatter.h
@@ -12,7 +12,9 @@
#ifndef _cmDocumentationFormatter_h
#define _cmDocumentationFormatter_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <iosfwd>
/** This is just a helper class to make it build with MSVC 6.0.
Actually the enums and internal classes could directly go into
diff --git a/Source/cmDocumentationSection.h b/Source/cmDocumentationSection.h
index 161a731..1d41070 100644
--- a/Source/cmDocumentationSection.h
+++ b/Source/cmDocumentationSection.h
@@ -12,7 +12,12 @@
#ifndef _cmDocumentationSection_h
#define _cmDocumentationSection_h
-#include "cmDocumentationFormatter.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include "cmDocumentationEntry.h"
+
+#include <string>
+#include <vector>
// Low-level interface for custom documents:
/** Internal class representing a section of the documentation.
diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx
index f6841ad..762feee 100644
--- a/Source/cmDynamicLoader.cxx
+++ b/Source/cmDynamicLoader.cxx
@@ -11,6 +11,13 @@
============================================================================*/
#include "cmDynamicLoader.h"
+#include <cmConfigure.h>
+
+#include <cmsys/DynamicLoader.hxx>
+#include <map>
+#include <string>
+#include <utility>
+
class cmDynamicLoaderCache
{
public:
diff --git a/Source/cmDynamicLoader.h b/Source/cmDynamicLoader.h
index 58d9ae9..4f6ade5 100644
--- a/Source/cmDynamicLoader.h
+++ b/Source/cmDynamicLoader.h
@@ -17,7 +17,7 @@
#ifndef cmDynamicLoader_h
#define cmDynamicLoader_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
#include <cmsys/DynamicLoader.hxx>
diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index 150593b..6fff984 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -9,12 +9,16 @@
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
-#include "cmStandardIncludes.h" // to get CMAKE_USE_ELF_PARSER first
-
#include "cmELF.h"
#include <cm_auto_ptr.hxx>
+#include <cm_kwiml.h>
#include <cmsys/FStream.hxx>
+#include <map>
+#include <sstream>
+#include <stddef.h>
+#include <utility>
+#include <vector>
// Include the ELF format information system header.
#if defined(__OpenBSD__)
diff --git a/Source/cmELF.h b/Source/cmELF.h
index 80832ad..a4c3456 100644
--- a/Source/cmELF.h
+++ b/Source/cmELF.h
@@ -12,6 +12,11 @@
#ifndef cmELF_h
#define cmELF_h
+#include <cmConfigure.h>
+
+#include <iosfwd>
+#include <string>
+
#if !defined(CMAKE_USE_ELF_PARSER)
#error "This file may be included only if CMAKE_USE_ELF_PARSER is enabled."
#endif
diff --git a/Source/cmExecutionStatus.h b/Source/cmExecutionStatus.h
index 8006514..14e1454 100644
--- a/Source/cmExecutionStatus.h
+++ b/Source/cmExecutionStatus.h
@@ -12,6 +12,8 @@
#ifndef cmExecutionStatus_h
#define cmExecutionStatus_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
/** \class cmExecutionStatus
diff --git a/Source/cmExpandedCommandArgument.h b/Source/cmExpandedCommandArgument.h
index 1f8e405..fa0eaa9 100644
--- a/Source/cmExpandedCommandArgument.h
+++ b/Source/cmExpandedCommandArgument.h
@@ -12,6 +12,8 @@
#ifndef cmExpandedCommandArgument_h
#define cmExpandedCommandArgument_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
/** \class cmExpandedCommandArgument
diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index 390477a..8f4dfd8 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -12,9 +12,23 @@
#include "cmExportBuildFileGenerator.h"
#include "cmExportSet.h"
+#include "cmGeneratorExpression.h"
+#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
#include "cmTargetExport.h"
+#include "cmake.h"
+
+#include <algorithm>
+#include <map>
+#include <set>
+#include <sstream>
+#include <utility>
cmExportBuildFileGenerator::cmExportBuildFileGenerator()
{
diff --git a/Source/cmExportBuildFileGenerator.h b/Source/cmExportBuildFileGenerator.h
index 417e8c9..990824f 100644
--- a/Source/cmExportBuildFileGenerator.h
+++ b/Source/cmExportBuildFileGenerator.h
@@ -12,10 +12,18 @@
#ifndef cmExportBuildFileGenerator_h
#define cmExportBuildFileGenerator_h
+#include <cmConfigure.h>
+
#include "cmExportFileGenerator.h"
-#include "cmListFileCache.h"
+
+#include <iosfwd>
+#include <string>
+#include <vector>
class cmExportSet;
+class cmGeneratorTarget;
+class cmGlobalGenerator;
+class cmLocalGenerator;
/** \class cmExportBuildFileGenerator
* \brief Generate a file exporting targets from a build tree.
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 7f01196..23c77d9 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -13,20 +13,25 @@
#include "cmAlgorithms.h"
#include "cmComputeLinkInformation.h"
-#include "cmExportSet.h"
#include "cmGeneratedFileStream.h"
-#include "cmGlobalGenerator.h"
-#include "cmInstallExportGenerator.h"
+#include "cmGeneratorTarget.h"
+#include "cmLinkItem.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmOutputConverter.h"
+#include "cmPolicies.h"
+#include "cmState.h"
#include "cmSystemTools.h"
+#include "cmTarget.h"
#include "cmTargetExport.h"
-#include "cmVersion.h"
+#include "cmake.h"
#include <assert.h>
#include <cm_auto_ptr.hxx>
#include <cmsys/FStream.hxx>
+#include <sstream>
+#include <string.h>
+#include <utility>
static std::string cmExportFileGeneratorEscape(std::string const& str)
{
diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h
index 9c96015..354994a 100644
--- a/Source/cmExportFileGenerator.h
+++ b/Source/cmExportFileGenerator.h
@@ -12,11 +12,19 @@
#ifndef cmExportFileGenerator_h
#define cmExportFileGenerator_h
-#include "cmCommand.h"
-#include "cmGeneratorExpression.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+#include "cmGeneratorExpression.h"
#include "cmVersion.h"
-#include "cmVersionMacros.h"
+#include "cmVersionConfig.h"
+
+#include <iosfwd>
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+
+class cmGeneratorTarget;
#define STRINGIFY_HELPER(X) #X
#define STRINGIFY(X) STRINGIFY_HELPER(X)
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index 7747157..ceba69a 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -15,12 +15,22 @@
#include "cmExportSet.h"
#include "cmExportSetMap.h"
#include "cmGeneratedFileStream.h"
+#include "cmGeneratorExpression.h"
+#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmInstallExportGenerator.h"
#include "cmInstallTargetGenerator.h"
#include "cmLocalGenerator.h"
+#include "cmMakefile.h"
+#include "cmPolicies.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
#include "cmTargetExport.h"
+#include <sstream>
+#include <utility>
+
cmExportInstallFileGenerator::cmExportInstallFileGenerator(
cmInstallExportGenerator* iegen)
: IEGen(iegen)
diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h
index 68960db..c693dc1 100644
--- a/Source/cmExportInstallFileGenerator.h
+++ b/Source/cmExportInstallFileGenerator.h
@@ -12,8 +12,18 @@
#ifndef cmExportInstallFileGenerator_h
#define cmExportInstallFileGenerator_h
+#include <cmConfigure.h>
+
#include "cmExportFileGenerator.h"
+#include <iosfwd>
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+
+class cmGeneratorTarget;
+class cmGlobalGenerator;
class cmInstallExportGenerator;
class cmInstallTargetGenerator;
diff --git a/Source/cmExportSet.h b/Source/cmExportSet.h
index 49f2cac..4f3c9d8 100644
--- a/Source/cmExportSet.h
+++ b/Source/cmExportSet.h
@@ -12,11 +12,14 @@
#ifndef cmExportSet_h
#define cmExportSet_h
-#include "cmSystemTools.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <string>
+#include <vector>
-class cmTargetExport;
class cmInstallExportGenerator;
class cmLocalGenerator;
+class cmTargetExport;
/// A set of targets that were installed with the same EXPORT parameter.
class cmExportSet
diff --git a/Source/cmExportSetMap.cxx b/Source/cmExportSetMap.cxx
index ac1c66e..42fb781 100644
--- a/Source/cmExportSetMap.cxx
+++ b/Source/cmExportSetMap.cxx
@@ -15,6 +15,8 @@
#include "cmAlgorithms.h"
#include "cmExportSet.h"
+#include <utility>
+
cmExportSet* cmExportSetMap::operator[](const std::string& name)
{
std::map<std::string, cmExportSet*>::iterator it = this->find(name);
diff --git a/Source/cmExportSetMap.h b/Source/cmExportSetMap.h
index d2954e3..c3a55ba 100644
--- a/Source/cmExportSetMap.h
+++ b/Source/cmExportSetMap.h
@@ -12,7 +12,10 @@
#ifndef cmExportSetMap_h
#define cmExportSetMap_h
-#include "cmSystemTools.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <map>
+#include <string>
class cmExportSet;
diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx
index 2916e6b..a0aefb8 100644
--- a/Source/cmExportTryCompileFileGenerator.cxx
+++ b/Source/cmExportTryCompileFileGenerator.cxx
@@ -12,10 +12,19 @@
#include "cmExportTryCompileFileGenerator.h"
-#include "cmGeneratedFileStream.h"
+#include "cmGeneratorExpression.h"
#include "cmGeneratorExpressionDAGChecker.h"
+#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h"
+#include "cmMakefile.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
+#include "cm_auto_ptr.hxx"
+
+#include <map>
+#include <utility>
cmExportTryCompileFileGenerator::cmExportTryCompileFileGenerator(
cmGlobalGenerator* gg, const std::vector<std::string>& targets,
diff --git a/Source/cmExportTryCompileFileGenerator.h b/Source/cmExportTryCompileFileGenerator.h
index 1d13711..27d5b3c 100644
--- a/Source/cmExportTryCompileFileGenerator.h
+++ b/Source/cmExportTryCompileFileGenerator.h
@@ -12,10 +12,18 @@
#ifndef cmExportTryCompileFileGenerator_h
#define cmExportTryCompileFileGenerator_h
+#include <cmConfigure.h>
+
#include "cmExportFileGenerator.h"
-class cmInstallExportGenerator;
-class cmInstallTargetGenerator;
+#include <iosfwd>
+#include <set>
+#include <string>
+#include <vector>
+
+class cmGeneratorTarget;
+class cmGlobalGenerator;
+class cmMakefile;
class cmExportTryCompileFileGenerator : public cmExportFileGenerator
{
diff --git a/Source/cmExprLexer.cxx b/Source/cmExprLexer.cxx
index 4704f03..b16ec1a 100644
--- a/Source/cmExprLexer.cxx
+++ b/Source/cmExprLexer.cxx
@@ -1,3 +1,5 @@
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
#line 2 "/home/andy/vtk/CMake-bin/Source/cmExprLexer.cxx"
diff --git a/Source/cmExprParserHelper.cxx b/Source/cmExprParserHelper.cxx
index 1a101ab..3a76367 100644
--- a/Source/cmExprParserHelper.cxx
+++ b/Source/cmExprParserHelper.cxx
@@ -11,11 +11,13 @@
============================================================================*/
#include "cmExprParserHelper.h"
-#include "cmMakefile.h"
-#include "cmSystemTools.h"
+#include <cmConfigure.h>
#include "cmExprLexer.h"
+#include <iostream>
+#include <sstream>
+
int cmExpr_yyparse(yyscan_t yyscanner);
//
cmExprParserHelper::cmExprParserHelper()
diff --git a/Source/cmExprParserHelper.h b/Source/cmExprParserHelper.h
index af0b916..7402484 100644
--- a/Source/cmExprParserHelper.h
+++ b/Source/cmExprParserHelper.h
@@ -12,7 +12,10 @@
#ifndef cmExprParserHelper_h
#define cmExprParserHelper_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <string>
+#include <vector>
#define YYSTYPE cmExprParserHelper::ParserType
#define YYSTYPE_IS_DECLARED
@@ -24,9 +27,6 @@
*
* Finds dependencies for java file and list of outputs
*/
-
-class cmMakefile;
-
class cmExprParserHelper
{
public:
diff --git a/Source/cmExternalMakefileProjectGenerator.cxx b/Source/cmExternalMakefileProjectGenerator.cxx
index b01290c..e4d124f 100644
--- a/Source/cmExternalMakefileProjectGenerator.cxx
+++ b/Source/cmExternalMakefileProjectGenerator.cxx
@@ -12,7 +12,7 @@
#include "cmExternalMakefileProjectGenerator.h"
-#include <assert.h>
+class cmMakefile;
void cmExternalMakefileProjectGenerator::EnableLanguage(
std::vector<std::string> const& /*unused*/, cmMakefile* /*unused*/,
diff --git a/Source/cmExternalMakefileProjectGenerator.h b/Source/cmExternalMakefileProjectGenerator.h
index 6ae5533..b306f19 100644
--- a/Source/cmExternalMakefileProjectGenerator.h
+++ b/Source/cmExternalMakefileProjectGenerator.h
@@ -12,11 +12,13 @@
#ifndef cmExternalMakefileProjectGenerator_h
#define cmExternalMakefileProjectGenerator_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
-#include "cmDocumentation.h"
+#include <string>
+#include <vector>
class cmGlobalGenerator;
+class cmMakefile;
/** \class cmExternalMakefileProjectGenerator
* \brief Base class for generators for "External Makefile based IDE projects".
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 6eae26b..7eb3a74 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -12,16 +12,23 @@
============================================================================*/
#include "cmExtraCodeBlocksGenerator.h"
+#include "cmAlgorithms.h"
#include "cmGeneratedFileStream.h"
-#include "cmGlobalUnixMakefileGenerator3.h"
-#include "cmLocalUnixMakefileGenerator3.h"
+#include "cmGeneratorTarget.h"
+#include "cmGlobalGenerator.h"
+#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
+#include "cmState.h"
#include "cmSystemTools.h"
#include "cmXMLWriter.h"
#include "cmake.h"
-#include <cmsys/SystemTools.hxx>
+#include <algorithm>
+#include <map>
+#include <ostream>
+#include <string.h>
+#include <utility>
/* Some useful URLs:
Homepage:
diff --git a/Source/cmExtraCodeBlocksGenerator.h b/Source/cmExtraCodeBlocksGenerator.h
index b39080c..179be30 100644
--- a/Source/cmExtraCodeBlocksGenerator.h
+++ b/Source/cmExtraCodeBlocksGenerator.h
@@ -13,11 +13,16 @@
#ifndef cmExtraCodeBlocksGenerator_h
#define cmExtraCodeBlocksGenerator_h
+#include <cmConfigure.h>
+
#include "cmExternalMakefileProjectGenerator.h"
+#include <string>
+#include <vector>
+
+class cmGeneratorTarget;
class cmLocalGenerator;
class cmMakefile;
-class cmGeneratorTarget;
class cmXMLWriter;
/** \class cmExtraCodeBlocksGenerator
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index eda6867..a039f49 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -14,18 +14,22 @@
#include "cmExtraCodeLiteGenerator.h"
#include "cmGeneratedFileStream.h"
-#include "cmGlobalUnixMakefileGenerator3.h"
-#include "cmLocalUnixMakefileGenerator3.h"
+#include "cmGeneratorTarget.h"
+#include "cmGlobalGenerator.h"
+#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
+#include "cmState.h"
#include "cmSystemTools.h"
+#include "cmXMLWriter.h"
#include "cmake.h"
-#include "cmStandardIncludes.h"
-#include "cmXMLWriter.h"
-#include <cmsys/Directory.hxx>
#include <cmsys/SystemInformation.hxx>
-#include <cmsys/SystemTools.hxx>
+#include <map>
+#include <set>
+#include <sstream>
+#include <string.h>
+#include <utility>
cmExtraCodeLiteGenerator::cmExtraCodeLiteGenerator()
: cmExternalMakefileProjectGenerator()
diff --git a/Source/cmExtraCodeLiteGenerator.h b/Source/cmExtraCodeLiteGenerator.h
index e20e745..f5765d8 100644
--- a/Source/cmExtraCodeLiteGenerator.h
+++ b/Source/cmExtraCodeLiteGenerator.h
@@ -14,9 +14,15 @@
#ifndef cmGlobalCodeLiteGenerator_h
#define cmGlobalCodeLiteGenerator_h
+#include <cmConfigure.h>
+
#include "cmExternalMakefileProjectGenerator.h"
+#include <string>
+#include <vector>
+
class cmLocalGenerator;
+class cmMakefile;
class cmExtraCodeLiteGenerator : public cmExternalMakefileProjectGenerator
{
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 945ee40..5a98e34 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -14,17 +14,26 @@
#include "cmExtraEclipseCDT4Generator.h"
#include "cmGeneratedFileStream.h"
-#include "cmGlobalUnixMakefileGenerator3.h"
-#include "cmLocalUnixMakefileGenerator3.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"
-#include "cmTarget.h"
+#include "cmSystemTools.h"
#include "cmXMLWriter.h"
+#include "cmake.h"
-#include "cmSystemTools.h"
+#include <algorithm>
#include <assert.h>
-#include <stdlib.h>
+#include <cmsys/RegularExpression.hxx>
+#include <map>
+#include <sstream>
+#include <stdio.h>
+#include <utility>
static void AppendAttribute(cmXMLWriter& xml, const char* keyval)
{
diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h
index 4b585c3..97b7bd7 100644
--- a/Source/cmExtraEclipseCDT4Generator.h
+++ b/Source/cmExtraEclipseCDT4Generator.h
@@ -14,11 +14,19 @@
#ifndef cmExtraEclipseCDT4Generator_h
#define cmExtraEclipseCDT4Generator_h
+#include <cmConfigure.h>
+
#include "cmExternalMakefileProjectGenerator.h"
+#include <iosfwd>
+#include <set>
+#include <string>
+#include <vector>
+
+class cmLocalGenerator;
class cmMakefile;
-class cmXMLWriter;
class cmSourceGroup;
+class cmXMLWriter;
/** \class cmExtraEclipseCDT4Generator
* \brief Write Eclipse project files for Makefile based projects
diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx
index 4e72504..36ab5b3 100644
--- a/Source/cmExtraKateGenerator.cxx
+++ b/Source/cmExtraKateGenerator.cxx
@@ -13,14 +13,18 @@
#include "cmExtraKateGenerator.h"
#include "cmGeneratedFileStream.h"
-#include "cmGlobalUnixMakefileGenerator3.h"
-#include "cmLocalUnixMakefileGenerator3.h"
+#include "cmGeneratorTarget.h"
+#include "cmGlobalGenerator.h"
+#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
+#include "cmState.h"
#include "cmSystemTools.h"
-#include "cmake.h"
-#include <cmsys/SystemTools.hxx>
+#include <ostream>
+#include <set>
+#include <string.h>
+#include <vector>
cmExtraKateGenerator::cmExtraKateGenerator()
: cmExternalMakefileProjectGenerator()
diff --git a/Source/cmExtraKateGenerator.h b/Source/cmExtraKateGenerator.h
index 3d16052..518dead 100644
--- a/Source/cmExtraKateGenerator.h
+++ b/Source/cmExtraKateGenerator.h
@@ -13,10 +13,14 @@
#ifndef cmExtraKateGenerator_h
#define cmExtraKateGenerator_h
+#include <cmConfigure.h>
+
#include "cmExternalMakefileProjectGenerator.h"
-class cmLocalGenerator;
+#include <string>
+
class cmGeneratedFileStream;
+class cmLocalGenerator;
/** \class cmExtraKateGenerator
* \brief Write Kate project files for Makefile or ninja based projects
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index 6e81ee1..8ee275a 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -14,15 +14,18 @@
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
-#include "cmGlobalUnixMakefileGenerator3.h"
+#include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h"
-#include "cmLocalUnixMakefileGenerator3.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
+#include "cmState.h"
#include "cmSystemTools.h"
-#include "cmake.h"
-#include <cmsys/SystemTools.hxx>
+#include <cmsys/RegularExpression.hxx>
+#include <ostream>
+#include <set>
+#include <string.h>
+#include <utility>
/*
Sublime Text 2 Generator
diff --git a/Source/cmExtraSublimeTextGenerator.h b/Source/cmExtraSublimeTextGenerator.h
index c087825..ee2b253 100644
--- a/Source/cmExtraSublimeTextGenerator.h
+++ b/Source/cmExtraSublimeTextGenerator.h
@@ -13,13 +13,19 @@
#ifndef cmExtraSublimeTextGenerator_h
#define cmExtraSublimeTextGenerator_h
+#include <cmConfigure.h>
+
#include "cmExternalMakefileProjectGenerator.h"
-#include "cmSourceFile.h"
-class cmLocalGenerator;
-class cmMakefile;
+#include <map>
+#include <string>
+#include <vector>
+
class cmGeneratedFileStream;
class cmGeneratorTarget;
+class cmLocalGenerator;
+class cmMakefile;
+class cmSourceFile;
/** \class cmExtraSublimeTextGenerator
* \brief Write Sublime Text 2 project files for Makefile based projects
diff --git a/Source/cmFileLock.h b/Source/cmFileLock.h
index 538b716..90bb1b2 100644
--- a/Source/cmFileLock.h
+++ b/Source/cmFileLock.h
@@ -13,7 +13,9 @@
#ifndef cmFileLock_h
#define cmFileLock_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <string>
#if defined(_WIN32)
#include <windows.h> // HANDLE
diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h
index dc42e6f..d1883e7 100644
--- a/Source/cmFileLockPool.h
+++ b/Source/cmFileLockPool.h
@@ -12,12 +12,13 @@
#ifndef cmFileLockPool_h
#define cmFileLockPool_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
#include <list>
+#include <string>
-class cmFileLockResult;
class cmFileLock;
+class cmFileLockResult;
class cmFileLockPool
{
diff --git a/Source/cmFileLockResult.cxx b/Source/cmFileLockResult.cxx
index 090fe60..de851bc 100644
--- a/Source/cmFileLockResult.cxx
+++ b/Source/cmFileLockResult.cxx
@@ -13,6 +13,7 @@
#include "cmFileLockResult.h"
#include <errno.h>
+#include <string.h>
cmFileLockResult cmFileLockResult::MakeOk()
{
diff --git a/Source/cmFileLockResult.h b/Source/cmFileLockResult.h
index d5ac354..54b9626 100644
--- a/Source/cmFileLockResult.h
+++ b/Source/cmFileLockResult.h
@@ -13,7 +13,9 @@
#ifndef cmFileLockResult_h
#define cmFileLockResult_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <string>
#if defined(_WIN32)
#include <windows.h> // DWORD
diff --git a/Source/cmFilePathUuid.cxx b/Source/cmFilePathUuid.cxx
index f99646c..d47a0da 100644
--- a/Source/cmFilePathUuid.cxx
+++ b/Source/cmFilePathUuid.cxx
@@ -17,6 +17,8 @@
#include "cmMakefile.h"
#include "cmSystemTools.h"
+#include <vector>
+
cmFilePathUuid::cmFilePathUuid(cmMakefile* makefile)
{
initParentDirs(makefile->GetCurrentSourceDirectory(),
@@ -116,7 +118,7 @@ std::string cmFilePathUuid::GetChecksumString(
// Calculate the file ( seed + relative path + name ) checksum
std::vector<unsigned char> hashBytes =
cmCryptoHash::New("SHA256")->ByteHashString(
- (sourceRelSeed + sourceRelPath + sourceFilename).c_str());
+ sourceRelSeed + sourceRelPath + sourceFilename);
checksumBase32 =
cmBase32Encoder().encodeString(&hashBytes[0], hashBytes.size(), false);
diff --git a/Source/cmFilePathUuid.h b/Source/cmFilePathUuid.h
index 42e89b1..b54dc47 100644
--- a/Source/cmFilePathUuid.h
+++ b/Source/cmFilePathUuid.h
@@ -13,8 +13,9 @@
#ifndef cmFilePathUuid_h
#define cmFilePathUuid_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+#include <stddef.h>
#include <string>
#include <utility>
@@ -51,8 +52,9 @@ public:
* @arg outputPrefix optional string to prepend to the result
* @arg outputSuffix optional string to append to the result
*/
- std::string get(const std::string& filePath, const char* outputPrefix = NULL,
- const char* outputSuffix = NULL);
+ std::string get(const std::string& filePath,
+ const char* outputPrefix = CM_NULLPTR,
+ const char* outputSuffix = CM_NULLPTR);
private:
void initParentDirs(const std::string& currentSrcDir,
diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx
index 1360b44..089d520 100644
--- a/Source/cmFileTimeComparison.cxx
+++ b/Source/cmFileTimeComparison.cxx
@@ -11,6 +11,11 @@
============================================================================*/
#include "cmFileTimeComparison.h"
+#include <cmConfigure.h>
+#include <string>
+#include <time.h>
+#include <utility>
+
// Use a hash table to avoid duplicate file time checks from disk.
#if defined(CMAKE_BUILD_WITH_CMAKE)
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
@@ -20,16 +25,14 @@
#endif
#endif
-#include <cmsys/Encoding.hxx>
-
// Use a platform-specific API to get file times efficiently.
#if !defined(_WIN32) || defined(__CYGWIN__)
-#define cmFileTimeComparison_Type struct stat
-#include <ctype.h>
#include <sys/stat.h>
+#define cmFileTimeComparison_Type struct stat
#else
-#define cmFileTimeComparison_Type FILETIME
+#include <cmsys/Encoding.hxx>
#include <windows.h>
+#define cmFileTimeComparison_Type FILETIME
#endif
class cmFileTimeComparisonInternal
diff --git a/Source/cmFileTimeComparison.h b/Source/cmFileTimeComparison.h
index 409bd64..ea5c47e 100644
--- a/Source/cmFileTimeComparison.h
+++ b/Source/cmFileTimeComparison.h
@@ -12,7 +12,7 @@
#ifndef cmFileTimeComparison_h
#define cmFileTimeComparison_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
class cmFileTimeComparisonInternal;
diff --git a/Source/cmFortranParser.h b/Source/cmFortranParser.h
index 07e1b1c..5f1c7ac 100644
--- a/Source/cmFortranParser.h
+++ b/Source/cmFortranParser.h
@@ -13,6 +13,8 @@
#define cmFortranParser_h
#if !defined(cmFortranLexer_cxx) && !defined(cmFortranParser_cxx)
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
#endif
diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx
index 30a33b4..71edf9f 100644
--- a/Source/cmFortranParserImpl.cxx
+++ b/Source/cmFortranParserImpl.cxx
@@ -10,9 +10,16 @@
See the License for more information.
============================================================================*/
#include "cmFortranParser.h"
-
+#include "cmFortranLexer.h"
#include "cmSystemTools.h"
+
#include <assert.h>
+#include <cmConfigure.h>
+#include <set>
+#include <stack>
+#include <stdio.h>
+#include <string>
+#include <vector>
bool cmFortranParser_s::FindIncludeFile(const char* dir,
const char* includeName,
diff --git a/Source/cmFunctionBlocker.h b/Source/cmFunctionBlocker.h
index c7e3b71..4a600e7 100644
--- a/Source/cmFunctionBlocker.h
+++ b/Source/cmFunctionBlocker.h
@@ -12,6 +12,8 @@
#ifndef cmFunctionBlocker_h
#define cmFunctionBlocker_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
#include "cmExecutionStatus.h"
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx
index c35a1bc..9a83070 100644
--- a/Source/cmGeneratedFileStream.cxx
+++ b/Source/cmGeneratedFileStream.cxx
@@ -13,6 +13,8 @@
#include "cmSystemTools.h"
+#include <stdio.h>
+
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include <cm_zlib.h>
#endif
diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h
index 3480c5b..4c4f26b 100644
--- a/Source/cmGeneratedFileStream.h
+++ b/Source/cmGeneratedFileStream.h
@@ -12,9 +12,10 @@
#ifndef cmGeneratedFileStream_h
#define cmGeneratedFileStream_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h>
#include <cmsys/FStream.hxx>
+#include <string>
// This is the first base class of cmGeneratedFileStream. It will be
// created before and destroyed after the ofstream portion and can
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 6cd6439..b016d9e 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -13,12 +13,14 @@
#include "assert.h"
#include "cmAlgorithms.h"
-#include "cmSystemTools.h"
-
-#include "cmGeneratorExpressionDAGChecker.h"
+#include "cmGeneratorExpressionContext.h"
#include "cmGeneratorExpressionEvaluator.h"
#include "cmGeneratorExpressionLexer.h"
#include "cmGeneratorExpressionParser.h"
+#include "cmSystemTools.h"
+
+#include <cmsys/RegularExpression.hxx>
+#include <utility>
cmGeneratorExpression::cmGeneratorExpression(
const cmListFileBacktrace& backtrace)
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h
index 2f91608..24233b3 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -13,22 +13,22 @@
#ifndef cmGeneratorExpression_h
#define cmGeneratorExpression_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h>
#include "cmListFileCache.h"
#include <cm_auto_ptr.hxx>
-#include <cmsys/RegularExpression.hxx>
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+class cmCompiledGeneratorExpression;
class cmGeneratorTarget;
class cmLocalGenerator;
-class cmListFileBacktrace;
-
-struct cmGeneratorExpressionEvaluator;
struct cmGeneratorExpressionContext;
struct cmGeneratorExpressionDAGChecker;
-
-class cmCompiledGeneratorExpression;
+struct cmGeneratorExpressionEvaluator;
/** \class cmGeneratorExpression
* \brief Evaluate generate-time query expression syntax.
diff --git a/Source/cmGeneratorExpressionContext.cxx b/Source/cmGeneratorExpressionContext.cxx
index 8da6b50..77289d1 100644
--- a/Source/cmGeneratorExpressionContext.cxx
+++ b/Source/cmGeneratorExpressionContext.cxx
@@ -12,8 +12,6 @@
#include "cmGeneratorExpressionContext.h"
-#include "cmGeneratorTarget.h"
-
cmGeneratorExpressionContext::cmGeneratorExpressionContext(
cmLocalGenerator* lg, std::string const& config, bool quiet,
cmGeneratorTarget const* headTarget, const cmGeneratorTarget* currentTarget,
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx
index 045ded1..c477443 100644
--- a/Source/cmGeneratorExpressionDAGChecker.cxx
+++ b/Source/cmGeneratorExpressionDAGChecker.cxx
@@ -13,7 +13,15 @@
#include "cmGeneratorExpressionDAGChecker.h"
#include "cmAlgorithms.h"
+#include "cmGeneratorExpressionContext.h"
+#include "cmGeneratorExpressionEvaluator.h"
+#include "cmGeneratorTarget.h"
#include "cmLocalGenerator.h"
+#include "cmake.h"
+
+#include <sstream>
+#include <string.h>
+#include <utility>
cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker(
const cmListFileBacktrace& backtrace, const std::string& target,
diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h
index 6b7fe9a..c6d7281 100644
--- a/Source/cmGeneratorExpressionDAGChecker.h
+++ b/Source/cmGeneratorExpressionDAGChecker.h
@@ -12,9 +12,16 @@
#ifndef cmGeneratorExpressionDAGChecker_h
#define cmGeneratorExpressionDAGChecker_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h>
-#include "cmGeneratorExpressionEvaluator.h"
+#include "cmListFileCache.h"
+
+#include <map>
+#include <set>
+#include <string>
+
+struct GeneratorExpressionContent;
+struct cmGeneratorExpressionContext;
#define CM_SELECT_BOTH(F, A1, A2) F(A1, A2)
#define CM_SELECT_FIRST(F, A1, A2) F(A1)
diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx
index c01c4fc..aad9d1b 100644
--- a/Source/cmGeneratorExpressionEvaluationFile.cxx
+++ b/Source/cmGeneratorExpressionEvaluationFile.cxx
@@ -14,12 +14,17 @@
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
+#include "cmListFileCache.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
-#include <cmsys/FStream.hxx>
+#include "cmSystemTools.h"
+#include "cmake.h"
-#include <assert.h>
+#include <cmConfigure.h>
+#include <cmsys/FStream.hxx>
+#include <sstream>
+#include <utility>
cmGeneratorExpressionEvaluationFile::cmGeneratorExpressionEvaluationFile(
const std::string& input,
diff --git a/Source/cmGeneratorExpressionEvaluationFile.h b/Source/cmGeneratorExpressionEvaluationFile.h
index 52ba2d8..3a668a2 100644
--- a/Source/cmGeneratorExpressionEvaluationFile.h
+++ b/Source/cmGeneratorExpressionEvaluationFile.h
@@ -12,10 +12,15 @@
#ifndef cmGeneratorExpressionEvaluationFile_h
#define cmGeneratorExpressionEvaluationFile_h
+#include <cmConfigure.h> // IWYU pragma: keep
+
#include "cmGeneratorExpression.h"
#include <cm_auto_ptr.hxx>
+#include <map>
+#include <string>
#include <sys/types.h>
+#include <vector>
class cmLocalGenerator;
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index b4b74c5..d21ab25 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -12,21 +12,12 @@
#include "cmGeneratorExpressionEvaluator.h"
#include "cmAlgorithms.h"
-#include "cmGeneratorExpression.h"
-#include "cmGeneratorExpressionDAGChecker.h"
-#include "cmGeneratorExpressionParser.h"
-#include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
-#include "cmMakefile.h"
-#include "cmSourceFile.h"
-
-#include <cmsys/String.h>
-
-#include <assert.h>
-#include <errno.h>
-
+#include "cmGeneratorExpressionContext.h"
#include "cmGeneratorExpressionNode.h"
+#include <algorithm>
+#include <sstream>
+
GeneratorExpressionContent::GeneratorExpressionContent(
const char* startContent, size_t length)
: StartContent(startContent)
diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h
index 58e732b..5e8ebe0 100644
--- a/Source/cmGeneratorExpressionEvaluator.h
+++ b/Source/cmGeneratorExpressionEvaluator.h
@@ -12,13 +12,13 @@
#ifndef cmGeneratorExpressionEvaluator_h
#define cmGeneratorExpressionEvaluator_h
-#include "cmGeneratorExpressionContext.h"
-
-#include "cmListFileCache.h"
+#include <cmConfigure.h>
+#include <stddef.h>
#include <string>
#include <vector>
+struct cmGeneratorExpressionContext;
struct cmGeneratorExpressionDAGChecker;
struct cmGeneratorExpressionNode;
diff --git a/Source/cmGeneratorExpressionLexer.h b/Source/cmGeneratorExpressionLexer.h
index 72ad731..55836ac 100644
--- a/Source/cmGeneratorExpressionLexer.h
+++ b/Source/cmGeneratorExpressionLexer.h
@@ -12,8 +12,10 @@
#ifndef cmGeneratorExpressionLexer_h
#define cmGeneratorExpressionLexer_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+#include <stddef.h>
+#include <string>
#include <vector>
struct cmGeneratorExpressionToken
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 12cf980..44e9ce1 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -13,9 +13,36 @@
#include "cmGeneratorExpressionNode.h"
#include "cmAlgorithms.h"
+#include "cmGeneratorExpression.h"
+#include "cmGeneratorExpressionContext.h"
+#include "cmGeneratorExpressionDAGChecker.h"
+#include "cmGeneratorExpressionEvaluator.h"
+#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
+#include "cmLinkItem.h"
+#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmOutputConverter.h"
+#include "cmPolicies.h"
+#include "cmSourceFile.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
+#include "cm_auto_ptr.hxx"
+#include "cmake.h"
+
+#include <algorithm>
+#include <assert.h>
+#include <cmConfigure.h>
+#include <cmsys/RegularExpression.hxx>
+#include <cmsys/String.h>
+#include <errno.h>
+#include <map>
+#include <set>
+#include <sstream>
+#include <stdlib.h>
+#include <string.h>
+#include <utility>
std::string cmGeneratorExpressionNode::EvaluateDependentExpression(
std::string const& prop, cmLocalGenerator* lg,
@@ -1455,13 +1482,12 @@ static const struct InstallPrefixNode : public cmGeneratorExpressionNode
} installPrefixNode;
-class ArtifactNameTag;
+class ArtifactDirTag;
class ArtifactLinkerTag;
-class ArtifactSonameTag;
-class ArtifactPdbTag;
-
+class ArtifactNameTag;
class ArtifactPathTag;
-class ArtifactDirTag;
+class ArtifactPdbTag;
+class ArtifactSonameTag;
template <typename ArtifactT>
struct TargetFilesystemArtifactResultCreator
diff --git a/Source/cmGeneratorExpressionNode.h b/Source/cmGeneratorExpressionNode.h
index 3ee57eb..23f405b 100644
--- a/Source/cmGeneratorExpressionNode.h
+++ b/Source/cmGeneratorExpressionNode.h
@@ -12,20 +12,16 @@
#ifndef cmGeneratorExpressionNode_h
#define cmGeneratorExpressionNode_h
-#include "cmGeneratorExpression.h"
+#include <cmConfigure.h> // IWYU pragma: keep
-#include "cmGeneratorExpressionDAGChecker.h"
-#include "cmGeneratorExpressionEvaluator.h"
-#include "cmGeneratorExpressionParser.h"
-#include "cmLocalGenerator.h"
-#include "cmSourceFile.h"
+#include <string>
+#include <vector>
-#include <cmsys/String.h>
-
-#include <assert.h>
-#include <errno.h>
-
-#include "cmListFileCache.h"
+class cmGeneratorTarget;
+class cmLocalGenerator;
+struct GeneratorExpressionContent;
+struct cmGeneratorExpressionContext;
+struct cmGeneratorExpressionDAGChecker;
struct cmGeneratorExpressionNode
{
diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx
index f853f8d..c753f9b 100644
--- a/Source/cmGeneratorExpressionParser.cxx
+++ b/Source/cmGeneratorExpressionParser.cxx
@@ -14,7 +14,8 @@
#include "cmGeneratorExpressionEvaluator.h"
-#include "assert.h"
+#include <assert.h>
+#include <stddef.h>
cmGeneratorExpressionParser::cmGeneratorExpressionParser(
const std::vector<cmGeneratorExpressionToken>& tokens)
diff --git a/Source/cmGeneratorExpressionParser.h b/Source/cmGeneratorExpressionParser.h
index b0e9ea4..4534d6b 100644
--- a/Source/cmGeneratorExpressionParser.h
+++ b/Source/cmGeneratorExpressionParser.h
@@ -12,12 +12,11 @@
#ifndef cmGeneratorExpressionParser_h
#define cmGeneratorExpressionParser_h
-#include "cmGeneratorExpressionLexer.h"
+#include <cmConfigure.h> // IWYU pragma: keep
-#include <set>
#include <vector>
-#include "cmListFileCache.h"
+#include "cmGeneratorExpressionLexer.h"
struct cmGeneratorExpressionEvaluator;
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 8bd3b82..ee2907c 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -13,19 +13,33 @@
#include "cmAlgorithms.h"
#include "cmComputeLinkInformation.h"
+#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
+#include "cmCustomCommandLines.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorExpressionDAGChecker.h"
#include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
+#include "cmPropertyMap.h"
#include "cmSourceFile.h"
+#include "cmSourceFileLocation.h"
+#include "cmSystemTools.h"
#include "cmTarget.h"
+#include "cmTargetLinkLibraryType.h"
+#include "cm_auto_ptr.hxx"
+#include "cmake.h"
-#include <queue>
-
-#include "assert.h"
+#include <algorithm>
+#include <assert.h>
+#include <cmsys/RegularExpression.hxx>
#include <errno.h>
+#include <iterator>
+#include <queue>
+#include <sstream>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#if defined(CMake_HAVE_CXX_UNORDERED_SET)
#include <unordered_set>
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index f9987aa..173f15d 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -12,15 +12,26 @@
#ifndef cmGeneratorTarget_h
#define cmGeneratorTarget_h
+#include <cmConfigure.h>
+
#include "cmLinkItem.h"
+#include "cmListFileCache.h"
+#include "cmPolicies.h"
+#include "cmState.h"
+
+#include <map>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
+class cmComputeLinkInformation;
class cmCustomCommand;
class cmGlobalGenerator;
class cmLocalGenerator;
class cmMakefile;
class cmSourceFile;
class cmTarget;
-class cmComputeLinkInformation;
class cmGeneratorTarget
{
diff --git a/Source/cmGhsMultiGpj.h b/Source/cmGhsMultiGpj.h
index b388455..4d8a757 100644
--- a/Source/cmGhsMultiGpj.h
+++ b/Source/cmGhsMultiGpj.h
@@ -12,6 +12,8 @@
#ifndef cmGhsMultiGpj_h
#define cmGhsMultiGpj_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
class cmGeneratedFileStream;
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 3d35114..d3c9625 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -12,6 +12,7 @@
#include "cmGhsMultiTargetGenerator.h"
#include "cmGeneratedFileStream.h"
+#include "cmGeneratorTarget.h"
#include "cmGlobalGhsMultiGenerator.h"
#include "cmLocalGhsMultiGenerator.h"
#include "cmMakefile.h"
diff --git a/Source/cmGlobalCommonGenerator.cxx b/Source/cmGlobalCommonGenerator.cxx
index 900b08e..d8ea317 100644
--- a/Source/cmGlobalCommonGenerator.cxx
+++ b/Source/cmGlobalCommonGenerator.cxx
@@ -11,6 +11,8 @@
============================================================================*/
#include "cmGlobalCommonGenerator.h"
+class cmake;
+
cmGlobalCommonGenerator::cmGlobalCommonGenerator(cmake* cm)
: cmGlobalGenerator(cm)
{
diff --git a/Source/cmGlobalCommonGenerator.h b/Source/cmGlobalCommonGenerator.h
index a48ff4f..5bc16c3 100644
--- a/Source/cmGlobalCommonGenerator.h
+++ b/Source/cmGlobalCommonGenerator.h
@@ -12,8 +12,12 @@
#ifndef cmGlobalCommonGenerator_h
#define cmGlobalCommonGenerator_h
+#include <cmConfigure.h>
+
#include "cmGlobalGenerator.h"
+class cmake;
+
/** \class cmGlobalCommonGenerator
* \brief Common infrastructure for Makefile and Ninja global generators.
*/
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 50c5a42..ef8266f 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -21,6 +21,8 @@
#include "cmAlgorithms.h"
#include "cmCPackPropertiesGenerator.h"
#include "cmComputeTargetDepends.h"
+#include "cmCustomCommand.h"
+#include "cmCustomCommandLines.h"
#include "cmExportBuildFileGenerator.h"
#include "cmExternalMakefileProjectGenerator.h"
#include "cmGeneratedFileStream.h"
@@ -29,25 +31,31 @@
#include "cmInstallGenerator.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
+#include "cmOutputConverter.h"
+#include "cmPolicies.h"
#include "cmQtAutoGeneratorInitializer.h"
#include "cmSourceFile.h"
#include "cmState.h"
-#include "cmTargetExport.h"
#include "cmVersion.h"
#include "cmake.h"
+#include <algorithm>
+#include <assert.h>
#include <cmsys/Directory.hxx>
#include <cmsys/FStream.hxx>
+#include <iterator>
+#include <sstream>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cm_jsoncpp_value.h"
-#include "cm_jsoncpp_writer.h"
+#include <cm_jsoncpp_value.h>
+#include <cm_jsoncpp_writer.h>
#include <cmsys/MD5.h>
#endif
-#include <stdlib.h> // required for atof
-
-#include <assert.h>
+class cmInstalledFile;
bool cmTarget::StrictTargetComparison::operator()(cmTarget const* t1,
cmTarget const* t2) const
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 089a637..1e1479a 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -13,15 +13,20 @@
#ifndef cmGlobalGenerator_h
#define cmGlobalGenerator_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h>
-#include "cmExportSetMap.h" // For cmExportSetMap
-#include "cmGeneratorExpression.h"
-#include "cmGeneratorTarget.h"
+#include "cmExportSetMap.h"
#include "cmState.h"
-#include "cmSystemTools.h" // for cmSystemTools::OutputOption
-#include "cmTarget.h" // For cmTargets
-#include "cmTargetDepend.h" // For cmTargetDependSet
+#include "cmSystemTools.h"
+#include "cmTarget.h"
+#include "cmTargetDepend.h"
+
+#include <iosfwd>
+#include <map>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmFileLockPool.h"
@@ -32,15 +37,14 @@
#endif
#endif
-class cmake;
+class cmCustomCommandLines;
+class cmSourceFile;
+class cmExportBuildFileGenerator;
+class cmExternalMakefileProjectGenerator;
class cmGeneratorTarget;
-class cmMakefile;
class cmLocalGenerator;
-class cmExternalMakefileProjectGenerator;
-class cmTarget;
-class cmInstallTargetGenerator;
-class cmInstallFilesGenerator;
-class cmExportBuildFileGenerator;
+class cmMakefile;
+class cmake;
/** \class cmGlobalGenerator
* \brief Responsible for overseeing the generation process for the entire tree
diff --git a/Source/cmGlobalGeneratorFactory.h b/Source/cmGlobalGeneratorFactory.h
index 74d3145..26bc2c0 100644
--- a/Source/cmGlobalGeneratorFactory.h
+++ b/Source/cmGlobalGeneratorFactory.h
@@ -13,6 +13,10 @@
#ifndef cmGlobalGeneratorFactory_h
#define cmGlobalGeneratorFactory_h
+#include <cmConfigure.h>
+
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
class cmake;
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index 0ae913e..d75ebf8 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -12,6 +12,7 @@
#include "cmGlobalGhsMultiGenerator.h"
#include "cmGeneratedFileStream.h"
+#include "cmGeneratorTarget.h"
#include "cmGhsMultiTargetGenerator.h"
#include "cmLocalGhsMultiGenerator.h"
#include "cmMakefile.h"
diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx
index daf7003..aaa1108 100644
--- a/Source/cmGlobalKdevelopGenerator.cxx
+++ b/Source/cmGlobalKdevelopGenerator.cxx
@@ -13,17 +13,23 @@
#include "cmGlobalKdevelopGenerator.h"
#include "cmGeneratedFileStream.h"
-#include "cmGlobalUnixMakefileGenerator3.h"
-#include "cmLocalUnixMakefileGenerator3.h"
+#include "cmGeneratorTarget.h"
+#include "cmGlobalGenerator.h"
+#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
+#include "cmState.h"
#include "cmSystemTools.h"
+#include "cmTarget.h"
#include "cmXMLWriter.h"
#include "cmake.h"
#include <cmsys/Directory.hxx>
#include <cmsys/FStream.hxx>
-#include <cmsys/SystemTools.hxx>
+#include <map>
+#include <set>
+#include <string.h>
+#include <utility>
cmGlobalKdevelopGenerator::cmGlobalKdevelopGenerator()
: cmExternalMakefileProjectGenerator()
diff --git a/Source/cmGlobalKdevelopGenerator.h b/Source/cmGlobalKdevelopGenerator.h
index 666527c..6a201b0 100644
--- a/Source/cmGlobalKdevelopGenerator.h
+++ b/Source/cmGlobalKdevelopGenerator.h
@@ -13,8 +13,13 @@
#ifndef cmGlobalKdevelopGenerator_h
#define cmGlobalKdevelopGenerator_h
+#include <cmConfigure.h>
+
#include "cmExternalMakefileProjectGenerator.h"
+#include <string>
+#include <vector>
+
class cmLocalGenerator;
/** \class cmGlobalKdevelopGenerator
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 590f207..30a05a0 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -13,16 +13,27 @@
#include "cmGlobalNinjaGenerator.h"
#include "cmAlgorithms.h"
+#include "cmDocumentationEntry.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorExpressionEvaluationFile.h"
#include "cmGeneratorTarget.h"
+#include "cmLocalGenerator.h"
#include "cmLocalNinjaGenerator.h"
#include "cmMakefile.h"
+#include "cmOutputConverter.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
+#include "cmTargetDepend.h"
#include "cmVersion.h"
+#include "cmake.h"
#include <algorithm>
-#include <assert.h>
#include <ctype.h>
+#include <functional>
+#include <iterator>
+#include <sstream>
+#include <stdio.h>
const char* cmGlobalNinjaGenerator::NINJA_BUILD_FILE = "build.ninja";
const char* cmGlobalNinjaGenerator::NINJA_RULES_FILE = "rules.ninja";
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 082ee3a..a0fad64 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -13,16 +13,28 @@
#ifndef cmGlobalNinjaGenerator_h
#define cmGlobalNinjaGenerator_h
-#include "cmGlobalCommonGenerator.h"
+#include <cmConfigure.h>
+#include "cmGlobalCommonGenerator.h"
+#include "cmGlobalGenerator.h"
#include "cmGlobalGeneratorFactory.h"
#include "cmNinjaTypes.h"
-
-//#define NINJA_GEN_VERBOSE_FILES
-
-class cmLocalGenerator;
+#include "cmPolicies.h"
+
+#include <iosfwd>
+#include <map>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
+
+class cmCustomCommand;
+class cmMakefile;
+class cmake;
+struct cmDocumentationEntry;
class cmGeneratedFileStream;
class cmGeneratorTarget;
+class cmLocalGenerator;
/**
* \class cmGlobalNinjaGenerator
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 77fbbe9..d90ebf0 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -12,13 +12,25 @@
#include "cmGlobalUnixMakefileGenerator3.h"
#include "cmAlgorithms.h"
+#include "cmDocumentationEntry.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
+#include "cmGlobalGenerator.h"
+#include "cmLocalGenerator.h"
#include "cmLocalUnixMakefileGenerator3.h"
#include "cmMakefile.h"
#include "cmMakefileTargetGenerator.h"
+#include "cmOutputConverter.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
+#include "cmTargetDepend.h"
#include "cmake.h"
+#include <algorithm>
+#include <functional>
+#include <sstream>
+#include <utility>
+
cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3(cmake* cm)
: cmGlobalCommonGenerator(cm)
{
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index ceb4140..3724124 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -12,13 +12,27 @@
#ifndef cmGlobalUnixMakefileGenerator3_h
#define cmGlobalUnixMakefileGenerator3_h
-#include "cmGlobalCommonGenerator.h"
+#include <cmConfigure.h>
+#include "cmGeneratorTarget.h"
+#include "cmGlobalCommonGenerator.h"
#include "cmGlobalGeneratorFactory.h"
+#include "cmState.h"
+
+#include <iosfwd>
+#include <map>
+#include <set>
+#include <stddef.h>
+#include <string>
+#include <vector>
class cmGeneratedFileStream;
-class cmMakefileTargetGenerator;
+class cmLocalGenerator;
class cmLocalUnixMakefileGenerator3;
+class cmMakefile;
+class cmMakefileTargetGenerator;
+class cmake;
+struct cmDocumentationEntry;
/** \class cmGlobalUnixMakefileGenerator3
* \brief Write a Unix makefiles.
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index df831e5..819feb1 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -14,6 +14,7 @@
#include "cmGlobalVisualStudio10Generator.h"
#include "cmAlgorithms.h"
+#include "cmGeneratorTarget.h"
#include "cmLocalVisualStudio10Generator.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index 45d9522..ea008ad 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -13,6 +13,7 @@
#include "cmGlobalVisualStudio71Generator.h"
+#include "cmGeneratorTarget.h"
#include "cmLocalVisualStudio7Generator.h"
#include "cmMakefile.h"
#include "cmake.h"
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 67ac230..08be304 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -14,6 +14,7 @@
#include "cmGlobalVisualStudio7Generator.h"
#include "cmGeneratedFileStream.h"
+#include "cmGeneratorTarget.h"
#include "cmLocalVisualStudio7Generator.h"
#include "cmMakefile.h"
#include "cmUuid.h"
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 2c0168e..53a05a0 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -14,6 +14,7 @@
#include "cmGlobalVisualStudio8Generator.h"
#include "cmGeneratedFileStream.h"
+#include "cmGeneratorTarget.h"
#include "cmLocalVisualStudio7Generator.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx
index 86fe6f2..d8f1d93 100644
--- a/Source/cmGlobalWatcomWMakeGenerator.cxx
+++ b/Source/cmGlobalWatcomWMakeGenerator.cxx
@@ -11,8 +11,10 @@
============================================================================*/
#include "cmGlobalWatcomWMakeGenerator.h"
-#include "cmLocalUnixMakefileGenerator3.h"
+#include "cmDocumentationEntry.h"
#include "cmMakefile.h"
+#include "cmState.h"
+#include "cmake.h"
cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator(cmake* cm)
: cmGlobalUnixMakefileGenerator3(cm)
diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h
index bc0d786..df1168e 100644
--- a/Source/cmGlobalWatcomWMakeGenerator.h
+++ b/Source/cmGlobalWatcomWMakeGenerator.h
@@ -12,8 +12,18 @@
#ifndef cmGlobalWatcomWMakeGenerator_h
#define cmGlobalWatcomWMakeGenerator_h
+#include <cmConfigure.h>
+
+#include "cmGlobalGeneratorFactory.h"
#include "cmGlobalUnixMakefileGenerator3.h"
+#include <string>
+#include <vector>
+
+class cmMakefile;
+class cmake;
+struct cmDocumentationEntry;
+
/** \class cmGlobalWatcomWMakeGenerator
* \brief Write a NMake makefiles.
*
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index b4bc084..5653820 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -397,7 +397,7 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
std::string listfile = root->GetCurrentSourceDirectory();
listfile += "/";
listfile += "CMakeLists.txt";
- allBuildGt->AddSource(listfile.c_str());
+ allBuildGt->AddSource(listfile);
// Add XCODE depend helper
std::string dir = root->GetCurrentBinaryDirectory();
@@ -405,9 +405,9 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
if (this->XcodeVersion < 50) {
makeHelper.push_back("make");
makeHelper.push_back("-C");
- makeHelper.push_back(dir.c_str());
+ makeHelper.push_back(dir);
makeHelper.push_back("-f");
- makeHelper.push_back(this->CurrentXCodeHackMakefile.c_str());
+ makeHelper.push_back(this->CurrentXCodeHackMakefile);
makeHelper.push_back(""); // placeholder, see below
}
@@ -480,7 +480,7 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
listfile = lg->GetCurrentSourceDirectory();
listfile += "/";
listfile += "CMakeLists.txt";
- target->AddSource(listfile.c_str());
+ target->AddSource(listfile);
}
}
}
@@ -841,7 +841,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
// lastKnownFileType as folder in order for Xcode to be able to
// open the contents of the folder.
// (Xcode 4.6 does not like explicitFileType=folder).
- if (cmSystemTools::FileIsDirectory(fullpath.c_str())) {
+ if (cmSystemTools::FileIsDirectory(fullpath)) {
fileType = (ext == "xcassets" ? "folder.assetcatalog" : "folder");
useLastKnownFileType = true;
} else {
@@ -856,7 +856,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
// Store the file path relative to the top of the source tree.
std::string path = this->RelativeToSource(fullpath.c_str());
- std::string name = cmSystemTools::GetFilenameName(path.c_str());
+ std::string name = cmSystemTools::GetFilenameName(path);
const char* sourceTree =
(cmSystemTools::FileIsFullPath(path.c_str()) ? "<absolute>"
: "SOURCE_ROOT");
@@ -898,8 +898,7 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen)
this->CurrentMakefile = gen->GetMakefile();
std::string outdir = cmSystemTools::CollapseFullPath(
this->CurrentLocalGenerator->GetCurrentBinaryDirectory());
- cmSystemTools::SplitPath(outdir.c_str(),
- this->CurrentOutputDirectoryComponents);
+ cmSystemTools::SplitPath(outdir, this->CurrentOutputDirectoryComponents);
// Select the current set of configuration types.
this->CurrentConfigurationTypes.clear();
@@ -951,7 +950,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets(
std::string targetName = gtgt->GetName();
// make sure ALL_BUILD, INSTALL, etc are only done once
- if (this->SpecialTargetEmitted(targetName.c_str())) {
+ if (this->SpecialTargetEmitted(targetName)) {
continue;
}
@@ -1223,7 +1222,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmGeneratorTarget* gtgt)
cmGeneratedFileStream fout(fname.c_str());
fout << "\n";
}
- if (cmSourceFile* sf = mf->GetOrCreateSource(fname.c_str())) {
+ if (cmSourceFile* sf = mf->GetOrCreateSource(fname)) {
sf->SetProperty("LANGUAGE", llang.c_str());
gtgt->AddSource(fname);
}
@@ -1468,7 +1467,7 @@ void cmGlobalXCodeGenerator::AddCommandsToBuildPhase(
currentConfig != this->CurrentConfigurationTypes.end();
currentConfig++) {
this->CreateCustomRulesMakefile(makefile.c_str(), target, commands,
- currentConfig->c_str());
+ *currentConfig);
}
std::string cdir = this->CurrentLocalGenerator->GetCurrentBinaryDirectory();
@@ -1550,8 +1549,8 @@ void cmGlobalXCodeGenerator::CreateCustomRulesMakefile(
ccg.GetDepends().begin();
d != ccg.GetDepends().end(); ++d) {
std::string dep;
- if (this->CurrentLocalGenerator->GetRealDependency(d->c_str(),
- configName, dep)) {
+ if (this->CurrentLocalGenerator->GetRealDependency(*d, configName,
+ dep)) {
makefileStream << "\\\n"
<< this->ConvertToRelativeForMake(dep.c_str());
}
@@ -1662,7 +1661,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
}
if (!extraLinkOptionsVar.empty()) {
this->CurrentLocalGenerator->AddConfigVariableFlags(
- extraLinkOptions, extraLinkOptionsVar.c_str(), configName);
+ extraLinkOptions, extraLinkOptionsVar, configName);
}
if (gtgt->GetType() == cmState::OBJECT_LIBRARY ||
@@ -1678,7 +1677,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
if (!configName.empty()) {
std::string linkFlagsVar = "LINK_FLAGS_";
linkFlagsVar += cmSystemTools::UpperCase(configName);
- if (const char* linkFlags = gtgt->GetProperty(linkFlagsVar.c_str())) {
+ if (const char* linkFlags = gtgt->GetProperty(linkFlagsVar)) {
this->CurrentLocalGenerator->AppendFlags(extraLinkOptions, linkFlags);
}
}
@@ -1916,7 +1915,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
configName);
for (std::vector<std::string>::iterator i = includes.begin();
i != includes.end(); ++i) {
- if (this->NameResolvesToFramework(i->c_str())) {
+ if (this->NameResolvesToFramework(*i)) {
std::string frameworkDir = *i;
frameworkDir += "/../";
frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir);
@@ -2165,7 +2164,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
std::string processed =
ge.Parse(gtgt->GetProperty(*i))
->Evaluate(this->CurrentLocalGenerator, configName);
- buildSettings->AddAttribute(attribute.c_str(),
+ buildSettings->AddAttribute(attribute,
this->CreateString(processed));
}
}
@@ -2195,7 +2194,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget(
cmXCodeObject* target =
this->CreateObject(cmXCodeObject::PBXAggregateTarget);
- target->SetComment(gtgt->GetName().c_str());
+ target->SetComment(gtgt->GetName());
cmXCodeObject* buildPhases = this->CreateObject(cmXCodeObject::OBJECT_LIST);
std::vector<cmXCodeObject*> emptyContentVector;
this->CreateCustomCommands(buildPhases, 0, 0, 0, emptyContentVector, 0,
@@ -2233,7 +2232,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget(
}
}
- target->SetId(this->GetOrCreateId(gtgt->GetName(), target->GetId()).c_str());
+ target->SetId(this->GetOrCreateId(gtgt->GetName(), target->GetId()));
return target;
}
@@ -2257,7 +2256,7 @@ std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target,
comment += " \"";
comment += gtgt->GetName();
comment += "\"";
- configlist->SetComment(comment.c_str());
+ configlist->SetComment(comment);
target->AddAttribute("buildConfigurationList",
this->CreateObjectReference(configlist));
for (unsigned int i = 0; i < configVector.size(); ++i) {
@@ -2266,9 +2265,9 @@ std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target,
buildConfigurations->AddObject(config);
cmXCodeObject* buildSettings =
this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
- this->CreateBuildSettings(gtgt, buildSettings, configVector[i].c_str());
+ this->CreateBuildSettings(gtgt, buildSettings, configVector[i]);
config->AddAttribute("name", this->CreateString(configVector[i]));
- config->SetComment(configVector[i].c_str());
+ config->SetComment(configVector[i]);
config->AddAttribute("buildSettings", buildSettings);
}
if (!configVector.empty()) {
@@ -2367,7 +2366,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget(
cmXCodeObject* buildSettings =
this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
defConfig = this->CurrentMakefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
- this->CreateBuildSettings(gtgt, buildSettings, defConfig.c_str());
+ this->CreateBuildSettings(gtgt, buildSettings, defConfig);
target->AddAttribute("buildSettings", buildSettings);
}
cmXCodeObject* dependencies = this->CreateObject(cmXCodeObject::OBJECT_LIST);
@@ -2385,7 +2384,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget(
fullName += gtgt->GetName();
fullName += ".a";
} else {
- fullName = gtgt->GetFullName(defConfig.c_str());
+ fullName = gtgt->GetFullName(defConfig);
}
fileRef->AddAttribute("path", this->CreateString(fullName));
if (this->XcodeVersion == 15) {
@@ -2393,7 +2392,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget(
}
fileRef->AddAttribute("sourceTree",
this->CreateString("BUILT_PRODUCTS_DIR"));
- fileRef->SetComment(gtgt->GetName().c_str());
+ fileRef->SetComment(gtgt->GetName());
target->AddAttribute("productReference",
this->CreateObjectReference(fileRef));
if (const char* productType = this->GetTargetProductType(gtgt)) {
@@ -2401,7 +2400,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget(
}
target->SetTarget(gtgt);
this->XCodeObjectMap[gtgt] = target;
- target->SetId(this->GetOrCreateId(gtgt->GetName(), target->GetId()).c_str());
+ target->SetId(this->GetOrCreateId(gtgt->GetName(), target->GetId()));
return target;
}
@@ -2426,15 +2425,14 @@ std::string cmGlobalXCodeGenerator::GetOrCreateId(const std::string& name,
std::string guidStoreName = name;
guidStoreName += "_GUID_CMAKE";
const char* storedGUID =
- this->CMakeInstance->GetCacheDefinition(guidStoreName.c_str());
+ this->CMakeInstance->GetCacheDefinition(guidStoreName);
if (storedGUID) {
return storedGUID;
}
- this->CMakeInstance->AddCacheEntry(guidStoreName.c_str(), id.c_str(),
- "Stored Xcode object GUID",
- cmState::INTERNAL);
+ this->CMakeInstance->AddCacheEntry(
+ guidStoreName, id.c_str(), "Stored Xcode object GUID", cmState::INTERNAL);
return id;
}
@@ -2482,7 +2480,7 @@ void cmGlobalXCodeGenerator::AppendOrAddBuildSetting(cmXCodeObject* settings,
std::string oldValue = attr->GetString();
oldValue += " ";
oldValue += value;
- attr->SetString(oldValue.c_str());
+ attr->SetString(oldValue);
}
}
}
@@ -2582,7 +2580,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
std::vector<std::string> const& libDeps = cli.GetDepends();
for (std::vector<std::string>::const_iterator j = libDeps.begin();
j != libDeps.end(); ++j) {
- target->AddDependLibrary(configName, j->c_str());
+ target->AddDependLibrary(configName, *j);
}
}
@@ -2891,8 +2889,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
std::string project_id = "PROJECT_";
project_id += root->GetProjectName();
this->RootObject->SetId(
- this->GetOrCreateId(project_id.c_str(), this->RootObject->GetId())
- .c_str());
+ this->GetOrCreateId(project_id.c_str(), this->RootObject->GetId()));
group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
this->RootObject->AddAttribute("mainGroup",
@@ -2963,7 +2960,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
comment += " \"";
comment += this->CurrentProject;
comment += "\"";
- configlist->SetComment(comment.c_str());
+ configlist->SetComment(comment);
configlist->AddAttribute("defaultConfigurationIsVisible",
this->CreateString("0"));
configlist->AddAttribute("defaultConfigurationName",
@@ -3373,8 +3370,7 @@ std::string cmGlobalXCodeGenerator::LookupFlags(
std::string varName = varNamePrefix;
varName += varNameLang;
varName += varNameSuffix;
- if (const char* varValue =
- this->CurrentMakefile->GetDefinition(varName.c_str())) {
+ if (const char* varValue = this->CurrentMakefile->GetDefinition(varName)) {
if (*varValue) {
return varValue;
}
diff --git a/Source/cmGraphAdjacencyList.h b/Source/cmGraphAdjacencyList.h
index 5666d48..65bed5e 100644
--- a/Source/cmGraphAdjacencyList.h
+++ b/Source/cmGraphAdjacencyList.h
@@ -12,6 +12,8 @@
#ifndef cmGraphAdjacencyList_h
#define cmGraphAdjacencyList_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
/**
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx
index adb9936..e88e048 100644
--- a/Source/cmGraphVizWriter.cxx
+++ b/Source/cmGraphVizWriter.cxx
@@ -12,9 +12,19 @@
#include "cmGraphVizWriter.h"
#include "cmGeneratedFileStream.h"
+#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
+#include "cm_auto_ptr.hxx"
+#include "cmake.h"
+
+#include <cmConfigure.h>
+#include <iostream>
+#include <sstream>
+#include <utility>
static const char* getShapeForTarget(const cmGeneratorTarget* target)
{
@@ -88,7 +98,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
{ \
const char* value = mf->GetDefinition(cmakeDefinition); \
if (value) { \
- var = value; \
+ (var) = value; \
} \
}
@@ -101,7 +111,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
{ \
const char* value = mf->GetDefinition(cmakeDefinition); \
if (value) { \
- var = mf->IsOn(cmakeDefinition); \
+ (var) = mf->IsOn(cmakeDefinition); \
} \
}
diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h
index c73d82d..f34e967 100644
--- a/Source/cmGraphVizWriter.h
+++ b/Source/cmGraphVizWriter.h
@@ -12,13 +12,19 @@
#ifndef CMGRAPHVIZWRITER_H
#define CMGRAPHVIZWRITER_H
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include "cmState.h"
-#include "cmGeneratedFileStream.h"
-#include "cmLocalGenerator.h"
#include <cmsys/RegularExpression.hxx>
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+class cmGeneratedFileStream;
class cmGeneratorTarget;
+class cmLocalGenerator;
/** This class implements writing files for graphviz (dot) for graphs
* representing the dependencies between the targets in the project. */
diff --git a/Source/cmHexFileConverter.h b/Source/cmHexFileConverter.h
index 56fa9b1..06616a2 100644
--- a/Source/cmHexFileConverter.h
+++ b/Source/cmHexFileConverter.h
@@ -12,6 +12,8 @@
#ifndef cmHexFileConverter_h
#define cmHexFileConverter_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
/** \class cmHexFileConverter
diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h
index fac7d4e..df0f82e 100644
--- a/Source/cmIDEOptions.h
+++ b/Source/cmIDEOptions.h
@@ -12,6 +12,8 @@
#ifndef cmIDEOptions_h
#define cmIDEOptions_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
#include "cmIDEFlagTable.h"
diff --git a/Source/cmInstallCommandArguments.h b/Source/cmInstallCommandArguments.h
index 6ccb3e8..2ef421f 100644
--- a/Source/cmInstallCommandArguments.h
+++ b/Source/cmInstallCommandArguments.h
@@ -13,6 +13,8 @@
#ifndef cmInstallCommandArguments_h
#define cmInstallCommandArguments_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
#include "cmCommandArgumentsHelper.h"
diff --git a/Source/cmInstallDirectoryGenerator.cxx b/Source/cmInstallDirectoryGenerator.cxx
index 469b119..3b4226d 100644
--- a/Source/cmInstallDirectoryGenerator.cxx
+++ b/Source/cmInstallDirectoryGenerator.cxx
@@ -12,8 +12,11 @@
#include "cmInstallDirectoryGenerator.h"
#include "cmGeneratorExpression.h"
+#include "cmInstallType.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
+#include "cmSystemTools.h"
+#include "cm_auto_ptr.hxx"
cmInstallDirectoryGenerator::cmInstallDirectoryGenerator(
std::vector<std::string> const& dirs, const char* dest,
diff --git a/Source/cmInstallDirectoryGenerator.h b/Source/cmInstallDirectoryGenerator.h
index 93becf4..ed40785 100644
--- a/Source/cmInstallDirectoryGenerator.h
+++ b/Source/cmInstallDirectoryGenerator.h
@@ -13,6 +13,14 @@
#define cmInstallDirectoryGenerator_h
#include "cmInstallGenerator.h"
+#include "cmScriptGenerator.h"
+
+#include <cmConfigure.h>
+#include <iosfwd>
+#include <string>
+#include <vector>
+
+class cmLocalGenerator;
/** \class cmInstallDirectoryGenerator
* \brief Generate directory installation rules.
diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx
index 72c4d1f..27628f4 100644
--- a/Source/cmInstallExportGenerator.cxx
+++ b/Source/cmInstallExportGenerator.cxx
@@ -11,19 +11,17 @@
============================================================================*/
#include "cmInstallExportGenerator.h"
-#include <stdio.h>
-
-#include "cmGeneratedFileStream.h"
-#include "cmGlobalGenerator.h"
-#include "cmInstallTargetGenerator.h"
-#include "cmLocalGenerator.h"
-#include "cmMakefile.h"
-#include "cmake.h"
-
-#include "cmInstallFilesGenerator.h"
+#include <algorithm>
+#include <map>
+#include <sstream>
+#include <utility>
#include "cmExportInstallFileGenerator.h"
#include "cmExportSet.h"
+#include "cmInstallType.h"
+#include "cmLocalGenerator.h"
+#include "cmSystemTools.h"
+#include "cmake.h"
cmInstallExportGenerator::cmInstallExportGenerator(
cmExportSet* exportSet, const char* destination,
diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h
index 22e661b..5539827 100644
--- a/Source/cmInstallExportGenerator.h
+++ b/Source/cmInstallExportGenerator.h
@@ -12,13 +12,19 @@
#ifndef cmInstallExportGenerator_h
#define cmInstallExportGenerator_h
+#include <cmConfigure.h>
+
#include "cmInstallGenerator.h"
+#include "cmScriptGenerator.h"
+
+#include <iosfwd>
+#include <stddef.h>
+#include <string>
+#include <vector>
class cmExportInstallFileGenerator;
-class cmInstallFilesGenerator;
-class cmInstallTargetGenerator;
class cmExportSet;
-class cmMakefile;
+class cmLocalGenerator;
/** \class cmInstallExportGenerator
* \brief Generate rules for creating an export files.
diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx
index 93a740c..1d0fadd 100644
--- a/Source/cmInstallFilesGenerator.cxx
+++ b/Source/cmInstallFilesGenerator.cxx
@@ -12,9 +12,11 @@
#include "cmInstallFilesGenerator.h"
#include "cmGeneratorExpression.h"
-#include "cmLocalGenerator.h"
-#include "cmMakefile.h"
+#include "cmInstallType.h"
#include "cmSystemTools.h"
+#include "cm_auto_ptr.hxx"
+
+class cmLocalGenerator;
cmInstallFilesGenerator::cmInstallFilesGenerator(
std::vector<std::string> const& files, const char* dest, bool programs,
diff --git a/Source/cmInstallFilesGenerator.h b/Source/cmInstallFilesGenerator.h
index 5cb09f4..1648976 100644
--- a/Source/cmInstallFilesGenerator.h
+++ b/Source/cmInstallFilesGenerator.h
@@ -12,7 +12,16 @@
#ifndef cmInstallFilesGenerator_h
#define cmInstallFilesGenerator_h
+#include <cmConfigure.h>
+
#include "cmInstallGenerator.h"
+#include "cmScriptGenerator.h"
+
+#include <iosfwd>
+#include <string>
+#include <vector>
+
+class cmLocalGenerator;
/** \class cmInstallFilesGenerator
* \brief Generate file installation rules.
diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx
index e3d5bad..69120a8 100644
--- a/Source/cmInstallGenerator.cxx
+++ b/Source/cmInstallGenerator.cxx
@@ -14,6 +14,8 @@
#include "cmMakefile.h"
#include "cmSystemTools.h"
+#include <ostream>
+
cmInstallGenerator::cmInstallGenerator(
const char* destination, std::vector<std::string> const& configurations,
const char* component, MessageLevel message, bool exclude_from_all)
diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h
index ad9fc28..fa0bdd6 100644
--- a/Source/cmInstallGenerator.h
+++ b/Source/cmInstallGenerator.h
@@ -12,9 +12,15 @@
#ifndef cmInstallGenerator_h
#define cmInstallGenerator_h
+#include <cmConfigure.h>
+
#include "cmInstallType.h"
#include "cmScriptGenerator.h"
+#include <iosfwd>
+#include <string>
+#include <vector>
+
class cmLocalGenerator;
class cmMakefile;
diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx
index 76d6b71..7871100 100644
--- a/Source/cmInstallScriptGenerator.cxx
+++ b/Source/cmInstallScriptGenerator.cxx
@@ -11,6 +11,11 @@
============================================================================*/
#include "cmInstallScriptGenerator.h"
+#include "cmScriptGenerator.h"
+
+#include <ostream>
+#include <vector>
+
cmInstallScriptGenerator::cmInstallScriptGenerator(const char* script,
bool code,
const char* component,
diff --git a/Source/cmInstallScriptGenerator.h b/Source/cmInstallScriptGenerator.h
index dc00359..609294f 100644
--- a/Source/cmInstallScriptGenerator.h
+++ b/Source/cmInstallScriptGenerator.h
@@ -12,8 +12,13 @@
#ifndef cmInstallScriptGenerator_h
#define cmInstallScriptGenerator_h
+#include <cmConfigure.h>
+
#include "cmInstallGenerator.h"
+#include <iosfwd>
+#include <string>
+
/** \class cmInstallScriptGenerator
* \brief Generate target installation rules.
*/
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 4b2f40c..1ad59ff 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -14,13 +14,21 @@
#include "cmComputeLinkInformation.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
-#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
+#include "cmInstallType.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
+#include "cm_auto_ptr.hxx"
#include "cmake.h"
#include <assert.h>
+#include <map>
+#include <set>
+#include <sstream>
+#include <utility>
cmInstallTargetGenerator::cmInstallTargetGenerator(
const std::string& targetName, const char* dest, bool implib,
diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h
index b1c28b8..797e962 100644
--- a/Source/cmInstallTargetGenerator.h
+++ b/Source/cmInstallTargetGenerator.h
@@ -12,9 +12,17 @@
#ifndef cmInstallTargetGenerator_h
#define cmInstallTargetGenerator_h
+#include <cmConfigure.h>
+
#include "cmInstallGenerator.h"
+#include "cmScriptGenerator.h"
+
+#include <iosfwd>
+#include <string>
+#include <vector>
class cmGeneratorTarget;
+class cmLocalGenerator;
/** \class cmInstallTargetGenerator
* \brief Generate target installation rules.
diff --git a/Source/cmInstalledFile.cxx b/Source/cmInstalledFile.cxx
index bfc5cf1..3ab7db0 100644
--- a/Source/cmInstalledFile.cxx
+++ b/Source/cmInstalledFile.cxx
@@ -12,9 +12,13 @@
#include "cmInstalledFile.h"
#include "cmAlgorithms.h"
+#include "cmListFileCache.h"
#include "cmMakefile.h"
#include "cmSystemTools.h"
+#include <cmConfigure.h>
+#include <utility>
+
cmInstalledFile::cmInstalledFile()
: NameExpression(CM_NULLPTR)
{
diff --git a/Source/cmInstalledFile.h b/Source/cmInstalledFile.h
index 00ff611..8bad5a5 100644
--- a/Source/cmInstalledFile.h
+++ b/Source/cmInstalledFile.h
@@ -13,6 +13,13 @@
#define cmInstalledFile_h
#include "cmGeneratorExpression.h"
+#include "cm_auto_ptr.hxx"
+
+#include <map>
+#include <string>
+#include <vector>
+
+class cmMakefile;
/** \class cmInstalledFile
* \brief Represents a file intended for installation.
diff --git a/Source/cmLinkedTree.h b/Source/cmLinkedTree.h
index 6b31074..466aaa7 100644
--- a/Source/cmLinkedTree.h
+++ b/Source/cmLinkedTree.h
@@ -12,6 +12,8 @@
#ifndef cmLinkedTree_h
#define cmLinkedTree_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
#include <assert.h>
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index aad538c..14bb81e 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -15,9 +15,12 @@
#include "cmMessenger.h"
#include "cmOutputConverter.h"
#include "cmSystemTools.h"
-#include "cmVersion.h"
+#include "cmake.h"
-#include <cmsys/RegularExpression.hxx>
+#include <algorithm>
+#include <assert.h>
+#include <cmConfigure.h>
+#include <sstream>
struct cmListFileParser
{
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index cd44536..215f179 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -12,7 +12,11 @@
#ifndef cmListFileCache_h
#define cmListFileCache_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <iosfwd>
+#include <string>
+#include <vector>
#include "cmState.h"
@@ -149,6 +153,7 @@ public:
private:
struct Entry;
+
cmState::Snapshot Bottom;
Entry* Cur;
cmListFileBacktrace(cmState::Snapshot bottom, Entry* up,
diff --git a/Source/cmLocalCommonGenerator.cxx b/Source/cmLocalCommonGenerator.cxx
index 1383421..0e79293 100644
--- a/Source/cmLocalCommonGenerator.cxx
+++ b/Source/cmLocalCommonGenerator.cxx
@@ -11,8 +11,13 @@
============================================================================*/
#include "cmLocalCommonGenerator.h"
+#include "cmGeneratorTarget.h"
#include "cmMakefile.h"
+#include <vector>
+
+class cmGlobalGenerator;
+
cmLocalCommonGenerator::cmLocalCommonGenerator(
cmGlobalGenerator* gg, cmMakefile* mf, cmOutputConverter::RelativeRoot wd)
: cmLocalGenerator(gg, mf)
diff --git a/Source/cmLocalCommonGenerator.h b/Source/cmLocalCommonGenerator.h
index 0a8753d..9012afd 100644
--- a/Source/cmLocalCommonGenerator.h
+++ b/Source/cmLocalCommonGenerator.h
@@ -12,9 +12,16 @@
#ifndef cmLocalCommonGenerator_h
#define cmLocalCommonGenerator_h
+#include <cmConfigure.h>
+
#include "cmLocalGenerator.h"
+#include "cmOutputConverter.h"
+
+#include <string>
-class cmCommonTargetGenerator;
+class cmGeneratorTarget;
+class cmGlobalGenerator;
+class cmMakefile;
/** \class cmLocalCommonGenerator
* \brief Common infrastructure for Makefile and Ninja local generators.
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index de9e1e5..694a9f6 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -16,14 +16,15 @@
#include "cmCustomCommandGenerator.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorExpressionEvaluationFile.h"
+#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
-#include "cmInstallFilesGenerator.h"
#include "cmInstallGenerator.h"
#include "cmInstallScriptGenerator.h"
#include "cmInstallTargetGenerator.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
-#include "cmTest.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
#include "cmTestGenerator.h"
#include "cmVersion.h"
#include "cmake.h"
@@ -33,9 +34,14 @@
#include <cmsys/MD5.h>
#endif
-#include <ctype.h> // for isalpha
-
+#include <algorithm>
#include <assert.h>
+#include <cmsys/RegularExpression.hxx>
+#include <ctype.h>
+#include <iterator>
+#include <sstream>
+#include <stdio.h>
+#include <utility>
#if defined(__HAIKU__)
#include <FindDirectory.h>
@@ -1367,7 +1373,7 @@ void cmLocalGenerator::GetTargetDefines(cmGeneratorTarget const* target,
}
// Add preprocessor definitions for this target and configuration.
- this->AddCompileDefinitions(defines, target, config, lang.c_str());
+ this->AddCompileDefinitions(defines, target, config, lang);
}
std::string cmLocalGenerator::GetTargetFortranFlags(
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index fa4bb30..a43a7d1 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -12,19 +12,27 @@
#ifndef cmLocalGenerator_h
#define cmLocalGenerator_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h>
+#include "cmListFileCache.h"
#include "cmOutputConverter.h"
+#include "cmPolicies.h"
#include "cmState.h"
#include "cmake.h"
-class cmMakefile;
-class cmGlobalGenerator;
+#include <cm_kwiml.h>
+#include <iosfwd>
+#include <map>
+#include <set>
+#include <string.h>
+#include <string>
+#include <vector>
+
+class cmCustomCommandGenerator;
class cmGeneratorTarget;
-class cmTargetManifest;
+class cmGlobalGenerator;
+class cmMakefile;
class cmSourceFile;
-class cmCustomCommand;
-class cmCustomCommandGenerator;
/** \class cmLocalGenerator
* \brief Create required build files for a directory.
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index d15ee22..6793f84 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -12,16 +12,25 @@
============================================================================*/
#include "cmLocalNinjaGenerator.h"
+#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
#include "cmGeneratedFileStream.h"
+#include "cmGeneratorTarget.h"
+#include "cmGlobalGenerator.h"
#include "cmGlobalNinjaGenerator.h"
#include "cmMakefile.h"
#include "cmNinjaTargetGenerator.h"
#include "cmSourceFile.h"
#include "cmState.h"
+#include "cmSystemTools.h"
#include "cmake.h"
+#include <algorithm>
#include <assert.h>
+#include <iterator>
+#include <sstream>
+#include <stdio.h>
+#include <utility>
cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg,
cmMakefile* mf)
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index 6e61087..25539d4 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -13,13 +13,27 @@
#ifndef cmLocalNinjaGenerator_h
#define cmLocalNinjaGenerator_h
-#include "cmLocalCommonGenerator.h"
+#include <cmConfigure.h>
+#include "cmLocalCommonGenerator.h"
+#include "cmLocalGenerator.h"
#include "cmNinjaTypes.h"
+#include "cmOutputConverter.h"
+
+#include <iosfwd>
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+class cmCustomCommand;
class cmCustomCommandGenerator;
-class cmGlobalNinjaGenerator;
class cmGeneratedFileStream;
+class cmGeneratorTarget;
+class cmGlobalGenerator;
+class cmGlobalNinjaGenerator;
+class cmMakefile;
+class cmSourceFile;
class cmake;
/**
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 3c4841e..611c502 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -12,13 +12,20 @@
#include "cmLocalUnixMakefileGenerator3.h"
#include "cmAlgorithms.h"
+#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
#include "cmFileTimeComparison.h"
#include "cmGeneratedFileStream.h"
+#include "cmGeneratorTarget.h"
+#include "cmGlobalGenerator.h"
#include "cmGlobalUnixMakefileGenerator3.h"
+#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmMakefileTargetGenerator.h"
+#include "cmOutputConverter.h"
#include "cmSourceFile.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
#include "cmVersion.h"
#include "cmake.h"
@@ -30,11 +37,14 @@
#include "cmDependsJava.h"
#endif
+#include <algorithm>
#include <cm_auto_ptr.hxx>
+#include <cmsys/FStream.hxx>
#include <cmsys/Terminal.h>
-
-#include <algorithm>
-#include <queue>
+#include <functional>
+#include <sstream>
+#include <stdio.h>
+#include <utility>
// Escape special characters in Makefile dependency lines
class cmMakeSafe
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index 3e90055..bd32e10 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -12,15 +12,22 @@
#ifndef cmLocalUnixMakefileGenerator3_h
#define cmLocalUnixMakefileGenerator3_h
-#include "cmLocalCommonGenerator.h"
+#include <cmConfigure.h>
-// for cmDepends::DependencyVector
#include "cmDepends.h"
+#include "cmLocalCommonGenerator.h"
+
+#include <iosfwd>
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
class cmCustomCommand;
class cmCustomCommandGenerator;
-class cmDepends;
-class cmMakefileTargetGenerator;
+class cmGeneratorTarget;
+class cmGlobalGenerator;
+class cmMakefile;
class cmSourceFile;
/** \class cmLocalUnixMakefileGenerator3
diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx
index 37b5505..0fe7987 100644
--- a/Source/cmLocalVisualStudio10Generator.cxx
+++ b/Source/cmLocalVisualStudio10Generator.cxx
@@ -11,10 +11,12 @@
============================================================================*/
#include "cmLocalVisualStudio10Generator.h"
+#include "cmGeneratorTarget.h"
#include "cmGlobalVisualStudio10Generator.h"
#include "cmMakefile.h"
#include "cmVisualStudio10TargetGenerator.h"
#include "cmXMLParser.h"
+
#include <cm_expat.h>
class cmVS10XMLParser : public cmXMLParser
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index b492962..d344dc5 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -12,6 +12,7 @@
#include "cmLocalVisualStudioGenerator.h"
#include "cmCustomCommandGenerator.h"
+#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx
index db87946..098779e 100644
--- a/Source/cmLocalXCodeGenerator.cxx
+++ b/Source/cmLocalXCodeGenerator.cxx
@@ -11,6 +11,7 @@
============================================================================*/
#include "cmLocalXCodeGenerator.h"
+#include "cmGeneratorTarget.h"
#include "cmGlobalXCodeGenerator.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
diff --git a/Source/cmLocale.h b/Source/cmLocale.h
index f922c03..f9bc458 100644
--- a/Source/cmLocale.h
+++ b/Source/cmLocale.h
@@ -12,6 +12,8 @@
#ifndef cmLocale_h
#define cmLocale_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
#include <locale.h>
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d1fddca..11ccca1 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -23,34 +23,35 @@
#include "cmGeneratorExpression.h"
#include "cmGeneratorExpressionEvaluationFile.h"
#include "cmGlobalGenerator.h"
-#include "cmInstallGenerator.h"
#include "cmListFileCache.h"
-#include "cmMessenger.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"
+#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 <algorithm>
-#include <assert.h>
#include <ctype.h>
#include <sstream>
#include <stdlib.h>
#include <string.h>
#include <utility>
+class cmMessenger;
+
// default is not to be building executables
cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator,
cmState::Snapshot const& snapshot)
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 4d137db..eb382df 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -54,6 +54,7 @@ class cmFunctionBlocker;
class cmGeneratorExpressionEvaluationFile;
class cmGlobalGenerator;
class cmInstallGenerator;
+class cmMessenger;
class cmSourceFile;
class cmTest;
class cmTestGenerator;
@@ -892,10 +893,13 @@ private:
void PopSnapshot(bool reportError = true);
friend class cmCMakePolicyCommand;
class IncludeScope;
+
friend class IncludeScope;
class ListFileScope;
+
friend class ListFileScope;
class BuildsystemFileScope;
+
friend class BuildsystemFileScope;
// CMP0053 == old
diff --git a/Source/cmMessenger.cxx b/Source/cmMessenger.cxx
index 43fa150..fe67050 100644
--- a/Source/cmMessenger.cxx
+++ b/Source/cmMessenger.cxx
@@ -11,14 +11,18 @@
============================================================================*/
#include "cmMessenger.h"
+
+#include "cmAlgorithms.h"
#include "cmDocumentationFormatter.h"
-#include "cmMessenger.h"
-#include "cmOutputConverter.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include <cmsys/SystemInformation.hxx>
#endif
+#include <sstream>
+
cmake::MessageType cmMessenger::ConvertMessageType(cmake::MessageType t) const
{
bool warningsAsErrors;
diff --git a/Source/cmMessenger.h b/Source/cmMessenger.h
index f15bf13..c69eb8e 100644
--- a/Source/cmMessenger.h
+++ b/Source/cmMessenger.h
@@ -13,10 +13,15 @@
#ifndef cmMessenger_h
#define cmMessenger_h
+#include <cmConfigure.h> // IWYU pragma: keep
+
#include "cmListFileCache.h"
-#include "cmState.h"
#include "cmake.h"
+#include <string>
+
+class cmState;
+
class cmMessenger
{
public:
diff --git a/Source/cmNinjaTypes.h b/Source/cmNinjaTypes.h
index 82a5220..d3816bb 100644
--- a/Source/cmNinjaTypes.h
+++ b/Source/cmNinjaTypes.h
@@ -13,6 +13,8 @@
#ifndef cmNinjaTypes_h
#define cmNinjaTypes_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
typedef std::vector<std::string> cmNinjaDeps;
diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx
index dbfe6eb..3ddcc9a 100644
--- a/Source/cmOSXBundleGenerator.cxx
+++ b/Source/cmOSXBundleGenerator.cxx
@@ -11,12 +11,18 @@
============================================================================*/
#include "cmOSXBundleGenerator.h"
+#include <cmConfigure.h>
+
+#include "cmGeneratorTarget.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
+#include "cmSystemTools.h"
#include "cmTarget.h"
#include <cassert>
+class cmSourceFile;
+
cmOSXBundleGenerator::cmOSXBundleGenerator(cmGeneratorTarget* target,
const std::string& configName)
: GT(target)
diff --git a/Source/cmOSXBundleGenerator.h b/Source/cmOSXBundleGenerator.h
index 55a3c75..ff472ec 100644
--- a/Source/cmOSXBundleGenerator.h
+++ b/Source/cmOSXBundleGenerator.h
@@ -12,17 +12,16 @@
#ifndef cmOSXBundleGenerator_h
#define cmOSXBundleGenerator_h
-#include "cmStandardIncludes.h"
-
-#include "cmSourceFile.h"
+#include <cmConfigure.h> // IWYU pragma: keep
#include <set>
#include <string>
+#include <vector>
-class cmTarget;
-class cmMakefile;
-class cmLocalGenerator;
class cmGeneratorTarget;
+class cmLocalGenerator;
+class cmMakefile;
+class cmSourceFile;
class cmOSXBundleGenerator
{
diff --git a/Source/cmObject.h b/Source/cmObject.h
index d883c52..cb683f6 100644
--- a/Source/cmObject.h
+++ b/Source/cmObject.h
@@ -12,6 +12,8 @@
#ifndef cmObject_h
#define cmObject_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
/** \class cmObject
diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx
index 20f2246..d7ad83d 100644
--- a/Source/cmOrderDirectories.cxx
+++ b/Source/cmOrderDirectories.cxx
@@ -12,13 +12,15 @@
#include "cmOrderDirectories.h"
#include "cmAlgorithms.h"
+#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmSystemTools.h"
#include "cmake.h"
-#include <assert.h>
-
#include <algorithm>
+#include <assert.h>
+#include <functional>
+#include <sstream>
/*
Directory ordering computation.
diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h
index 38e197c..081e8a0 100644
--- a/Source/cmOrderDirectories.h
+++ b/Source/cmOrderDirectories.h
@@ -12,14 +12,18 @@
#ifndef cmOrderDirectories_h
#define cmOrderDirectories_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h>
#include <cmsys/RegularExpression.hxx>
+#include <map>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
+class cmGeneratorTarget;
class cmGlobalGenerator;
class cmOrderDirectoriesConstraint;
-class cmOrderDirectoriesConstraintLibrary;
-class cmGeneratorTarget;
/** \class cmOrderDirectories
* \brief Compute a safe runtime path order for a set of shared libraries.
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx
index 630da42..d44fbb7 100644
--- a/Source/cmOutputConverter.cxx
+++ b/Source/cmOutputConverter.cxx
@@ -12,14 +12,14 @@
#include "cmOutputConverter.h"
#include "cmAlgorithms.h"
-#include "cmake.h"
+#include "cmSystemTools.h"
+#include <algorithm>
#include <assert.h>
+#include <ctype.h>
+#include <set>
#include <sstream>
-#include <ctype.h> /* isalpha */
-#include <string.h> /* strlen */
-
cmOutputConverter::cmOutputConverter(cmState::Snapshot snapshot)
: StateSnapshot(snapshot)
, LinkScriptShell(false)
diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h
index 9af9659..ac58ddc 100644
--- a/Source/cmOutputConverter.h
+++ b/Source/cmOutputConverter.h
@@ -12,11 +12,13 @@
#ifndef cmOutputConverter_h
#define cmOutputConverter_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
-#include "cmGlobalGenerator.h"
#include "cmState.h"
+#include <string>
+#include <vector>
+
class cmOutputConverter
{
public:
diff --git a/Source/cmPathLabel.h b/Source/cmPathLabel.h
index 39fbec3..e065110 100644
--- a/Source/cmPathLabel.h
+++ b/Source/cmPathLabel.h
@@ -12,6 +12,8 @@
#ifndef cmPathLabel_h
#define cmPathLabel_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
/** \class cmPathLabel
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 7688c59..3402191 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -86,9 +86,10 @@ static bool isPolicyNewerThan(cmPolicies::PolicyID id, unsigned int majorV,
switch (id) {
#define POLICY_CASE(ID, V_MAJOR, V_MINOR, V_PATCH) \
case cmPolicies::ID: \
- return ( \
- majorV < V_MAJOR || (majorV == V_MAJOR && minorV + 1 < V_MINOR + 1) || \
- (majorV == V_MAJOR && minorV == V_MINOR && patchV + 1 < V_PATCH + 1));
+ return (majorV < (V_MAJOR) || \
+ (majorV == (V_MAJOR) && minorV + 1 < (V_MINOR) + 1) || \
+ (majorV == (V_MAJOR) && minorV == (V_MINOR) && \
+ patchV + 1 < (V_PATCH) + 1));
CM_FOR_EACH_POLICY_ID_VERSION(POLICY_CASE)
#undef POLICY_CASE
case cmPolicies::CMPCOUNT:
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index f1da4d5..00f1370 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -13,19 +13,40 @@
#include "cmQtAutoGeneratorInitializer.h"
+#include "cmAlgorithms.h"
+#include "cmCustomCommandLines.h"
#include "cmFilePathUuid.h"
+#include "cmGeneratorTarget.h"
+#include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
+#include "cmOutputConverter.h"
#include "cmSourceFile.h"
-
-#include <sys/stat.h>
-
-#include <cmsys/FStream.hxx>
+#include "cmSourceFileLocation.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
+#include "cmake.h"
#if defined(_WIN32) && !defined(__CYGWIN__)
#include "cmGlobalVisualStudioGenerator.h"
#endif
+#include <algorithm>
+#include <assert.h>
+#include <cmConfigure.h>
+#include <cmsys/FStream.hxx>
+#include <cmsys/RegularExpression.hxx>
+#include <iostream>
+#include <map>
+#include <set>
+#include <sstream>
+#include <string.h>
+#include <string>
+#include <sys/stat.h>
+#include <utility>
+#include <vector>
+
static std::string GetAutogenTargetName(cmGeneratorTarget const* target)
{
std::string autogenTargetName = target->GetName();
diff --git a/Source/cmQtAutoGeneratorInitializer.h b/Source/cmQtAutoGeneratorInitializer.h
index b411597..fedb388 100644
--- a/Source/cmQtAutoGeneratorInitializer.h
+++ b/Source/cmQtAutoGeneratorInitializer.h
@@ -14,13 +14,8 @@
#ifndef cmQtAutoGeneratorInitializer_h
#define cmQtAutoGeneratorInitializer_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
-#include <map>
-#include <string>
-#include <vector>
-
-class cmSourceFile;
class cmGeneratorTarget;
class cmLocalGenerator;
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index a261962..329c742 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -20,14 +20,21 @@
#include "cmOutputConverter.h"
#include "cmState.h"
#include "cmSystemTools.h"
+#include "cm_auto_ptr.hxx"
+#include "cmake.h"
-#include <sys/stat.h>
-
+#include <algorithm>
#include <assert.h>
+#include <cmConfigure.h>
#include <cmsys/FStream.hxx>
+#include <cmsys/RegularExpression.hxx>
#include <cmsys/Terminal.h>
-
+#include <iostream>
+#include <sstream>
+#include <stdlib.h>
#include <string.h>
+#include <utility>
+
#if defined(__APPLE__)
#include <unistd.h>
#endif
diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h
index fab2d19..32975c2 100644
--- a/Source/cmQtAutoGenerators.h
+++ b/Source/cmQtAutoGenerators.h
@@ -14,10 +14,11 @@
#ifndef cmQtAutoGenerators_h
#define cmQtAutoGenerators_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
#include <list>
#include <map>
+#include <set>
#include <string>
#include <vector>
diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx
index 10d1cda..7f80923 100644
--- a/Source/cmRST.cxx
+++ b/Source/cmRST.cxx
@@ -14,8 +14,13 @@
#include "cmAlgorithms.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
+
+#include <algorithm>
#include <cmsys/FStream.hxx>
#include <ctype.h>
+#include <iterator>
+#include <stddef.h>
+#include <utility>
cmRST::cmRST(std::ostream& os, std::string const& docroot)
: OS(os)
diff --git a/Source/cmRST.h b/Source/cmRST.h
index 0e379b6..f37af88 100644
--- a/Source/cmRST.h
+++ b/Source/cmRST.h
@@ -12,9 +12,14 @@
#ifndef _cmRST_h
#define _cmRST_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
#include <cmsys/RegularExpression.hxx>
+#include <iosfwd>
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
/** \class cmRST
* \brief Perform basic .rst processing for command-line help
diff --git a/Source/cmScriptGenerator.cxx b/Source/cmScriptGenerator.cxx
index a000258..1ab70e2 100644
--- a/Source/cmScriptGenerator.cxx
+++ b/Source/cmScriptGenerator.cxx
@@ -13,6 +13,8 @@
#include "cmSystemTools.h"
+#include <cmConfigure.h>
+
cmScriptGenerator::cmScriptGenerator(
const std::string& config_var,
std::vector<std::string> const& configurations)
diff --git a/Source/cmScriptGenerator.h b/Source/cmScriptGenerator.h
index ef0766f..abe9a1d 100644
--- a/Source/cmScriptGenerator.h
+++ b/Source/cmScriptGenerator.h
@@ -12,7 +12,11 @@
#ifndef cmScriptGenerator_h
#define cmScriptGenerator_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <ostream>
+#include <string>
+#include <vector>
class cmScriptGeneratorIndent
{
diff --git a/Source/cmSearchPath.h b/Source/cmSearchPath.h
index 65f703f..7624d03 100644
--- a/Source/cmSearchPath.h
+++ b/Source/cmSearchPath.h
@@ -12,6 +12,8 @@
#ifndef cmSearchPath_h
#define cmSearchPath_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
class cmFindCommon;
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 5869a01..3aa4b92 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -11,11 +11,16 @@
============================================================================*/
#include "cmSourceFile.h"
+#include "cmCustomCommand.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
+#include "cmProperty.h"
+#include "cmState.h"
#include "cmSystemTools.h"
#include "cmake.h"
+#include <sstream>
+
cmSourceFile::cmSourceFile(cmMakefile* mf, const std::string& name)
: Location(mf, name)
{
diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h
index a3808f7..2c6d831 100644
--- a/Source/cmSourceFile.h
+++ b/Source/cmSourceFile.h
@@ -12,12 +12,16 @@
#ifndef cmSourceFile_h
#define cmSourceFile_h
-#include "cmSourceFileLocation.h"
+#include <cmConfigure.h>
-#include "cmCustomCommand.h"
#include "cmPropertyMap.h"
+#include "cmSourceFileLocation.h"
+
+#include <string>
+#include <vector>
-class cmake;
+class cmCustomCommand;
+class cmMakefile;
/** \class cmSourceFile
* \brief Represent a class loaded from a makefile.
diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx
index 099a6f0..e2a1552 100644
--- a/Source/cmSourceFileLocation.cxx
+++ b/Source/cmSourceFileLocation.cxx
@@ -11,12 +11,17 @@
============================================================================*/
#include "cmSourceFileLocation.h"
+#include <cmConfigure.h>
+
#include "cmAlgorithms.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmSystemTools.h"
+#include "cmake.h"
-#include "assert.h"
+#include <algorithm>
+#include <assert.h>
+#include <vector>
cmSourceFileLocation::cmSourceFileLocation()
: Makefile(CM_NULLPTR)
diff --git a/Source/cmSourceFileLocation.h b/Source/cmSourceFileLocation.h
index 7989173..e4e5116 100644
--- a/Source/cmSourceFileLocation.h
+++ b/Source/cmSourceFileLocation.h
@@ -12,7 +12,9 @@
#ifndef cmSourceFileLocation_h
#define cmSourceFileLocation_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <string>
class cmMakefile;
diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h
index 1f5232e..c5e6311 100644
--- a/Source/cmSourceGroup.h
+++ b/Source/cmSourceGroup.h
@@ -12,12 +12,14 @@
#ifndef cmSourceGroup_h
#define cmSourceGroup_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h>
#include <cmsys/RegularExpression.hxx>
+#include <set>
+#include <string>
+#include <vector>
class cmSourceFile;
-
class cmSourceGroupInternals;
/** \class cmSourceGroup
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 21a50cb..7da9975 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -12,20 +12,7 @@
#include "cmSystemTools.h"
#include "cmAlgorithms.h"
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#ifdef __QNX__
-#include <malloc.h> /* for malloc/free on QNX */
-#endif
-#include <cmsys/Directory.hxx>
-#include <cmsys/Encoding.hxx>
-#include <cmsys/Glob.hxx>
-#include <cmsys/RegularExpression.hxx>
-#include <cmsys/System.h>
+
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmArchiveWrite.h"
#include "cmLocale.h"
@@ -34,8 +21,38 @@
#define __LA_INT64_T la_int64_t
#endif
#endif
+
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+#include "cmCryptoHash.h"
+#endif
+
+#if defined(CMAKE_USE_ELF_PARSER)
+#include "cmELF.h"
+#endif
+
+#if defined(CMAKE_USE_MACH_PARSER)
+#include "cmMachO.h"
+#endif
+
+#include <algorithm>
+#include <assert.h>
+#include <cmsys/Directory.hxx>
+#include <cmsys/Encoding.hxx>
#include <cmsys/FStream.hxx>
+#include <cmsys/RegularExpression.hxx>
+#include <cmsys/System.h>
+#include <cmsys/SystemTools.hxx>
#include <cmsys/Terminal.h>
+#include <ctype.h>
+#include <errno.h>
+#include <iostream>
+#include <set>
+#include <sstream>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <time.h>
#if defined(_WIN32)
#include <windows.h>
@@ -43,33 +60,21 @@
#include <wincrypt.h>
#else
#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/wait.h>
#include <unistd.h>
#include <utime.h>
#endif
-#if defined(__APPLE__)
-#include <mach-o/dyld.h>
-#endif
-
-#include <sys/stat.h>
-
#if defined(_WIN32) && \
(defined(_MSC_VER) || defined(__WATCOMC__) || defined(__MINGW32__))
#include <io.h>
#endif
-#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmCryptoHash.h"
-#endif
-
-#if defined(CMAKE_USE_ELF_PARSER)
-#include "cmELF.h"
+#if defined(__APPLE__)
+#include <mach-o/dyld.h>
#endif
-#if defined(CMAKE_USE_MACH_PARSER)
-#include "cmMachO.h"
+#ifdef __QNX__
+#include <malloc.h> /* for malloc/free on QNX */
#endif
static bool cm_isspace(char c)
@@ -142,6 +147,7 @@ private:
};
#elif defined(__APPLE__)
#include <crt_externs.h>
+
#define environ (*_NSGetEnviron())
#endif
@@ -1478,7 +1484,7 @@ void list_item_verbose(FILE* out, struct archive_entry* entry)
/* Format the time using 'ls -l' conventions. */
tim = archive_entry_mtime(entry);
-#define HALF_YEAR (time_t)365 * 86400 / 2
+#define HALF_YEAR ((time_t)365 * 86400 / 2)
#if defined(_WIN32) && !defined(__CYGWIN__)
/* Windows' strftime function does not support %e format. */
#define DAY_FMT "%d"
diff --git a/Source/cmTargetDepend.h b/Source/cmTargetDepend.h
index 954d8f6..f30705d 100644
--- a/Source/cmTargetDepend.h
+++ b/Source/cmTargetDepend.h
@@ -12,6 +12,8 @@
#ifndef cmTargetDepend_h
#define cmTargetDepend_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
class cmGeneratorTarget;
diff --git a/Source/cmTargetExport.h b/Source/cmTargetExport.h
index 2781337..b3882c4 100644
--- a/Source/cmTargetExport.h
+++ b/Source/cmTargetExport.h
@@ -12,6 +12,8 @@
#ifndef cmTargetExport_h
#define cmTargetExport_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
class cmGeneratorTarget;
diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx
index cfc174e..090c9d6 100644
--- a/Source/cmTestGenerator.cxx
+++ b/Source/cmTestGenerator.cxx
@@ -20,6 +20,7 @@
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmTest.h"
+#include "cm_auto_ptr.hxx"
#include <map>
#include <ostream>
diff --git a/Source/cmTimestamp.h b/Source/cmTimestamp.h
index 77e1f7a..3a72caa 100644
--- a/Source/cmTimestamp.h
+++ b/Source/cmTimestamp.h
@@ -12,6 +12,8 @@
#ifndef cmTimestamp_h
#define cmTimestamp_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
#include <string>
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index 109a100..72a70df 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -12,6 +12,8 @@
#ifndef cmVisualStudioTargetGenerator_h
#define cmVisualStudioTargetGenerator_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
class cmMakefile;
diff --git a/Source/cmVisualStudioSlnData.h b/Source/cmVisualStudioSlnData.h
index 4508370..982b976 100644
--- a/Source/cmVisualStudioSlnData.h
+++ b/Source/cmVisualStudioSlnData.h
@@ -12,6 +12,8 @@
#ifndef cmVisualStudioSlnData_h
#define cmVisualStudioSlnData_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
class cmSlnProjectEntry
diff --git a/Source/cmVisualStudioSlnParser.h b/Source/cmVisualStudioSlnParser.h
index b9f8a92..62fd936 100644
--- a/Source/cmVisualStudioSlnParser.h
+++ b/Source/cmVisualStudioSlnParser.h
@@ -12,6 +12,8 @@
#ifndef cmVisualStudioSlnParser_h
#define cmVisualStudioSlnParser_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
#include <bitset>
diff --git a/Source/cmVisualStudioWCEPlatformParser.h b/Source/cmVisualStudioWCEPlatformParser.h
index 2b20eba..ca58a9a 100644
--- a/Source/cmVisualStudioWCEPlatformParser.h
+++ b/Source/cmVisualStudioWCEPlatformParser.h
@@ -12,6 +12,8 @@
#ifndef cmVisualStudioWCEPlatformParser_h
#define cmVisualStudioWCEPlatformParser_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
#include "cmXMLParser.h"
diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h
index ed917af..a0aa2b7 100644
--- a/Source/cmXCodeObject.h
+++ b/Source/cmXCodeObject.h
@@ -12,6 +12,8 @@
#ifndef cmXCodeObject_h
#define cmXCodeObject_h
+#include <cmConfigure.h>
+
#include "cmStandardIncludes.h"
class cmGeneratorTarget;
diff --git a/Source/cmXMLParser.cxx b/Source/cmXMLParser.cxx
index 7c53a3d..9878912 100644
--- a/Source/cmXMLParser.cxx
+++ b/Source/cmXMLParser.cxx
@@ -20,10 +20,10 @@
cmXMLParser::cmXMLParser()
{
- this->Parser = 0;
+ this->Parser = CM_NULLPTR;
this->ParseError = 0;
- this->ReportCallback = 0;
- this->ReportCallbackData = 0;
+ this->ReportCallback = CM_NULLPTR;
+ this->ReportCallbackData = CM_NULLPTR;
}
cmXMLParser::~cmXMLParser()
@@ -64,7 +64,7 @@ int cmXMLParser::InitializeParser()
}
// Create the expat XML parser.
- this->Parser = XML_ParserCreate(0);
+ this->Parser = XML_ParserCreate(CM_NULLPTR);
XML_SetElementHandler(static_cast<XML_Parser>(this->Parser),
&cmXMLParserStartElement, &cmXMLParserEndElement);
XML_SetCharacterDataHandler(static_cast<XML_Parser>(this->Parser),
@@ -108,7 +108,7 @@ int cmXMLParser::CleanupParser()
// Clean up the parser.
XML_ParserFree(static_cast<XML_Parser>(this->Parser));
- this->Parser = 0;
+ this->Parser = CM_NULLPTR;
return result;
}
@@ -165,7 +165,7 @@ const char* cmXMLParser::FindAttribute(const char** atts,
}
}
}
- return 0;
+ return CM_NULLPTR;
}
void cmXMLParserStartElement(void* parser, const char* name, const char** atts)
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 701a5e5..25f9e3a 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -12,33 +12,33 @@
#include "cmake.h"
#include "cmAlgorithms.h"
-#include "cmCommand.h"
#include "cmCommands.h"
+#include "cmDocumentation.h"
+#include "cmDocumentationEntry.h"
#include "cmDocumentationFormatter.h"
#include "cmExternalMakefileProjectGenerator.h"
#include "cmFileTimeComparison.h"
+#include "cmGeneratorTarget.h"
+#include "cmGlobalGenerator.h"
+#include "cmGlobalGeneratorFactory.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmMessenger.h"
-#include "cmSourceFile.h"
#include "cmState.h"
-#include "cmTest.h"
+#include "cmSystemTools.h"
+#include "cmTarget.h"
+#include "cmTargetLinkLibraryType.h"
#include "cmUtils.hxx"
-#include "cmVersionMacros.h"
+#include "cmVersionConfig.h"
+#include "cm_auto_ptr.hxx"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmGraphVizWriter.h"
#include "cmVariableWatch.h"
-#include <cmsys/SystemInformation.hxx>
-
-#include "cm_jsoncpp_value.h"
-#include "cm_jsoncpp_writer.h"
+#include <cm_jsoncpp_value.h>
+#include <cm_jsoncpp_writer.h>
#endif
-#include <cmsys/FStream.hxx>
-#include <cmsys/Glob.hxx>
-#include <cmsys/RegularExpression.hxx>
-
// only build kdevelop generator on non-windows platforms
// when not bootstrapping cmake
#if !defined(_WIN32)
@@ -69,6 +69,7 @@
#include "cmGlobalVisualStudio71Generator.h"
#include "cmGlobalVisualStudio8Generator.h"
#include "cmGlobalVisualStudio9Generator.h"
+
#define CMAKE_HAVE_VS_GENERATORS
#endif
#include "cmGlobalMSYSMakefileGenerator.h"
@@ -98,11 +99,10 @@
#include "cmExtraEclipseCDT4Generator.h"
#endif
-#include <stdlib.h> // required for atoi
-
#if defined(__APPLE__)
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmGlobalXCodeGenerator.h"
+
#define CMAKE_USE_XCODE 1
#endif
#include <sys/resource.h>
@@ -113,7 +113,18 @@
// include sys/stat.h after sys/types.h
#include <sys/stat.h> // struct stat
-#include <list>
+#include <algorithm>
+#include <cmsys/FStream.hxx>
+#include <cmsys/Glob.hxx>
+#include <cmsys/RegularExpression.hxx>
+#include <iostream>
+#include <sstream>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <utility>
+
+class cmCommand;
namespace {
diff --git a/Source/cmake.h b/Source/cmake.h
index dbe936b..9dc429d 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -13,25 +13,25 @@
#ifndef cmake_h
#define cmake_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h>
-#include "cmCacheManager.h"
#include "cmInstalledFile.h"
#include "cmListFileCache.h"
#include "cmState.h"
-#include "cmSystemTools.h"
-class cmGlobalGeneratorFactory;
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+
+class cmExternalMakefileProjectGeneratorFactory;
+class cmFileTimeComparison;
class cmGlobalGenerator;
-class cmLocalGenerator;
+class cmGlobalGeneratorFactory;
class cmMakefile;
class cmMessenger;
class cmVariableWatch;
-class cmFileTimeComparison;
-class cmExternalMakefileProjectGeneratorFactory;
-class cmDocumentationSection;
-class cmTarget;
-class cmGeneratedFileStream;
+struct cmDocumentationEntry;
/** \brief Represents a cmake invocation.
*
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index db6d51b..1450949 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -17,18 +17,23 @@
#endif
#include "cmAlgorithms.h"
+#include "cmDocumentationEntry.h"
#include "cmGlobalGenerator.h"
-#include "cmListFileCache.h"
-#include "cmLocalGenerator.h"
#include "cmMakefile.h"
-#include "cmSourceFile.h"
#include "cmState.h"
+#include "cmSystemTools.h"
#include "cmake.h"
#include "cmcmd.h"
+
+#include <cmConfigure.h>
#include <cmsys/Encoding.hxx>
+#include <iostream>
+#include <string.h>
+#include <string>
+#include <vector>
#ifdef CMAKE_USE_LIBUV
-#include "cm_uv.h"
+#include <cm_uv.h>
#endif
#ifdef CMAKE_BUILD_WITH_CMAKE
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index f25c085..c2e1d53 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -16,29 +16,37 @@
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmQtAutoGenerators.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
#include "cmUtils.hxx"
#include "cmVersion.h"
+#include "cm_auto_ptr.hxx"
+#include "cmake.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmDependsFortran.h" // For -E cmake_copy_f90_mod callback.
#endif
-#include <cmsys/Directory.hxx>
-#include <cmsys/FStream.hxx>
-#include <cmsys/Process.h>
-#include <cmsys/Terminal.h>
+#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(_WIN32)
+#include "bindexplib.h"
+#endif
#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(_WIN32) && !defined(__CYGWIN__)
#include "cmVisualStudioWCEPlatformParser.h"
#endif
+#include <algorithm>
+#include <cmConfigure.h>
+#include <cmsys/Directory.hxx>
+#include <cmsys/FStream.hxx>
+#include <cmsys/Process.h>
+#include <cmsys/Terminal.h>
+#include <iostream>
+#include <sstream>
+#include <stdio.h>
+#include <stdlib.h>
#include <time.h>
-#include <stdlib.h> // required for atoi
-#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE)
-#include "bindexplib.h"
-#endif
-
void CMakeCommandUsage(const char* program)
{
std::ostringstream errorStream;
diff --git a/Source/cmcmd.h b/Source/cmcmd.h
index 8da2103..cd6222d 100644
--- a/Source/cmcmd.h
+++ b/Source/cmcmd.h
@@ -13,7 +13,10 @@
#ifndef cmcmd_h
#define cmcmd_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <string>
+#include <vector>
class cmcmd
{
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index 38ff64f..93a6ebb 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -9,16 +9,21 @@
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
-#include "cmCTest.h"
-#include "cmSystemTools.h"
-// Need these for documentation support.
-#include "cmDocumentation.h"
-#include "cmake.h"
+#include <cmConfigure.h>
#include "CTest/cmCTestLaunch.h"
#include "CTest/cmCTestScriptHandler.h"
-#include "cmsys/Encoding.hxx"
+#include "cmCTest.h"
+#include "cmDocumentation.h"
+#include "cmSystemTools.h"
+#include "cmake.h"
+
+#include <cmsys/Encoding.hxx>
+#include <iostream>
+#include <string.h>
+#include <string>
+#include <vector>
static const char* cmDocumentationName[][2] = {
{ CM_NULLPTR, " ctest - Testing driver provided by CMake." },
diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx
index 502ffe7..0bf0a7c 100644
--- a/Tests/CMakeLib/run_compile_commands.cxx
+++ b/Tests/CMakeLib/run_compile_commands.cxx
@@ -1,6 +1,6 @@
#include "cmSystemTools.h"
-#include <fstream>
+#include <cmsys/FStream.hxx>
#include <iostream>
#include <map>
#include <stdlib.h>
@@ -26,7 +26,10 @@ public:
};
typedef std::vector<CommandType> TranslationUnitsType;
- CompileCommandParser(std::ifstream* input) { this->Input = input; }
+ CompileCommandParser(std::istream& input)
+ : Input(input)
+ {
+ }
void Parse()
{
@@ -109,8 +112,8 @@ private:
void Next()
{
- this->C = char(Input->get());
- if (this->Input->bad()) {
+ this->C = char(Input.get());
+ if (this->Input.bad()) {
ErrorExit("Unexpected end of file.");
}
}
@@ -131,13 +134,13 @@ private:
TranslationUnitsType TranslationUnits;
CommandType Command;
std::string String;
- std::ifstream* Input;
+ std::istream& Input;
};
int main()
{
- std::ifstream file("compile_commands.json");
- CompileCommandParser parser(&file);
+ cmsys::ifstream file("compile_commands.json");
+ CompileCommandParser parser(file);
parser.Parse();
for (CompileCommandParser::TranslationUnitsType::const_iterator
it = parser.GetTranslationUnits().begin(),
@@ -145,7 +148,8 @@ int main()
it != end; ++it) {
std::vector<std::string> command;
cmSystemTools::ParseUnixCommandLine(it->at("command").c_str(), command);
- if (!cmSystemTools::RunSingleCommand(command, 0, 0, 0,
+ if (!cmSystemTools::RunSingleCommand(command, CM_NULLPTR, CM_NULLPTR,
+ CM_NULLPTR,
it->at("directory").c_str())) {
std::cout << "ERROR: Failed to run command \"" << command[0] << "\""
<< std::endl;
diff --git a/Tests/CMakeLib/testGeneratedFileStream.cxx b/Tests/CMakeLib/testGeneratedFileStream.cxx
index e5a2f4d..b419b9e 100644
--- a/Tests/CMakeLib/testGeneratedFileStream.cxx
+++ b/Tests/CMakeLib/testGeneratedFileStream.cxx
@@ -12,8 +12,11 @@
#include "cmGeneratedFileStream.h"
#include "cmSystemTools.h"
+#include <iostream>
+#include <string>
+
#define cmFailed(m1, m2) \
- std::cout << "FAILED: " << m1 << m2 << "\n"; \
+ std::cout << "FAILED: " << (m1) << (m2) << "\n"; \
failed = 1
int testGeneratedFileStream(int /*unused*/, char* /*unused*/ [])
diff --git a/Tests/CMakeLib/testRST.cxx b/Tests/CMakeLib/testRST.cxx
index e5a96c2..cc92693 100644
--- a/Tests/CMakeLib/testRST.cxx
+++ b/Tests/CMakeLib/testRST.cxx
@@ -10,9 +10,12 @@
See the License for more information.
============================================================================*/
#include "cmRST.h"
-
#include "cmSystemTools.h"
+#include <cmsys/FStream.hxx>
+#include <iostream>
+#include <string>
+
void reportLine(std::ostream& os, bool ret, std::string const& line, bool eol)
{
if (ret) {
@@ -52,8 +55,8 @@ int testRST(int argc, char* argv[])
}
// Compare expected and actual outputs.
- std::ifstream e_fin(e_name.c_str());
- std::ifstream a_fin(a_name.c_str());
+ cmsys::ifstream e_fin(e_name.c_str());
+ cmsys::ifstream a_fin(a_name.c_str());
if (!e_fin) {
std::cerr << "Could not open input " << e_name << std::endl;
return 1;
diff --git a/Tests/CMakeLib/testSystemTools.cxx b/Tests/CMakeLib/testSystemTools.cxx
index 8e8d4c4..e834b93 100644
--- a/Tests/CMakeLib/testSystemTools.cxx
+++ b/Tests/CMakeLib/testSystemTools.cxx
@@ -14,9 +14,9 @@
#include <iostream>
#include <string>
-#define cmPassed(m) std::cout << "Passed: " << m << "\n"
+#define cmPassed(m) std::cout << "Passed: " << (m) << "\n"
#define cmFailed(m) \
- std::cout << "FAILED: " << m << "\n"; \
+ std::cout << "FAILED: " << (m) << "\n"; \
failed = 1
int testSystemTools(int /*unused*/, char* /*unused*/ [])
diff --git a/Tests/CMakeLib/testUTF8.cxx b/Tests/CMakeLib/testUTF8.cxx
index 019a2dd..c99a925 100644
--- a/Tests/CMakeLib/testUTF8.cxx
+++ b/Tests/CMakeLib/testUTF8.cxx
@@ -10,9 +10,7 @@
See the License for more information.
============================================================================*/
#include <cm_utf8.h>
-
#include <stdio.h>
-#include <string.h>
typedef char test_utf8_char[5];
diff --git a/Tests/CMakeLib/testXMLSafe.cxx b/Tests/CMakeLib/testXMLSafe.cxx
index 4970ccc..c4aaf17 100644
--- a/Tests/CMakeLib/testXMLSafe.cxx
+++ b/Tests/CMakeLib/testXMLSafe.cxx
@@ -9,9 +9,11 @@
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
-#include <cmXMLSafe.h>
+#include "cmXMLSafe.h"
-#include "cmStandardIncludes.h"
+#include <sstream>
+#include <stdio.h>
+#include <string>
struct test_pair
{
@@ -25,7 +27,7 @@ static test_pair const pairs[] = {
{ "angles <>", "angles &lt;&gt;" },
{ "ampersand &", "ampersand &amp;" },
{ "bad-byte \x80", "bad-byte [NON-UTF-8-BYTE-0x80]" },
- { 0, 0 }
+ { CM_NULLPTR, CM_NULLPTR }
};
int testXMLSafe(int /*unused*/, char* /*unused*/ [])
diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake
new file mode 100644
index 0000000..dd72cf7
--- /dev/null
+++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake
@@ -0,0 +1,5 @@
+set(whitespaces_ "[\t\n\r ]*")
+
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_1 "long_filenames_0.1.1-1_*.deb")
+set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/foo/${whitespaces_}.*/usr/foo/llllllllll_oooooooooo_nnnnnnnnnn_gggggggggg_ffffffffff_iiiiiiiiii_llllllllll_eeeeeeeeee_nnnnnnnnnn_aaaaaaaaaa_mmmmmmmmmm_eeeeeeeeee.txt$")
diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-Prerequirements.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-Prerequirements.cmake
new file mode 100644
index 0000000..0c1d77e
--- /dev/null
+++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-Prerequirements.cmake
@@ -0,0 +1,7 @@
+function(get_test_prerequirements found_var)
+ find_program(FAKEROOT_EXECUTABLE NAMES fakeroot)
+
+ if(FAKEROOT_EXECUTABLE)
+ set(${found_var} true PARENT_SCOPE)
+ endif()
+endfunction()
diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake
new file mode 100644
index 0000000..0452343
--- /dev/null
+++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake
@@ -0,0 +1,26 @@
+# create structure required by non root dpkg install
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/updates")
+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/info")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/available" "")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/status" "")
+
+# some programs used by fakeroot require sbin in path so we should not
+# leave this to chance (programs: ldconfig and start-stop-daemon)
+set(ENV{PATH} "$ENV{PATH}:/usr/local/sbin:/usr/sbin:/sbin")
+
+execute_process(COMMAND ${FAKEROOT_EXECUTABLE} ${DPKG_EXECUTABLE}
+ -i --force-not-root --root=${CMAKE_CURRENT_BINARY_DIR}/root_dir
+ --admindir=${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir
+ --log=${CMAKE_CURRENT_BINARY_DIR}/root_dir/dpkg.log
+ ${FOUND_FILE_1}
+ RESULT_VARIABLE install_result_
+ ERROR_VARIABLE install_error_
+ OUTPUT_QUIET
+ )
+
+if(install_result_)
+ message(FATAL_ERROR "LONG_FILENAMES package error - result:"
+ " '${install_result_}'; text: '${install_error_}'")
+endif()
diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake
new file mode 100644
index 0000000..39a6be4
--- /dev/null
+++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake
@@ -0,0 +1,3 @@
+set(CPACK_PACKAGE_CONTACT "someone")
+set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
+set(CPACK_DEBIAN_ARCHIVE_TYPE "gnutar")
diff --git a/Tests/RunCMake/CPack/DEB/Prerequirements.cmake b/Tests/RunCMake/CPack/DEB/Prerequirements.cmake
index 197b99d..cb9a277 100644
--- a/Tests/RunCMake/CPack/DEB/Prerequirements.cmake
+++ b/Tests/RunCMake/CPack/DEB/Prerequirements.cmake
@@ -5,4 +5,11 @@ function(get_test_prerequirements found_var config_file)
file(WRITE "${config_file}" "set(DPKG_EXECUTABLE \"${DPKG_EXECUTABLE}\")")
set(${found_var} true PARENT_SCOPE)
endif()
+
+ # optional tool for some tests
+ find_program(FAKEROOT_EXECUTABLE fakeroot)
+ if(FAKEROOT_EXECUTABLE)
+ file(APPEND "${config_file}"
+ "\nset(FAKEROOT_EXECUTABLE \"${FAKEROOT_EXECUTABLE}\")")
+ endif()
endfunction()
diff --git a/Tests/RunCMake/CPack/LONG_FILENAMES.cmake b/Tests/RunCMake/CPack/LONG_FILENAMES.cmake
new file mode 100644
index 0000000..3242aef
--- /dev/null
+++ b/Tests/RunCMake/CPack/LONG_FILENAMES.cmake
@@ -0,0 +1,10 @@
+set(LONG_FILENAME
+ "${CMAKE_CURRENT_BINARY_DIR}/llllllllll_oooooooooo_nnnnnnnnnn_gggggggggg_ffffffffff_iiiiiiiiii_llllllllll_eeeeeeeeee_nnnnnnnnnn_aaaaaaaaaa_mmmmmmmmmm_eeeeeeeeee.txt")
+
+file(WRITE
+ "${LONG_FILENAME}"
+ "long_filename_test")
+
+install(FILES ${LONG_FILENAME} DESTINATION foo)
+
+set(CPACK_PACKAGE_NAME "long_filenames")
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 44586d7..a3029cf 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -17,3 +17,4 @@ run_cpack_test(INSTALL_SCRIPTS "RPM" false)
run_cpack_test(DEB_GENERATE_SHLIBS "DEB" true)
run_cpack_test(DEB_GENERATE_SHLIBS_LDCONFIG "DEB" true)
run_cpack_test(DEBUGINFO "RPM" true)
+run_cpack_test(LONG_FILENAMES "DEB" false)
diff --git a/Utilities/cmlibuv/src/unix/pipe.c b/Utilities/cmlibuv/src/unix/pipe.c
index b73994c..80f5e6f 100644
--- a/Utilities/cmlibuv/src/unix/pipe.c
+++ b/Utilities/cmlibuv/src/unix/pipe.c
@@ -42,13 +42,10 @@ int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) {
int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
struct sockaddr_un saddr;
- const char* pipe_fname;
- int sockfd;
+ const char* pipe_fname = NULL;
+ int sockfd = -1;
int err;
- pipe_fname = NULL;
- sockfd = -1;
-
/* Already bound? */
if (uv__stream_fd(handle) >= 0)
return -EINVAL;
diff --git a/Utilities/cmlibuv/src/unix/tty.c b/Utilities/cmlibuv/src/unix/tty.c
index b2d37f4..ae1018f 100644
--- a/Utilities/cmlibuv/src/unix/tty.c
+++ b/Utilities/cmlibuv/src/unix/tty.c
@@ -58,8 +58,8 @@ static int uv__tty_is_slave(const int fd) {
int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) {
uv_handle_type type;
- int flags;
- int newfd;
+ int flags = 0;
+ int newfd = -1;
int r;
int saved_flags;
char path[256];
@@ -72,9 +72,6 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) {
if (type == UV_FILE || type == UV_UNKNOWN_HANDLE)
return -EINVAL;
- flags = 0;
- newfd = -1;
-
/* Reopen the file descriptor when it refers to a tty. This lets us put the
* tty in non-blocking mode without affecting other processes that share it
* with us.