diff options
605 files changed, 1806 insertions, 1152 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ed5de10efd..545177b6e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,6 +226,17 @@ option(CMAKE_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON) mark_as_advanced(CMAKE_USE_FOLDERS) +option(CMake_RUN_IWYU "Run include-what-you-use with the compiler." OFF) +if(CMake_RUN_IWYU) + find_program(IWYU_COMMAND NAMES include-what-you-use iwyu) + if(NOT IWYU_COMMAND) + message(FATAL_ERROR "CMake_RUN_IWYU is ON but include-what-you-use is not found!") + endif() + set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE + "${IWYU_COMMAND};-Xiwyu;--mapping_file=${CMake_SOURCE_DIR}/Utilities/IWYU/mapping.imp") +endif() + + #----------------------------------------------------------------------- # a macro that only sets the FOLDER target property if it's # "appropriate" diff --git a/Help/command/file.rst b/Help/command/file.rst index 3e669c24dc..b2e4eea444 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -304,6 +304,11 @@ Exactly one ``CONTENT`` or ``INPUT`` option must be given. A specific Generated files are modified on subsequent cmake runs only if their content is changed. +Note also that ``file(GENERATE)`` does not create the output file until the +generation phase. The output file will not yet have been written when the +``file(GENERATE)`` command returns, it is written only after processing all +of a project's ``CMakeLists.txt`` files. + ------------------------------------------------------------------------------ :: diff --git a/Help/command/project.rst b/Help/command/project.rst index 6c5ace7f1f..139f69c9b5 100644 --- a/Help/command/project.rst +++ b/Help/command/project.rst @@ -8,6 +8,7 @@ Set a name, version, and enable languages for the entire project. project(<PROJECT-NAME> [LANGUAGES] [<language-name>...]) project(<PROJECT-NAME> [VERSION <major>[.<minor>[.<patch>[.<tweak>]]]] + [DESCRIPTION <project-description-string>] [LANGUAGES <language-name>...]) Sets the name of the project and stores the name in the @@ -40,6 +41,10 @@ in variables Variables corresponding to unspecified versions are set to the empty string (if policy :policy:`CMP0048` is set to ``NEW``). +If optional ``DESCRIPTION`` is given, then additional :variable:`PROJECT_DESCRIPTION` +variable will be set to its argument. The argument must be a string with short +description of the project (only a few words). + Optionally you can specify which languages your project supports. Example languages are ``C``, ``CXX`` (i.e. C++), ``Fortran``, etc. By default ``C`` and ``CXX`` are enabled if no language options are diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index c45574f926..0a68815f9b 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -60,6 +60,7 @@ Variables that Provide Information /variable/CMAKE_MINOR_VERSION /variable/CMAKE_PARENT_LIST_FILE /variable/CMAKE_PATCH_VERSION + /variable/CMAKE_PROJECT_DESCRIPTION /variable/CMAKE_PROJECT_NAME /variable/CMAKE_RANLIB /variable/CMAKE_ROOT @@ -97,6 +98,7 @@ Variables that Provide Information /variable/PROJECT-NAME_VERSION_PATCH /variable/PROJECT-NAME_VERSION_TWEAK /variable/PROJECT_BINARY_DIR + /variable/PROJECT_DESCRIPTION /variable/PROJECT_NAME /variable/PROJECT_SOURCE_DIR /variable/PROJECT_VERSION diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index a11e2f95f4..ba925e8ecf 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -227,7 +227,7 @@ Available commands are: ``copy <file>... <destination>`` Copy files to ``<destination>`` (either file or directory). If multiple files are specified, the ``<destination>`` must be - directory and it must exist. + directory and it must exist. Wildcards are not supported. ``copy_directory <dir>... <destination>`` Copy directories to ``<destination>`` directory. @@ -263,8 +263,10 @@ Available commands are: 052f86c15bbde68af55c7f7b340ab639 file2.txt ``remove [-f] <file>...`` - Remove the file(s), use ``-f`` to force it. If a file does - not exist it will be silently ignored. + Remove the file(s). If any of the listed files already do not + exist, the command returns a non-zero exit code, but no message + is logged. The ``-f`` option changes the behavior to return a + zero exit code (i.e. success) in such situations instead. ``remove_directory <dir>`` Remove a directory and its contents. If a directory does diff --git a/Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst b/Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst index d30a2f2b64..a0811bcaa4 100644 --- a/Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst +++ b/Help/prop_tgt/CROSSCOMPILING_EMULATOR.rst @@ -5,3 +5,7 @@ Use the given emulator to run executables created when crosscompiling. This command will be added as a prefix to :command:`add_test`, :command:`add_custom_command`, and :command:`add_custom_target` commands for built target system executables. + +This property is initialized by the value of the +:variable:`CMAKE_CROSSCOMPILING_EMULATOR` variable if it is set when a target +is created. diff --git a/Help/release/dev/macos-hidpi-qt-dialog.rst b/Help/release/dev/macos-hidpi-qt-dialog.rst new file mode 100644 index 0000000000..263d405a99 --- /dev/null +++ b/Help/release/dev/macos-hidpi-qt-dialog.rst @@ -0,0 +1,5 @@ +macos-hidpi-qt-dialog +--------------------- + +* On macOS the default application bundle ``Info.plist`` file now enables + Hi-DPI support. diff --git a/Help/release/dev/project_description.rst b/Help/release/dev/project_description.rst new file mode 100644 index 0000000000..baf0045309 --- /dev/null +++ b/Help/release/dev/project_description.rst @@ -0,0 +1,5 @@ +project-description +------------------- + +* The :command:`project` command learned an optional ``DESCRIPTION`` parameter. + See :command:`project` command and :variable:`PROJECT_DESCRIPTION` variable. diff --git a/Help/variable/CMAKE_PROJECT_DESCRIPTION.rst b/Help/variable/CMAKE_PROJECT_DESCRIPTION.rst new file mode 100644 index 0000000000..f1911eced4 --- /dev/null +++ b/Help/variable/CMAKE_PROJECT_DESCRIPTION.rst @@ -0,0 +1,7 @@ +CMAKE_PROJECT_DESCRIPTION +------------------------- + +The description of the current project. + +This specifies description of the current project from the closest inherited +:command:`project` command. diff --git a/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst b/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst index e0be3a43e1..83b9bc1fdd 100644 --- a/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst +++ b/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst @@ -10,3 +10,8 @@ version. Otherwise CMake computes a default version based on the Windows SDK versions available. The chosen Windows target version number is provided in ``CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION``. If no Windows 10 SDK is available this value will be empty. + +One may set a ``CMAKE_WINDOWS_KITS_10_DIR`` *environment variable* +to an absolute path to tell CMake to look for Windows 10 SDKs in +a custom location. The specified directory is expected to contain +``Include/10.0.*`` directories. diff --git a/Help/variable/PROJECT_DESCRIPTION.rst b/Help/variable/PROJECT_DESCRIPTION.rst new file mode 100644 index 0000000000..05ede8fccd --- /dev/null +++ b/Help/variable/PROJECT_DESCRIPTION.rst @@ -0,0 +1,6 @@ +PROJECT_DESCRIPTION +------------------- + +Short project description given to the project command. + +This is the description given to the most recent :command:`project` command. diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake index 01355ff105..f7cf900fda 100644 --- a/Modules/CMakeASMInformation.cmake +++ b/Modules/CMakeASMInformation.cmake @@ -75,11 +75,13 @@ set (CMAKE_ASM${ASM_DIALECT}_FLAGS "${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}" CACHE "Flags used by the assembler during all build types.") if(NOT CMAKE_NOT_USING_CONFIG_FLAGS) -# default build type is none - if(NOT CMAKE_NO_BUILD_TYPE) + get_property(_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + # default build type is none + if(NOT _GENERATOR_IS_MULTI_CONFIG AND NOT CMAKE_NO_BUILD_TYPE) set (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING "Choose the type of build, options are: None, Debug Release RelWithDebInfo MinSizeRel.") endif() + unset(_GENERATOR_IS_MULTI_CONFIG) set (CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG "${CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG_INIT}" CACHE STRING "Flags used by the assembler during debug builds.") set (CMAKE_ASM${ASM_DIALECT}_FLAGS_MINSIZEREL "${CMAKE_ASM${ASM_DIALECT}_FLAGS_MINSIZEREL_INIT}" CACHE STRING diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index 709e316d06..71aadb474b 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -110,11 +110,13 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_INIT}" CACHE STRING "Flags used by the compiler during all build types.") if(NOT CMAKE_NOT_USING_CONFIG_FLAGS) -# default build type is none - if(NOT CMAKE_NO_BUILD_TYPE) + get_property(_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + # default build type is none + if(NOT _GENERATOR_IS_MULTI_CONFIG AND NOT CMAKE_NO_BUILD_TYPE) set (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") endif() + unset(_GENERATOR_IS_MULTI_CONFIG) set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT}" CACHE STRING "Flags used by the compiler during debug builds.") set (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL_INIT}" CACHE STRING diff --git a/Modules/CMakeCommonLanguageInclude.cmake b/Modules/CMakeCommonLanguageInclude.cmake index 418860ee71..43b5da022b 100644 --- a/Modules/CMakeCommonLanguageInclude.cmake +++ b/Modules/CMakeCommonLanguageInclude.cmake @@ -17,11 +17,13 @@ foreach(t EXE SHARED MODULE STATIC) endforeach() if(NOT CMAKE_NOT_USING_CONFIG_FLAGS) -# default build type is none - if(NOT CMAKE_NO_BUILD_TYPE) + get_property(_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + # default build type is none + if(NOT _GENERATOR_IS_MULTI_CONFIG AND NOT CMAKE_NO_BUILD_TYPE) set (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") endif() + unset(_GENERATOR_IS_MULTI_CONFIG) set (CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING "Flags used by the linker during debug builds.") diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake index 7ddd2978b2..a340288672 100644 --- a/Modules/CMakeRCInformation.cmake +++ b/Modules/CMakeRCInformation.cmake @@ -53,6 +53,10 @@ endif() mark_as_advanced( CMAKE_RC_FLAGS +CMAKE_RC_FLAGS_DEBUG +CMAKE_RC_FLAGS_MINSIZEREL +CMAKE_RC_FLAGS_RELEASE +CMAKE_RC_FLAGS_RELWITHDEBINFO ) # set this variable so we can avoid loading this more than once. set(CMAKE_RC_INFORMATION_LOADED 1) diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index 4e7546b981..a63fc8325d 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -98,7 +98,12 @@ # # .. variable:: CPACK_PACKAGE_DESCRIPTION_SUMMARY # -# Short description of the project (only a few words). +# Short description of the project (only a few words). Default value is:: +# +# ${PROJECT_DESCRIPTION} +# +# if DESCRIPTION has given to the project() call or +# CMake generated string with PROJECT_NAME otherwise. # # .. variable:: CPACK_PACKAGE_FILE_NAME # @@ -360,8 +365,13 @@ _cpack_set_default(CPACK_PACKAGE_VERSION_PATCH "1") _cpack_set_default(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") _cpack_set_default(CPACK_PACKAGE_VENDOR "Humanity") -_cpack_set_default(CPACK_PACKAGE_DESCRIPTION_SUMMARY - "${CMAKE_PROJECT_NAME} built using CMake") +if(CMAKE_PROJECT_DESCRIPTION) + _cpack_set_default(CPACK_PACKAGE_DESCRIPTION_SUMMARY + "${CMAKE_PROJECT_DESCRIPTION}") +else() + _cpack_set_default(CPACK_PACKAGE_DESCRIPTION_SUMMARY + "${CMAKE_PROJECT_NAME} built using CMake") +endif() _cpack_set_default(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt") diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake index 8fecc57da3..6f1afcfda3 100644 --- a/Modules/CheckSymbolExists.cmake +++ b/Modules/CheckSymbolExists.cmake @@ -1,38 +1,47 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -#.rst: -# CheckSymbolExists -# ----------------- -# -# Check if a symbol exists as a function, variable, or macro -# -# CHECK_SYMBOL_EXISTS(<symbol> <files> <variable>) -# -# Check that the <symbol> is available after including given header -# <files> and store the result in a <variable>. Specify the list of -# files in one argument as a semicolon-separated list. -# <variable> will be created as an internal cache variable. -# -# If the header files define the symbol as a macro it is considered -# available and assumed to work. If the header files declare the symbol -# as a function or variable then the symbol must also be available for -# linking. If the symbol is a type or enum value it will not be -# recognized (consider using CheckTypeSize or CheckCSourceCompiles). If -# the check needs to be done in C++, consider using -# CHECK_CXX_SYMBOL_EXISTS(), which does the same as -# CHECK_SYMBOL_EXISTS(), but in C++. -# -# The following variables may be set before calling this macro to modify -# the way the check is run: -# -# :: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories -# CMAKE_REQUIRED_LIBRARIES = list of libraries to link -# CMAKE_REQUIRED_QUIET = execute quietly without messages +#[=======================================================================[.rst: +CheckSymbolExists +----------------- + +Provides a macro to check if a symbol exists as a function, variable, +or macro in ``C``. + +.. command:: check_symbol_exists + + :: + + check_symbol_exists(<symbol> <files> <variable>) + + Check that the ``<symbol>`` is available after including given header + ``<files>`` and store the result in a ``<variable>``. Specify the list + of files in one argument as a semicolon-separated list. + ``<variable>`` will be created as an internal cache variable. + +If the header files define the symbol as a macro it is considered +available and assumed to work. If the header files declare the symbol +as a function or variable then the symbol must also be available for +linking (so intrinsics may not be detected). +If the symbol is a type, enum value, or intrinsic it will not be recognized +(consider using :module:`CheckTypeSize` or :module:`CheckCSourceCompiles`). +If the check needs to be done in C++, consider using +:module:`CheckCXXSymbolExists` instead. + +The following variables may be set before calling this macro to modify +the way the check is run: + +``CMAKE_REQUIRED_FLAGS`` + string of compile command line flags +``CMAKE_REQUIRED_DEFINITIONS`` + list of macros to define (-DFOO=bar) +``CMAKE_REQUIRED_INCLUDES`` + list of include directories +``CMAKE_REQUIRED_LIBRARIES`` + list of libraries to link +``CMAKE_REQUIRED_QUIET`` + execute quietly without messages +#]=======================================================================] macro(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE) if(CMAKE_C_COMPILER_LOADED) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 1d757208cd..c3cf341191 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1544,7 +1544,7 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} ) endforeach() - set(_boost_RELEASE_NAMES + list(APPEND _boost_RELEASE_NAMES ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} ) diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake index f255246123..64b98a8791 100644 --- a/Modules/FindPythonInterp.cmake +++ b/Modules/FindPythonInterp.cmake @@ -91,12 +91,15 @@ unset(_PYTHON3_VERSIONS) if(NOT PYTHON_EXECUTABLE) foreach(_CURRENT_VERSION IN LISTS _Python_VERSIONS) set(_Python_NAMES python${_CURRENT_VERSION}) - if(WIN32) + if(CMAKE_HOST_WIN32) list(APPEND _Python_NAMES python) endif() find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES} - PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath] + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-32\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}-64\\InstallPath] ) endforeach() endif() diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index d30d35fa7d..bc906e59a5 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -423,7 +423,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") list(APPEND wxWidgets_LIBRARIES opengl32 glu32) endif() - list(APPEND wxWidgets_LIBRARIES winmm comctl32 rpcrt4 wsock32) + list(APPEND wxWidgets_LIBRARIES winmm comctl32 oleacc rpcrt4 shlwapi version wsock32) endmacro() #------------------------------------------------------------------- diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index a3478a387f..6d33fc6ecd 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -31,6 +31,11 @@ # app-local deployment (e.g. to Windows XP). This is meaningful # only with MSVC from Visual Studio 2015 or higher. # +# One may set a ``CMAKE_WINDOWS_KITS_10_DIR`` *environment variable* +# to an absolute path to tell CMake to look for Windows 10 SDKs in +# a custom location. The specified directory is expected to contain +# ``Redist/ucrt/DLLs/*`` directories. +# # ``CMAKE_INSTALL_MFC_LIBRARIES`` # Set to TRUE to install the MSVC MFC runtime libraries. # @@ -258,6 +263,7 @@ if(MSVC) set(programfilesx86 "ProgramFiles(x86)") find_path(WINDOWS_KITS_DIR NAMES Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll PATHS + $ENV{CMAKE_WINDOWS_KITS_10_DIR} "${windows_kits_dir}" "$ENV{ProgramFiles}/Windows Kits/10" "$ENV{${programfilesx86}}/Windows Kits/10" diff --git a/Modules/MacOSXBundleInfo.plist.in b/Modules/MacOSXBundleInfo.plist.in index a4009bce32..e06b17ecf1 100644 --- a/Modules/MacOSXBundleInfo.plist.in +++ b/Modules/MacOSXBundleInfo.plist.in @@ -30,5 +30,9 @@ <true/> <key>NSHumanReadableCopyright</key> <string>${MACOSX_BUNDLE_COPYRIGHT}</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> + <key>NSHighResolutionCapable</key> + <string>True</string> </dict> </plist> diff --git a/Packaging/QtSDK/ToolsCMakeXX.cmake b/Packaging/QtSDK/ToolsCMakeXX.cmake index c5f8f349c4..99731fb5dc 100644 --- a/Packaging/QtSDK/ToolsCMakeXX.cmake +++ b/Packaging/QtSDK/ToolsCMakeXX.cmake @@ -13,7 +13,7 @@ set(CMake_IFW_ROOT_COMPONENT_NAME "qt.tools.cmake.${CMake_VERSION_MAJOR}${CMake_VERSION_MINOR}" CACHE STRING "QtSDK CMake tools component name") set(CMake_IFW_ROOT_COMPONENT_DISPLAY_NAME - "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" + "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}" CACHE STRING "QtSDK CMake tools component display name") set(CMake_IFW_ROOT_COMPONENT_DESCRIPTION "CMake Build Tools ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATH}" diff --git a/Packaging/QtSDK/qt.tools.cmake.xx.qs.in b/Packaging/QtSDK/qt.tools.cmake.xx.qs.in index 81ce157a10..e806dd7ec8 100644 --- a/Packaging/QtSDK/qt.tools.cmake.xx.qs.in +++ b/Packaging/QtSDK/qt.tools.cmake.xx.qs.in @@ -25,24 +25,22 @@ Component.prototype.createOperations = function() { component.createOperations(); - if (installer.value("os") == "win") { - try { - if (installer.value("SDKToolBinary") == "") - return; + try { + if (installer.value("SDKToolBinary") == "") + return; - var cmId = component.name; - installer.setValue("CMAKE%CMake_VERSION_MAJOR%%CMake_VERSION_MINOR%_ID", cmId); + var cmId = component.name; + installer.setValue("CMAKE%CMake_VERSION_MAJOR%%CMake_VERSION_MINOR%_ID", cmId); - component.addOperation("Execute", - ["{0,2}", "@SDKToolBinary@", "addCMake", - "--id", cmId, - "--name", "%CMake_IFW_ROOT_COMPONENT_DISPLAY_NAME%", - "--path", "@CMAKE%CMake_VERSION_MAJOR%%CMake_VERSION_MINOR%_BIN_DIR@/cmake.exe", - "UNDOEXECUTE", - "@SDKToolBinary@", "rmCMake", "--id", cmId]); + component.addOperation("Execute", + ["{0,2}", "@SDKToolBinary@", "addCMake", + "--id", cmId, + "--name", "%CMake_IFW_ROOT_COMPONENT_DISPLAY_NAME%", + "--path", "@CMAKE%CMake_VERSION_MAJOR%%CMake_VERSION_MINOR%_BIN_DIR@/cmake%CMAKE_EXECUTABLE_SUFFIX%", + "UNDOEXECUTE", + "@SDKToolBinary@", "rmCMake", "--id", cmId]); - } catch( e ) { - print( e ); - } + } catch( e ) { + print( e ); } } diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 59920f8b6c..8d683cb3fa 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -889,6 +889,12 @@ add_library(CTestLib ${CTEST_SRCS}) target_link_libraries(CTestLib CMakeLib ${CMAKE_CURL_LIBRARIES} ${CMAKE_XMLRPC_LIBRARIES}) # +# CPack +# +include_directories( + "${CMake_SOURCE_DIR}/Source/CPack" + ) +# # Sources for CPack # set(CPACK_SRCS diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 66cbd7a8db..5998240664 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 8) -set(CMake_VERSION_PATCH 20170407) +set(CMake_VERSION_PATCH 20170418) #set(CMake_VERSION_RC 1) diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx index ee46d869c2..fa8982f11e 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx +++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx @@ -2,12 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackIFWGenerator.h" -#include "CPack/cmCPackComponentGroup.h" -#include "CPack/cmCPackGenerator.h" -#include "CPack/cmCPackLog.h" +#include "cmCPackComponentGroup.h" +#include "cmCPackGenerator.h" #include "cmCPackIFWInstaller.h" #include "cmCPackIFWPackage.h" #include "cmCPackIFWRepository.h" +#include "cmCPackLog.h" #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" #include "cmTimestamp.h" diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h index d656063525..688db4b911 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.h +++ b/Source/CPack/IFW/cmCPackIFWGenerator.h @@ -3,10 +3,10 @@ #ifndef cmCPackIFWGenerator_h #define cmCPackIFWGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" -#include "CPack/cmCPackComponentGroup.h" -#include "CPack/cmCPackGenerator.h" +#include "cmCPackComponentGroup.h" +#include "cmCPackGenerator.h" #include "cmCPackIFWInstaller.h" #include "cmCPackIFWPackage.h" #include "cmCPackIFWRepository.h" diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx index d8bafeec6d..3aebbc8d94 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx +++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx @@ -2,16 +2,16 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackIFWInstaller.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <sstream> #include <stddef.h> #include <utility> -#include "CPack/cmCPackGenerator.h" -#include "CPack/cmCPackLog.h" +#include "cmCPackGenerator.h" #include "cmCPackIFWGenerator.h" #include "cmCPackIFWPackage.h" #include "cmCPackIFWRepository.h" +#include "cmCPackLog.h" #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" #include "cmXMLParser.h" diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h index 4ec3e70138..64239cf3b1 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.h +++ b/Source/CPack/IFW/cmCPackIFWInstaller.h @@ -3,7 +3,7 @@ #ifndef cmCPackIFWInstaller_h #define cmCPackIFWInstaller_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <map> #include <string> diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx index e23b1b9910..2a95ba88cd 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.cxx +++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx @@ -2,17 +2,17 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackIFWPackage.h" -#include "CPack/cmCPackComponentGroup.h" -#include "CPack/cmCPackGenerator.h" -#include "CPack/cmCPackLog.h" +#include "cmCPackComponentGroup.h" +#include "cmCPackGenerator.h" #include "cmCPackIFWGenerator.h" #include "cmCPackIFWInstaller.h" +#include "cmCPackLog.h" #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" #include "cmTimestamp.h" #include "cmXMLWriter.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <map> #include <sstream> #include <stddef.h> diff --git a/Source/CPack/IFW/cmCPackIFWPackage.h b/Source/CPack/IFW/cmCPackIFWPackage.h index bd1d6c59c9..025a03e31a 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.h +++ b/Source/CPack/IFW/cmCPackIFWPackage.h @@ -3,7 +3,7 @@ #ifndef cmCPackIFWPackage_h #define cmCPackIFWPackage_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <set> #include <string> diff --git a/Source/CPack/IFW/cmCPackIFWRepository.cxx b/Source/CPack/IFW/cmCPackIFWRepository.cxx index cc204e8288..8ce375ebd1 100644 --- a/Source/CPack/IFW/cmCPackIFWRepository.cxx +++ b/Source/CPack/IFW/cmCPackIFWRepository.cxx @@ -2,14 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackIFWRepository.h" -#include "CPack/cmCPackGenerator.h" +#include "cmCPackGenerator.h" #include "cmCPackIFWGenerator.h" #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" #include "cmXMLParser.h" #include "cmXMLWriter.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <stddef.h> #ifdef cmCPackLogger diff --git a/Source/CPack/IFW/cmCPackIFWRepository.h b/Source/CPack/IFW/cmCPackIFWRepository.h index 36f46da483..c09a1586fd 100644 --- a/Source/CPack/IFW/cmCPackIFWRepository.h +++ b/Source/CPack/IFW/cmCPackIFWRepository.h @@ -3,7 +3,7 @@ #ifndef cmCPackIFWRepository_h #define cmCPackIFWRepository_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/CPack/OSXScriptLauncher.cxx b/Source/CPack/OSXScriptLauncher.cxx index aeabde9dd5..701481d0f2 100644 --- a/Source/CPack/OSXScriptLauncher.cxx +++ b/Source/CPack/OSXScriptLauncher.cxx @@ -1,8 +1,8 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include <cmsys/FStream.hxx> -#include <cmsys/Process.h> -#include <cmsys/SystemTools.hxx> +#include "cmsys/FStream.hxx" +#include "cmsys/Process.h" +#include "cmsys/SystemTools.hxx" #include <iostream> #include <stddef.h> #include <string> diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 39586de2e4..2df23fdf12 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -2,14 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackWIXGenerator.h" -#include <CPack/cmCPackComponentGroup.h> -#include <CPack/cmCPackLog.h> +#include "cmCPackComponentGroup.h" +#include "cmCPackLog.h" +#include "cmCryptoHash.h" +#include "cmGeneratedFileStream.h" +#include "cmInstalledFile.h" +#include "cmSystemTools.h" +#include "cmUuid.h" #include <algorithm> -#include <cmCryptoHash.h> -#include <cmGeneratedFileStream.h> -#include <cmInstalledFile.h> -#include <cmSystemTools.h> -#include <cmUuid.h> #include "cmWIXDirectoriesSourceWriter.h" #include "cmWIXFeaturesSourceWriter.h" @@ -17,10 +17,10 @@ #include "cmWIXRichTextFormatWriter.h" #include "cmWIXSourceWriter.h" -#include <cmsys/Directory.hxx> -#include <cmsys/Encoding.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/SystemTools.hxx> +#include "cmsys/Directory.hxx" +#include "cmsys/Encoding.hxx" +#include "cmsys/FStream.hxx" +#include "cmsys/SystemTools.hxx" #include <rpc.h> // for GUID generation diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.h b/Source/CPack/WiX/cmCPackWIXGenerator.h index 36647d8ec9..353d6c0bc2 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.h +++ b/Source/CPack/WiX/cmCPackWIXGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPackWIXGenerator_h #define cmCPackWIXGenerator_h -#include <CPack/cmCPackGenerator.h> +#include "cmCPackGenerator.h" #include "cmWIXPatch.h" #include "cmWIXShortcut.h" diff --git a/Source/CPack/WiX/cmWIXAccessControlList.cxx b/Source/CPack/WiX/cmWIXAccessControlList.cxx index 9f9b39cc68..744a932985 100644 --- a/Source/CPack/WiX/cmWIXAccessControlList.cxx +++ b/Source/CPack/WiX/cmWIXAccessControlList.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmWIXAccessControlList.h" -#include <CPack/cmCPackGenerator.h> +#include "cmCPackGenerator.h" -#include <cmSystemTools.h> +#include "cmSystemTools.h" cmWIXAccessControlList::cmWIXAccessControlList( cmCPackLog* logger, cmInstalledFile const& installedFile, diff --git a/Source/CPack/WiX/cmWIXAccessControlList.h b/Source/CPack/WiX/cmWIXAccessControlList.h index 0a25ee51c4..2a23f2f378 100644 --- a/Source/CPack/WiX/cmWIXAccessControlList.h +++ b/Source/CPack/WiX/cmWIXAccessControlList.h @@ -5,8 +5,8 @@ #include "cmWIXSourceWriter.h" -#include <CPack/cmCPackLog.h> -#include <cmInstalledFile.h> +#include "cmCPackLog.h" +#include "cmInstalledFile.h" class cmWIXAccessControlList { diff --git a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h index 062efe30ba..8233331a30 100644 --- a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h +++ b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h @@ -5,7 +5,7 @@ #include "cmWIXSourceWriter.h" -#include <CPack/cmCPackGenerator.h> +#include "cmCPackGenerator.h" #include <string> diff --git a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h index 368b250f39..e751ca719d 100644 --- a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h +++ b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h @@ -6,7 +6,7 @@ #include "cmWIXPatch.h" #include "cmWIXSourceWriter.h" -#include <CPack/cmCPackGenerator.h> +#include "cmCPackGenerator.h" /** \class cmWIXFeaturesSourceWriter * \brief Helper class to generate features.wxs diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx index 31583430b3..7aa12125e6 100644 --- a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx +++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx @@ -4,10 +4,10 @@ #include "cmWIXAccessControlList.h" -#include <cmInstalledFile.h> +#include "cmInstalledFile.h" -#include <cmSystemTools.h> -#include <cmUuid.h> +#include "cmSystemTools.h" +#include "cmUuid.h" #include "cm_sys_stat.h" diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.h b/Source/CPack/WiX/cmWIXFilesSourceWriter.h index d7a642dd43..dc9c636d32 100644 --- a/Source/CPack/WiX/cmWIXFilesSourceWriter.h +++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.h @@ -8,7 +8,7 @@ #include "cmWIXPatch.h" #include "cmWIXShortcut.h" -#include <CPack/cmCPackGenerator.h> +#include "cmCPackGenerator.h" /** \class cmWIXFilesSourceWriter * \brief Helper class to generate files.wxs diff --git a/Source/CPack/WiX/cmWIXPatch.cxx b/Source/CPack/WiX/cmWIXPatch.cxx index 7c48653240..3a7dbfd9f4 100644 --- a/Source/CPack/WiX/cmWIXPatch.cxx +++ b/Source/CPack/WiX/cmWIXPatch.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmWIXPatch.h" -#include <CPack/cmCPackGenerator.h> +#include "cmCPackGenerator.h" cmWIXPatch::cmWIXPatch(cmCPackLog* logger) : Logger(logger) diff --git a/Source/CPack/WiX/cmWIXPatchParser.cxx b/Source/CPack/WiX/cmWIXPatchParser.cxx index 47f98d1cd6..7f2ae19fff 100644 --- a/Source/CPack/WiX/cmWIXPatchParser.cxx +++ b/Source/CPack/WiX/cmWIXPatchParser.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmWIXPatchParser.h" -#include <CPack/cmCPackGenerator.h> +#include "cmCPackGenerator.h" -#include <cm_expat.h> +#include "cm_expat.h" cmWIXPatchNode::Type cmWIXPatchText::type() { diff --git a/Source/CPack/WiX/cmWIXPatchParser.h b/Source/CPack/WiX/cmWIXPatchParser.h index a2f0a3cd59..c0c96cdcd7 100644 --- a/Source/CPack/WiX/cmWIXPatchParser.h +++ b/Source/CPack/WiX/cmWIXPatchParser.h @@ -3,9 +3,9 @@ #ifndef cmCPackWIXPatchParser_h #define cmCPackWIXPatchParser_h -#include <CPack/cmCPackLog.h> +#include "cmCPackLog.h" -#include <cmXMLParser.h> +#include "cmXMLParser.h" #include <list> #include <map> diff --git a/Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx b/Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx index d8193470c3..2c99a2284b 100644 --- a/Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx +++ b/Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmWIXRichTextFormatWriter.h" -#include <cmVersion.h> +#include "cmVersion.h" cmWIXRichTextFormatWriter::cmWIXRichTextFormatWriter( std::string const& filename) diff --git a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h index a3c8394b21..30df878146 100644 --- a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h +++ b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h @@ -3,9 +3,9 @@ #ifndef cmWIXRichTextFormatWriter_h #define cmWIXRichTextFormatWriter_h -#include <cmConfigure.h> +#include "cmConfigure.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include <string> /** \class cmWIXRichtTextFormatWriter diff --git a/Source/CPack/WiX/cmWIXShortcut.h b/Source/CPack/WiX/cmWIXShortcut.h index cba3b345c5..23ddc6a3f8 100644 --- a/Source/CPack/WiX/cmWIXShortcut.h +++ b/Source/CPack/WiX/cmWIXShortcut.h @@ -3,7 +3,7 @@ #ifndef cmWIXShortcut_h #define cmWIXShortcut_h -#include <cmInstalledFile.h> +#include "cmInstalledFile.h" #include <map> #include <set> diff --git a/Source/CPack/WiX/cmWIXSourceWriter.cxx b/Source/CPack/WiX/cmWIXSourceWriter.cxx index b4343344c1..a86e28d1c7 100644 --- a/Source/CPack/WiX/cmWIXSourceWriter.cxx +++ b/Source/CPack/WiX/cmWIXSourceWriter.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmWIXSourceWriter.h" -#include <CPack/cmCPackGenerator.h> +#include "cmCPackGenerator.h" -#include <cmUuid.h> +#include "cmUuid.h" #include <windows.h> diff --git a/Source/CPack/WiX/cmWIXSourceWriter.h b/Source/CPack/WiX/cmWIXSourceWriter.h index 45aefe509c..4af1ed6ed0 100644 --- a/Source/CPack/WiX/cmWIXSourceWriter.h +++ b/Source/CPack/WiX/cmWIXSourceWriter.h @@ -3,9 +3,9 @@ #ifndef cmWIXSourceWriter_h #define cmWIXSourceWriter_h -#include <CPack/cmCPackLog.h> +#include "cmCPackLog.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include <string> #include <vector> diff --git a/Source/CPack/cmCPack7zGenerator.h b/Source/CPack/cmCPack7zGenerator.h index a617d9b6ad..42a47810c0 100644 --- a/Source/CPack/cmCPack7zGenerator.h +++ b/Source/CPack/cmCPack7zGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPack7zGenerator_h #define cmCPack7zGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index df02ae8a8e..58d67e32fa 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPackArchiveGenerator_h #define cmCPackArchiveGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmArchiveWrite.h" #include "cmCPackGenerator.h" diff --git a/Source/CPack/cmCPackBundleGenerator.h b/Source/CPack/cmCPackBundleGenerator.h index c9200c135c..861fe4b092 100644 --- a/Source/CPack/cmCPackBundleGenerator.h +++ b/Source/CPack/cmCPackBundleGenerator.h @@ -3,7 +3,8 @@ #ifndef cmCPackBundleGenerator_h #define cmCPackBundleGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include "cmCPackDragNDropGenerator.h" diff --git a/Source/CPack/cmCPackComponentGroup.h b/Source/CPack/cmCPackComponentGroup.h index 510adc2706..26d69ba689 100644 --- a/Source/CPack/cmCPackComponentGroup.h +++ b/Source/CPack/cmCPackComponentGroup.h @@ -3,7 +3,7 @@ #ifndef cmCPackComponentGroup_h #define cmCPackComponentGroup_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <string> #include <vector> diff --git a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx index e67811d51d..2119f782b9 100644 --- a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx +++ b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx @@ -9,7 +9,7 @@ #include "cmSystemTools.h" #include "cmake.h" -#include <cmsys/SystemTools.hxx> +#include "cmsys/SystemTools.hxx" cmCPackCygwinBinaryGenerator::cmCPackCygwinBinaryGenerator() { diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.cxx b/Source/CPack/cmCPackCygwinSourceGenerator.cxx index bd22cec144..2c289f6687 100644 --- a/Source/CPack/cmCPackCygwinSourceGenerator.cxx +++ b/Source/CPack/cmCPackCygwinSourceGenerator.cxx @@ -9,7 +9,7 @@ #include "cmSystemTools.h" #include "cmake.h" -#include <cmsys/SystemTools.hxx> +#include "cmsys/SystemTools.hxx" // Includes needed for implementation of RenameFile. This is not in // system tools because it is not implemented robustly enough to move diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index ed87238bb3..af54fce335 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -10,7 +10,7 @@ #include "cmSystemTools.h" #include "cm_sys_stat.h" -#include <cmsys/Glob.hxx> +#include "cmsys/Glob.hxx" #include <limits.h> #include <map> #include <ostream> diff --git a/Source/CPack/cmCPackDebGenerator.h b/Source/CPack/cmCPackDebGenerator.h index 7db933e362..e7cde1145d 100644 --- a/Source/CPack/cmCPackDebGenerator.h +++ b/Source/CPack/cmCPackDebGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPackDebGenerator_h #define cmCPackDebGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCPackGenerator.h" diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index ec5fc88df9..9864cf3545 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -7,8 +7,8 @@ #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" -#include <cmsys/FStream.hxx> -#include <cmsys/RegularExpression.hxx> +#include "cmsys/FStream.hxx" +#include "cmsys/RegularExpression.hxx" #include <iomanip> #include <map> #include <stdlib.h> diff --git a/Source/CPack/cmCPackDragNDropGenerator.h b/Source/CPack/cmCPackDragNDropGenerator.h index 876eab7a82..ae2cc173fb 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.h +++ b/Source/CPack/cmCPackDragNDropGenerator.h @@ -3,7 +3,8 @@ #ifndef cmCPackDragNDropGenerator_h #define cmCPackDragNDropGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <sstream> #include <stddef.h> #include <string> diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index f6ea8cf099..a95ca76446 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -2,10 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackGenerator.h" +#include "cmsys/FStream.hxx" +#include "cmsys/Glob.hxx" +#include "cmsys/RegularExpression.hxx" #include <algorithm> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/RegularExpression.hxx> #include <list> #include <utility> diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index 39fd2cc5a6..45777fa051 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPackGenerator_h #define cmCPackGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <map> #include <sstream> diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx index b012f01f12..31f48c7e3d 100644 --- a/Source/CPack/cmCPackGeneratorFactory.cxx +++ b/Source/CPack/cmCPackGeneratorFactory.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackGeneratorFactory.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <ostream> #include <utility> diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h index 4ee0bc14d7..7f633e4739 100644 --- a/Source/CPack/cmCPackGeneratorFactory.h +++ b/Source/CPack/cmCPackGeneratorFactory.h @@ -3,7 +3,7 @@ #ifndef cmCPackGeneratorFactory_h #define cmCPackGeneratorFactory_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <map> #include <string> diff --git a/Source/CPack/cmCPackLog.cxx b/Source/CPack/cmCPackLog.cxx index 7d5c19245c..5c71239590 100644 --- a/Source/CPack/cmCPackLog.cxx +++ b/Source/CPack/cmCPackLog.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackLog.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iostream> #include "cmGeneratedFileStream.h" diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h index a988ccc67d..96c5882298 100644 --- a/Source/CPack/cmCPackLog.h +++ b/Source/CPack/cmCPackLog.h @@ -3,7 +3,7 @@ #ifndef cmCPackLog_h #define cmCPackLog_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <ostream> #include <string.h> diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index 1940953787..beb2d01490 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -8,9 +8,9 @@ #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" +#include "cmsys/Directory.hxx" +#include "cmsys/RegularExpression.hxx" #include <algorithm> -#include <cmsys/Directory.hxx> -#include <cmsys/RegularExpression.hxx> #include <map> #include <sstream> #include <stdlib.h> diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h index b4bf2d4b95..77be3256dd 100644 --- a/Source/CPack/cmCPackNSISGenerator.h +++ b/Source/CPack/cmCPackNSISGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPackNSISGenerator_h #define cmCPackNSISGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCPackGenerator.h" diff --git a/Source/CPack/cmCPackOSXX11Generator.h b/Source/CPack/cmCPackOSXX11Generator.h index 1918e210a7..0eebc6dd1c 100644 --- a/Source/CPack/cmCPackOSXX11Generator.h +++ b/Source/CPack/cmCPackOSXX11Generator.h @@ -3,7 +3,8 @@ #ifndef cmCPackOSXX11Generator_h #define cmCPackOSXX11Generator_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include "cmCPackGenerator.h" diff --git a/Source/CPack/cmCPackPKGGenerator.h b/Source/CPack/cmCPackPKGGenerator.h index 1e96a62b87..f873c59361 100644 --- a/Source/CPack/cmCPackPKGGenerator.h +++ b/Source/CPack/cmCPackPKGGenerator.h @@ -3,7 +3,8 @@ #ifndef cmCPackPKGGenerator_h #define cmCPackPKGGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <set> #include <sstream> #include <string> diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx index 8000d6e524..8db7cfb3da 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.cxx +++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackPackageMakerGenerator.h" +#include "cmsys/FStream.hxx" +#include "cmsys/RegularExpression.hxx" #include <assert.h> -#include <cmsys/FStream.hxx> -#include <cmsys/RegularExpression.hxx> #include <map> #include <sstream> #include <stdio.h> diff --git a/Source/CPack/cmCPackPackageMakerGenerator.h b/Source/CPack/cmCPackPackageMakerGenerator.h index d4c674450e..62745152be 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.h +++ b/Source/CPack/cmCPackPackageMakerGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPackPackageMakerGenerator_h #define cmCPackPackageMakerGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCPackGenerator.h" #include "cmCPackPKGGenerator.h" diff --git a/Source/CPack/cmCPackProductBuildGenerator.h b/Source/CPack/cmCPackProductBuildGenerator.h index b6da470eeb..12093a0e8f 100644 --- a/Source/CPack/cmCPackProductBuildGenerator.h +++ b/Source/CPack/cmCPackProductBuildGenerator.h @@ -3,7 +3,8 @@ #ifndef cmCPackProductBuildGenerator_h #define cmCPackProductBuildGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include "cmCPackGenerator.h" diff --git a/Source/CPack/cmCPackRPMGenerator.h b/Source/CPack/cmCPackRPMGenerator.h index 4d48bd8fb0..52cfc13edd 100644 --- a/Source/CPack/cmCPackRPMGenerator.h +++ b/Source/CPack/cmCPackRPMGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPackRPMGenerator_h #define cmCPackRPMGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCPackGenerator.h" diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx index 2765e2ac8b..c541614267 100644 --- a/Source/CPack/cmCPackSTGZGenerator.cxx +++ b/Source/CPack/cmCPackSTGZGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackSTGZGenerator.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include <sstream> #include <stdio.h> #include <string> diff --git a/Source/CPack/cmCPackSTGZGenerator.h b/Source/CPack/cmCPackSTGZGenerator.h index 4b9c1c671f..8304e80768 100644 --- a/Source/CPack/cmCPackSTGZGenerator.h +++ b/Source/CPack/cmCPackSTGZGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPackSTGZGenerator_h #define cmCPackSTGZGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCPackGenerator.h" #include "cmCPackTGZGenerator.h" diff --git a/Source/CPack/cmCPackTGZGenerator.h b/Source/CPack/cmCPackTGZGenerator.h index ee2e975a49..9426b3a01a 100644 --- a/Source/CPack/cmCPackTGZGenerator.h +++ b/Source/CPack/cmCPackTGZGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPackTGZGenerator_h #define cmCPackTGZGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" diff --git a/Source/CPack/cmCPackTXZGenerator.h b/Source/CPack/cmCPackTXZGenerator.h index 876ca7d82f..3b96e2d781 100644 --- a/Source/CPack/cmCPackTXZGenerator.h +++ b/Source/CPack/cmCPackTXZGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPackTXZGenerator_h #define cmCPackTXZGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" diff --git a/Source/CPack/cmCPackTarBZip2Generator.h b/Source/CPack/cmCPackTarBZip2Generator.h index 42214fdf3d..9b4b8f4ff7 100644 --- a/Source/CPack/cmCPackTarBZip2Generator.h +++ b/Source/CPack/cmCPackTarBZip2Generator.h @@ -3,7 +3,7 @@ #ifndef cmCPackTarBZip2Generator_h #define cmCPackTarBZip2Generator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" diff --git a/Source/CPack/cmCPackTarCompressGenerator.h b/Source/CPack/cmCPackTarCompressGenerator.h index 1476642a8d..381d6eb2f7 100644 --- a/Source/CPack/cmCPackTarCompressGenerator.h +++ b/Source/CPack/cmCPackTarCompressGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPackTarCompressGenerator_h #define cmCPackTarCompressGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" diff --git a/Source/CPack/cmCPackZIPGenerator.h b/Source/CPack/cmCPackZIPGenerator.h index 95b648910d..00c872029c 100644 --- a/Source/CPack/cmCPackZIPGenerator.h +++ b/Source/CPack/cmCPackZIPGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPackZIPGenerator_h #define cmCPackZIPGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index af80cbf76d..a48c8cdb35 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -1,9 +1,9 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include <cmConfigure.h> +#include "cmConfigure.h" -#include <cmsys/CommandLineArguments.hxx> -#include <cmsys/Encoding.hxx> +#include "cmsys/CommandLineArguments.hxx" +#include "cmsys/Encoding.hxx" #include <iostream> #include <map> #include <sstream> @@ -13,7 +13,7 @@ #include <vector> #if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) -#include <cmsys/ConsoleBuf.hxx> +#include "cmsys/ConsoleBuf.hxx" #endif #include "cmCPackGenerator.h" diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx index 6769ee5687..94f39c2653 100644 --- a/Source/CTest/cmCTestBZR.cxx +++ b/Source/CTest/cmCTestBZR.cxx @@ -8,8 +8,8 @@ #include "cmSystemTools.h" #include "cmXMLParser.h" -#include <cm_expat.h> -#include <cmsys/RegularExpression.hxx> +#include "cm_expat.h" +#include "cmsys/RegularExpression.hxx" #include <list> #include <map> #include <ostream> diff --git a/Source/CTest/cmCTestBZR.h b/Source/CTest/cmCTestBZR.h index 0b62582636..2e8e88f955 100644 --- a/Source/CTest/cmCTestBZR.h +++ b/Source/CTest/cmCTestBZR.h @@ -3,7 +3,7 @@ #ifndef cmCTestBZR_h #define cmCTestBZR_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestGlobalVC.h" diff --git a/Source/CTest/cmCTestBatchTestHandler.h b/Source/CTest/cmCTestBatchTestHandler.h index 44db2528be..4a5dac1d6c 100644 --- a/Source/CTest/cmCTestBatchTestHandler.h +++ b/Source/CTest/cmCTestBatchTestHandler.h @@ -3,10 +3,10 @@ #ifndef cmCTestBatchTestHandler_h #define cmCTestBatchTestHandler_h -#include <cmConfigure.h> +#include "cmConfigure.h" -#include <cmCTestMultiProcessHandler.h> -#include <cmsys/FStream.hxx> +#include "cmCTestMultiProcessHandler.h" +#include "cmsys/FStream.hxx" #include <string> /** \class cmCTestBatchTestHandler diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index 6f81429b9e..ed7dd5d89b 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -9,7 +9,7 @@ #include "cmWorkingDirectory.h" #include "cmake.h" -#include <cmsys/Process.h> +#include "cmsys/Process.h" #include <stdlib.h> cmCTestBuildAndTestHandler::cmCTestBuildAndTestHandler() diff --git a/Source/CTest/cmCTestBuildAndTestHandler.h b/Source/CTest/cmCTestBuildAndTestHandler.h index af082a3984..2e85e9fed3 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.h +++ b/Source/CTest/cmCTestBuildAndTestHandler.h @@ -3,7 +3,7 @@ #ifndef cmCTestBuildAndTestHandler_h #define cmCTestBuildAndTestHandler_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestGenericHandler.h" diff --git a/Source/CTest/cmCTestBuildCommand.h b/Source/CTest/cmCTestBuildCommand.h index 9cc6f7e8f0..9cf6a9652f 100644 --- a/Source/CTest/cmCTestBuildCommand.h +++ b/Source/CTest/cmCTestBuildCommand.h @@ -3,7 +3,7 @@ #ifndef cmCTestBuildCommand_h #define cmCTestBuildCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestHandlerCommand.h" diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 1868a1ee71..b6075c90c0 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -11,9 +11,9 @@ #include "cmSystemTools.h" #include "cmXMLWriter.h" -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/Process.h> +#include "cmsys/Directory.hxx" +#include "cmsys/FStream.hxx" +#include "cmsys/Process.h" #include <set> #include <stdlib.h> #include <string.h> diff --git a/Source/CTest/cmCTestBuildHandler.h b/Source/CTest/cmCTestBuildHandler.h index a2f6112952..ef3cddf1b0 100644 --- a/Source/CTest/cmCTestBuildHandler.h +++ b/Source/CTest/cmCTestBuildHandler.h @@ -3,12 +3,12 @@ #ifndef cmCTestBuildHandler_h #define cmCTestBuildHandler_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestGenericHandler.h" -#include <cmProcessOutput.h> -#include <cmsys/RegularExpression.hxx> +#include "cmProcessOutput.h" +#include "cmsys/RegularExpression.hxx" #include <deque> #include <iosfwd> #include <stddef.h> diff --git a/Source/CTest/cmCTestCVS.cxx b/Source/CTest/cmCTestCVS.cxx index 98bb678f5c..fad360ba4f 100644 --- a/Source/CTest/cmCTestCVS.cxx +++ b/Source/CTest/cmCTestCVS.cxx @@ -7,8 +7,8 @@ #include "cmSystemTools.h" #include "cmXMLWriter.h" -#include <cmsys/FStream.hxx> -#include <cmsys/RegularExpression.hxx> +#include "cmsys/FStream.hxx" +#include "cmsys/RegularExpression.hxx" #include <utility> cmCTestCVS::cmCTestCVS(cmCTest* ct, std::ostream& log) diff --git a/Source/CTest/cmCTestCVS.h b/Source/CTest/cmCTestCVS.h index d921b1abcd..1208cfad6b 100644 --- a/Source/CTest/cmCTestCVS.h +++ b/Source/CTest/cmCTestCVS.h @@ -3,7 +3,7 @@ #ifndef cmCTestCVS_h #define cmCTestCVS_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestVC.h" diff --git a/Source/CTest/cmCTestConfigureCommand.h b/Source/CTest/cmCTestConfigureCommand.h index 22d12179c1..917f5ab8b9 100644 --- a/Source/CTest/cmCTestConfigureCommand.h +++ b/Source/CTest/cmCTestConfigureCommand.h @@ -3,7 +3,7 @@ #ifndef cmCTestConfigureCommand_h #define cmCTestConfigureCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestHandlerCommand.h" diff --git a/Source/CTest/cmCTestConfigureHandler.h b/Source/CTest/cmCTestConfigureHandler.h index 7fa95edea3..2b452829c3 100644 --- a/Source/CTest/cmCTestConfigureHandler.h +++ b/Source/CTest/cmCTestConfigureHandler.h @@ -3,7 +3,7 @@ #ifndef cmCTestConfigureHandler_h #define cmCTestConfigureHandler_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestGenericHandler.h" diff --git a/Source/CTest/cmCTestCoverageCommand.h b/Source/CTest/cmCTestCoverageCommand.h index bf42aa1325..78c4f61f63 100644 --- a/Source/CTest/cmCTestCoverageCommand.h +++ b/Source/CTest/cmCTestCoverageCommand.h @@ -3,7 +3,7 @@ #ifndef cmCTestCoverageCommand_h #define cmCTestCoverageCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestHandlerCommand.h" diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 120c5d9821..4d970d5c6b 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -16,11 +16,11 @@ #include "cmXMLWriter.h" #include "cmake.h" +#include "cmsys/FStream.hxx" +#include "cmsys/Glob.hxx" +#include "cmsys/Process.h" +#include "cmsys/RegularExpression.hxx" #include <algorithm> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/Process.h> -#include <cmsys/RegularExpression.hxx> #include <iomanip> #include <iterator> #include <sstream> diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h index 339b5d7094..933f60660c 100644 --- a/Source/CTest/cmCTestCoverageHandler.h +++ b/Source/CTest/cmCTestCoverageHandler.h @@ -3,11 +3,11 @@ #ifndef cmCTestCoverageHandler_h #define cmCTestCoverageHandler_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestGenericHandler.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <iosfwd> #include <map> #include <set> diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx index ab1412d59c..06b5e811de 100644 --- a/Source/CTest/cmCTestCurl.cxx +++ b/Source/CTest/cmCTestCurl.cxx @@ -5,7 +5,7 @@ #include "cmCTest.h" #include "cmSystemTools.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <ostream> #include <stdio.h> diff --git a/Source/CTest/cmCTestCurl.h b/Source/CTest/cmCTestCurl.h index cdce393385..67608cb6f8 100644 --- a/Source/CTest/cmCTestCurl.h +++ b/Source/CTest/cmCTestCurl.h @@ -3,9 +3,9 @@ #ifndef cmCTestCurl_h #define cmCTestCurl_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep -#include <cm_curl.h> +#include "cm_curl.h" #include <string> #include <vector> diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h index 4c1438b8b7..bfd4061255 100644 --- a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h +++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h @@ -3,7 +3,7 @@ #ifndef cmCTestEmptyBinaryDirectoryCommand_h #define cmCTestEmptyBinaryDirectoryCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestCommand.h" diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx index 9c53aa1785..17f822daf2 100644 --- a/Source/CTest/cmCTestGIT.cxx +++ b/Source/CTest/cmCTestGIT.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestGIT.h" -#include <cmsys/FStream.hxx> -#include <cmsys/Process.h> +#include "cmsys/FStream.hxx" +#include "cmsys/Process.h" #include <ctype.h> #include <stdio.h> #include <stdlib.h> diff --git a/Source/CTest/cmCTestGIT.h b/Source/CTest/cmCTestGIT.h index d5a1ee339d..4bf8294e6e 100644 --- a/Source/CTest/cmCTestGIT.h +++ b/Source/CTest/cmCTestGIT.h @@ -3,7 +3,7 @@ #ifndef cmCTestGIT_h #define cmCTestGIT_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestGlobalVC.h" diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx index 7638f45c9e..19034c01b3 100644 --- a/Source/CTest/cmCTestGenericHandler.cxx +++ b/Source/CTest/cmCTestGenericHandler.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestGenericHandler.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <sstream> #include <utility> diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h index 2ebbe70c2f..e881252c93 100644 --- a/Source/CTest/cmCTestGenericHandler.h +++ b/Source/CTest/cmCTestGenericHandler.h @@ -3,7 +3,7 @@ #ifndef cmCTestGenericHandler_h #define cmCTestGenericHandler_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <map> #include <stddef.h> diff --git a/Source/CTest/cmCTestGlobalVC.h b/Source/CTest/cmCTestGlobalVC.h index 9fa5f21e33..a5273d3dd9 100644 --- a/Source/CTest/cmCTestGlobalVC.h +++ b/Source/CTest/cmCTestGlobalVC.h @@ -3,7 +3,7 @@ #ifndef cmCTestGlobalVC_h #define cmCTestGlobalVC_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestVC.h" diff --git a/Source/CTest/cmCTestHG.cxx b/Source/CTest/cmCTestHG.cxx index 68ebd37a35..49f9a6500c 100644 --- a/Source/CTest/cmCTestHG.cxx +++ b/Source/CTest/cmCTestHG.cxx @@ -8,7 +8,7 @@ #include "cmSystemTools.h" #include "cmXMLParser.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <ostream> #include <vector> diff --git a/Source/CTest/cmCTestHG.h b/Source/CTest/cmCTestHG.h index 63baba23c9..ec9eaffe85 100644 --- a/Source/CTest/cmCTestHG.h +++ b/Source/CTest/cmCTestHG.h @@ -3,7 +3,7 @@ #ifndef cmCTestHG_h #define cmCTestHG_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestGlobalVC.h" diff --git a/Source/CTest/cmCTestHandlerCommand.h b/Source/CTest/cmCTestHandlerCommand.h index c86841f641..adc1687ed9 100644 --- a/Source/CTest/cmCTestHandlerCommand.h +++ b/Source/CTest/cmCTestHandlerCommand.h @@ -3,7 +3,7 @@ #ifndef cmCTestHandlerCommand_h #define cmCTestHandlerCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestCommand.h" diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index 03e031943d..7195bb32e4 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -2,11 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestLaunch.h" -#include <cmConfigure.h> +#include "cmConfigure.h" -#include <cmsys/FStream.hxx> -#include <cmsys/Process.h> -#include <cmsys/RegularExpression.hxx> +#include "cmsys/FStream.hxx" +#include "cmsys/Process.h" +#include "cmsys/RegularExpression.hxx" #include <iostream> #include <stdlib.h> #include <string.h> diff --git a/Source/CTest/cmCTestLaunch.h b/Source/CTest/cmCTestLaunch.h index fbc9e2bc15..29986ff604 100644 --- a/Source/CTest/cmCTestLaunch.h +++ b/Source/CTest/cmCTestLaunch.h @@ -3,9 +3,9 @@ #ifndef cmCTestLaunch_h #define cmCTestLaunch_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <set> #include <string> #include <vector> diff --git a/Source/CTest/cmCTestMemCheckCommand.h b/Source/CTest/cmCTestMemCheckCommand.h index 458ebb0908..fea65e8b66 100644 --- a/Source/CTest/cmCTestMemCheckCommand.h +++ b/Source/CTest/cmCTestMemCheckCommand.h @@ -3,7 +3,7 @@ #ifndef cmCTestMemCheckCommand_h #define cmCTestMemCheckCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestTestCommand.h" diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 620e237248..fc4980badc 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -7,9 +7,9 @@ #include "cmXMLParser.h" #include "cmXMLWriter.h" -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/RegularExpression.hxx> +#include "cmsys/FStream.hxx" +#include "cmsys/Glob.hxx" +#include "cmsys/RegularExpression.hxx" #include <iostream> #include <sstream> #include <string.h> diff --git a/Source/CTest/cmCTestMemCheckHandler.h b/Source/CTest/cmCTestMemCheckHandler.h index ff8b593ade..333c2e2ddc 100644 --- a/Source/CTest/cmCTestMemCheckHandler.h +++ b/Source/CTest/cmCTestMemCheckHandler.h @@ -3,7 +3,7 @@ #ifndef cmCTestMemCheckHandler_h #define cmCTestMemCheckHandler_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestTestHandler.h" diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 2d4726cc4c..d738a1bf3d 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -9,10 +9,10 @@ #include "cmSystemTools.h" #include "cmWorkingDirectory.h" +#include "cmsys/FStream.hxx" +#include "cmsys/String.hxx" +#include "cmsys/SystemInformation.hxx" #include <algorithm> -#include <cmsys/FStream.hxx> -#include <cmsys/String.hxx> -#include <cmsys/SystemInformation.hxx> #include <iomanip> #include <list> #include <math.h> diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h index fe32e15d04..dccc2c896e 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.h +++ b/Source/CTest/cmCTestMultiProcessHandler.h @@ -3,9 +3,9 @@ #ifndef cmCTestMultiProcessHandler_h #define cmCTestMultiProcessHandler_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep -#include <cmCTestTestHandler.h> +#include "cmCTestTestHandler.h" #include <map> #include <set> #include <stddef.h> diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx index 4f788763f3..c802216343 100644 --- a/Source/CTest/cmCTestP4.cxx +++ b/Source/CTest/cmCTestP4.cxx @@ -7,8 +7,8 @@ #include "cmProcessTools.h" #include "cmSystemTools.h" +#include "cmsys/RegularExpression.hxx" #include <algorithm> -#include <cmsys/RegularExpression.hxx> #include <ostream> #include <time.h> #include <utility> diff --git a/Source/CTest/cmCTestP4.h b/Source/CTest/cmCTestP4.h index 2c04dc67eb..e234efbfb6 100644 --- a/Source/CTest/cmCTestP4.h +++ b/Source/CTest/cmCTestP4.h @@ -3,7 +3,7 @@ #ifndef cmCTestP4_h #define cmCTestP4_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestGlobalVC.h" diff --git a/Source/CTest/cmCTestReadCustomFilesCommand.h b/Source/CTest/cmCTestReadCustomFilesCommand.h index e15559574a..04024abc16 100644 --- a/Source/CTest/cmCTestReadCustomFilesCommand.h +++ b/Source/CTest/cmCTestReadCustomFilesCommand.h @@ -3,7 +3,7 @@ #ifndef cmCTestReadCustomFilesCommand_h #define cmCTestReadCustomFilesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestCommand.h" diff --git a/Source/CTest/cmCTestRunScriptCommand.h b/Source/CTest/cmCTestRunScriptCommand.h index 01ed62ebcb..aac5114f0f 100644 --- a/Source/CTest/cmCTestRunScriptCommand.h +++ b/Source/CTest/cmCTestRunScriptCommand.h @@ -3,7 +3,7 @@ #ifndef cmCTestRunScriptCommand_h #define cmCTestRunScriptCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestCommand.h" diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 94aa4bde39..a4853b746e 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -9,12 +9,12 @@ #include "cmSystemTools.h" #include "cmWorkingDirectory.h" -#include <cmConfigure.h> -#include <cm_curl.h> -#include <cm_zlib.h> -#include <cmsys/Base64.h> -#include <cmsys/Process.h> -#include <cmsys/RegularExpression.hxx> +#include "cmConfigure.h" +#include "cm_curl.h" +#include "cm_zlib.h" +#include "cmsys/Base64.h" +#include "cmsys/Process.h" +#include "cmsys/RegularExpression.hxx" #include <iomanip> #include <sstream> #include <stdio.h> diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h index ee4630a2cb..d3bb2296fb 100644 --- a/Source/CTest/cmCTestRunTest.h +++ b/Source/CTest/cmCTestRunTest.h @@ -3,7 +3,7 @@ #ifndef cmCTestRunTest_h #define cmCTestRunTest_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <set> #include <stddef.h> diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx index ce395cd3c4..0b872815f2 100644 --- a/Source/CTest/cmCTestSVN.cxx +++ b/Source/CTest/cmCTestSVN.cxx @@ -9,7 +9,7 @@ #include "cmXMLParser.h" #include "cmXMLWriter.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <map> #include <ostream> #include <stdlib.h> diff --git a/Source/CTest/cmCTestSVN.h b/Source/CTest/cmCTestSVN.h index e5fe5b7019..d90d387341 100644 --- a/Source/CTest/cmCTestSVN.h +++ b/Source/CTest/cmCTestSVN.h @@ -3,7 +3,7 @@ #ifndef cmCTestSVN_h #define cmCTestSVN_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestGlobalVC.h" diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index b537242aa4..60e48b6cee 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestScriptHandler.h" -#include <cmsys/Directory.hxx> -#include <cmsys/Process.h> +#include "cmsys/Directory.hxx" +#include "cmsys/Process.h" #include <map> #include <sstream> #include <stdio.h> diff --git a/Source/CTest/cmCTestScriptHandler.h b/Source/CTest/cmCTestScriptHandler.h index 47644be02b..30707962d5 100644 --- a/Source/CTest/cmCTestScriptHandler.h +++ b/Source/CTest/cmCTestScriptHandler.h @@ -3,7 +3,7 @@ #ifndef cmCTestScriptHandler_h #define cmCTestScriptHandler_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestGenericHandler.h" diff --git a/Source/CTest/cmCTestSleepCommand.h b/Source/CTest/cmCTestSleepCommand.h index 1052f76d55..a55e9d9a7e 100644 --- a/Source/CTest/cmCTestSleepCommand.h +++ b/Source/CTest/cmCTestSleepCommand.h @@ -3,7 +3,7 @@ #ifndef cmCTestSleepCommand_h #define cmCTestSleepCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestCommand.h" diff --git a/Source/CTest/cmCTestStartCommand.h b/Source/CTest/cmCTestStartCommand.h index cc72d0c6b6..26a63fba06 100644 --- a/Source/CTest/cmCTestStartCommand.h +++ b/Source/CTest/cmCTestStartCommand.h @@ -3,7 +3,7 @@ #ifndef cmCTestStartCommand_h #define cmCTestStartCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestCommand.h" diff --git a/Source/CTest/cmCTestSubmitCommand.h b/Source/CTest/cmCTestSubmitCommand.h index f5b52c178b..e566abbd23 100644 --- a/Source/CTest/cmCTestSubmitCommand.h +++ b/Source/CTest/cmCTestSubmitCommand.h @@ -3,7 +3,7 @@ #ifndef cmCTestSubmitCommand_h #define cmCTestSubmitCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTest.h" #include "cmCTestHandlerCommand.h" diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 88193b07f3..96d149178a 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -2,10 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestSubmitHandler.h" -#include <cm_curl.h> -#include <cm_jsoncpp_reader.h> -#include <cm_jsoncpp_value.h> -#include <cmsys/Process.h> +#include "cm_curl.h" +#include "cm_jsoncpp_reader.h" +#include "cm_jsoncpp_value.h" +#include "cmsys/Process.h" #include <sstream> #include <stdio.h> #include <stdlib.h> @@ -26,7 +26,7 @@ #if defined(CTEST_USE_XMLRPC) #include "cmVersion.h" #include "cm_sys_stat.h" -#include <cm_xmlrpc.h> +#include "cm_xmlrpc.h" #endif #define SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT 120 diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h index baaf8af149..cf365460e1 100644 --- a/Source/CTest/cmCTestSubmitHandler.h +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -3,7 +3,7 @@ #ifndef cmCTestSubmitHandler_h #define cmCTestSubmitHandler_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTest.h" #include "cmCTestGenericHandler.h" diff --git a/Source/CTest/cmCTestTestCommand.h b/Source/CTest/cmCTestTestCommand.h index 3250d9370b..189310402f 100644 --- a/Source/CTest/cmCTestTestCommand.h +++ b/Source/CTest/cmCTestTestCommand.h @@ -3,7 +3,7 @@ #ifndef cmCTestTestCommand_h #define cmCTestTestCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestHandlerCommand.h" diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 814b310f8e..dafeec28a5 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -2,11 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTestTestHandler.h" +#include "cmsys/Base64.h" +#include "cmsys/Directory.hxx" +#include "cmsys/FStream.hxx" +#include "cmsys/RegularExpression.hxx" #include <algorithm> -#include <cmsys/Base64.h> -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/RegularExpression.hxx> #include <functional> #include <iomanip> #include <iterator> diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index a95f0881b7..3700f8a523 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -3,11 +3,11 @@ #ifndef cmCTestTestHandler_h #define cmCTestTestHandler_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestGenericHandler.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <iosfwd> #include <map> #include <set> diff --git a/Source/CTest/cmCTestUpdateCommand.h b/Source/CTest/cmCTestUpdateCommand.h index 5761f50ffa..3b8f0a6417 100644 --- a/Source/CTest/cmCTestUpdateCommand.h +++ b/Source/CTest/cmCTestUpdateCommand.h @@ -3,7 +3,7 @@ #ifndef cmCTestUpdateCommand_h #define cmCTestUpdateCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestHandlerCommand.h" diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx index 2b5683af88..e08a9b7bda 100644 --- a/Source/CTest/cmCTestUpdateHandler.cxx +++ b/Source/CTest/cmCTestUpdateHandler.cxx @@ -16,7 +16,7 @@ #include "cmVersion.h" #include "cmXMLWriter.h" -#include <cm_auto_ptr.hxx> +#include "cm_auto_ptr.hxx" #include <sstream> static const char* cmCTestUpdateHandlerUpdateStrings[] = { diff --git a/Source/CTest/cmCTestUpdateHandler.h b/Source/CTest/cmCTestUpdateHandler.h index 87781e8f52..0cd2844210 100644 --- a/Source/CTest/cmCTestUpdateHandler.h +++ b/Source/CTest/cmCTestUpdateHandler.h @@ -3,7 +3,7 @@ #ifndef cmCTestUpdateHandler_h #define cmCTestUpdateHandler_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTestGenericHandler.h" diff --git a/Source/CTest/cmCTestUploadCommand.h b/Source/CTest/cmCTestUploadCommand.h index 474f6991e6..6e721796a5 100644 --- a/Source/CTest/cmCTestUploadCommand.h +++ b/Source/CTest/cmCTestUploadCommand.h @@ -3,7 +3,7 @@ #ifndef cmCTestUploadCommand_h #define cmCTestUploadCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTest.h" #include "cmCTestHandlerCommand.h" diff --git a/Source/CTest/cmCTestUploadHandler.h b/Source/CTest/cmCTestUploadHandler.h index 77c2aec3b9..1e8d3c801a 100644 --- a/Source/CTest/cmCTestUploadHandler.h +++ b/Source/CTest/cmCTestUploadHandler.h @@ -3,7 +3,7 @@ #ifndef cmCTestUploadHandler_h #define cmCTestUploadHandler_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTest.h" #include "cmCTestGenericHandler.h" diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx index 26c9bb51bc..fb2742e089 100644 --- a/Source/CTest/cmCTestVC.cxx +++ b/Source/CTest/cmCTestVC.cxx @@ -6,7 +6,7 @@ #include "cmSystemTools.h" #include "cmXMLWriter.h" -#include <cmsys/Process.h> +#include "cmsys/Process.h" #include <sstream> #include <stdio.h> #include <time.h> diff --git a/Source/CTest/cmCTestVC.h b/Source/CTest/cmCTestVC.h index a1c1673155..6400bcda39 100644 --- a/Source/CTest/cmCTestVC.h +++ b/Source/CTest/cmCTestVC.h @@ -3,7 +3,7 @@ #ifndef cmCTestVC_h #define cmCTestVC_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <string> diff --git a/Source/CTest/cmParseBlanketJSCoverage.cxx b/Source/CTest/cmParseBlanketJSCoverage.cxx index 6fa982ea22..54bb4224ed 100644 --- a/Source/CTest/cmParseBlanketJSCoverage.cxx +++ b/Source/CTest/cmParseBlanketJSCoverage.cxx @@ -6,7 +6,7 @@ #include "cmCTestCoverageHandler.h" #include "cmSystemTools.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include <stdio.h> #include <stdlib.h> diff --git a/Source/CTest/cmParseBlanketJSCoverage.h b/Source/CTest/cmParseBlanketJSCoverage.h index 660590d4e1..696121f215 100644 --- a/Source/CTest/cmParseBlanketJSCoverage.h +++ b/Source/CTest/cmParseBlanketJSCoverage.h @@ -3,7 +3,7 @@ #ifndef cmParseBlanketJSCoverage_h #define cmParseBlanketJSCoverage_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/CTest/cmParseCacheCoverage.cxx b/Source/CTest/cmParseCacheCoverage.cxx index 23176b5246..629010cf14 100644 --- a/Source/CTest/cmParseCacheCoverage.cxx +++ b/Source/CTest/cmParseCacheCoverage.cxx @@ -4,8 +4,8 @@ #include "cmCTestCoverageHandler.h" #include "cmSystemTools.h" -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> +#include "cmsys/Directory.hxx" +#include "cmsys/FStream.hxx" #include <map> #include <stdio.h> #include <stdlib.h> diff --git a/Source/CTest/cmParseCacheCoverage.h b/Source/CTest/cmParseCacheCoverage.h index 645d7103f5..005d272581 100644 --- a/Source/CTest/cmParseCacheCoverage.h +++ b/Source/CTest/cmParseCacheCoverage.h @@ -3,7 +3,7 @@ #ifndef cmParseCacheCoverage_h #define cmParseCacheCoverage_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmParseMumpsCoverage.h" diff --git a/Source/CTest/cmParseCoberturaCoverage.cxx b/Source/CTest/cmParseCoberturaCoverage.cxx index db1774846e..ba55cd7b26 100644 --- a/Source/CTest/cmParseCoberturaCoverage.cxx +++ b/Source/CTest/cmParseCoberturaCoverage.cxx @@ -5,8 +5,8 @@ #include "cmSystemTools.h" #include "cmXMLParser.h" -#include <cmConfigure.h> -#include <cmsys/FStream.hxx> +#include "cmConfigure.h" +#include "cmsys/FStream.hxx" #include <stdlib.h> #include <string.h> diff --git a/Source/CTest/cmParseCoberturaCoverage.h b/Source/CTest/cmParseCoberturaCoverage.h index 077eb80ad2..cb6d0976ba 100644 --- a/Source/CTest/cmParseCoberturaCoverage.h +++ b/Source/CTest/cmParseCoberturaCoverage.h @@ -3,7 +3,7 @@ #ifndef cmParseCoberturaCoverage_h #define cmParseCoberturaCoverage_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/CTest/cmParseDelphiCoverage.cxx b/Source/CTest/cmParseDelphiCoverage.cxx index 7fe91f4ef2..9ae48d8b41 100644 --- a/Source/CTest/cmParseDelphiCoverage.cxx +++ b/Source/CTest/cmParseDelphiCoverage.cxx @@ -4,8 +4,8 @@ #include "cmCTestCoverageHandler.h" #include "cmSystemTools.h" -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> +#include "cmsys/FStream.hxx" +#include "cmsys/Glob.hxx" #include <stdio.h> #include <stdlib.h> diff --git a/Source/CTest/cmParseDelphiCoverage.h b/Source/CTest/cmParseDelphiCoverage.h index 278fbeb0f1..1b374050a5 100644 --- a/Source/CTest/cmParseDelphiCoverage.h +++ b/Source/CTest/cmParseDelphiCoverage.h @@ -3,7 +3,7 @@ #ifndef cmParseDelphiCoverage_h #define cmParseDelphiCoverage_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/CTest/cmParseGTMCoverage.cxx b/Source/CTest/cmParseGTMCoverage.cxx index 214ce5a17e..15ef059200 100644 --- a/Source/CTest/cmParseGTMCoverage.cxx +++ b/Source/CTest/cmParseGTMCoverage.cxx @@ -4,8 +4,8 @@ #include "cmCTestCoverageHandler.h" #include "cmSystemTools.h" -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> +#include "cmsys/Directory.hxx" +#include "cmsys/FStream.hxx" #include <map> #include <stdio.h> #include <stdlib.h> diff --git a/Source/CTest/cmParseGTMCoverage.h b/Source/CTest/cmParseGTMCoverage.h index 34721ff509..c4949d4168 100644 --- a/Source/CTest/cmParseGTMCoverage.h +++ b/Source/CTest/cmParseGTMCoverage.h @@ -3,7 +3,7 @@ #ifndef cmParseGTMCoverage_h #define cmParseGTMCoverage_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmParseMumpsCoverage.h" diff --git a/Source/CTest/cmParseJacocoCoverage.cxx b/Source/CTest/cmParseJacocoCoverage.cxx index 0e36c010df..d15864a791 100644 --- a/Source/CTest/cmParseJacocoCoverage.cxx +++ b/Source/CTest/cmParseJacocoCoverage.cxx @@ -1,15 +1,15 @@ #include "cmParseJacocoCoverage.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCTest.h" #include "cmCTestCoverageHandler.h" #include "cmSystemTools.h" #include "cmXMLParser.h" -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> +#include "cmsys/Directory.hxx" +#include "cmsys/FStream.hxx" +#include "cmsys/Glob.hxx" #include <stdlib.h> #include <string.h> diff --git a/Source/CTest/cmParseJacocoCoverage.h b/Source/CTest/cmParseJacocoCoverage.h index 04f194961e..f2aec6db92 100644 --- a/Source/CTest/cmParseJacocoCoverage.h +++ b/Source/CTest/cmParseJacocoCoverage.h @@ -3,7 +3,7 @@ #ifndef cmParseJacocoCoverage_h #define cmParseJacocoCoverage_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <map> #include <string> diff --git a/Source/CTest/cmParseMumpsCoverage.cxx b/Source/CTest/cmParseMumpsCoverage.cxx index ab8be768e8..eb29f55c08 100644 --- a/Source/CTest/cmParseMumpsCoverage.cxx +++ b/Source/CTest/cmParseMumpsCoverage.cxx @@ -4,9 +4,9 @@ #include "cmCTestCoverageHandler.h" #include "cmSystemTools.h" -#include <cmConfigure.h> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> +#include "cmConfigure.h" +#include "cmsys/FStream.hxx" +#include "cmsys/Glob.hxx" #include <map> #include <string> #include <utility> diff --git a/Source/CTest/cmParseMumpsCoverage.h b/Source/CTest/cmParseMumpsCoverage.h index c4ed17553c..2c544954b5 100644 --- a/Source/CTest/cmParseMumpsCoverage.h +++ b/Source/CTest/cmParseMumpsCoverage.h @@ -3,7 +3,7 @@ #ifndef cmParseMumpsCoverage_h #define cmParseMumpsCoverage_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <map> #include <string> diff --git a/Source/CTest/cmParsePHPCoverage.cxx b/Source/CTest/cmParsePHPCoverage.cxx index d8bb31bad5..761ebec652 100644 --- a/Source/CTest/cmParsePHPCoverage.cxx +++ b/Source/CTest/cmParsePHPCoverage.cxx @@ -4,8 +4,8 @@ #include "cmCTestCoverageHandler.h" #include "cmSystemTools.h" -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> +#include "cmsys/Directory.hxx" +#include "cmsys/FStream.hxx" #include <stdlib.h> #include <string.h> diff --git a/Source/CTest/cmParsePHPCoverage.h b/Source/CTest/cmParsePHPCoverage.h index 4bcad6df60..ff0e6366da 100644 --- a/Source/CTest/cmParsePHPCoverage.h +++ b/Source/CTest/cmParsePHPCoverage.h @@ -3,7 +3,7 @@ #ifndef cmParsePHPCoverage_h #define cmParsePHPCoverage_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <iosfwd> #include <string> diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index 32ffa6bc54..f4ec6da290 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmProcess.h" -#include <cmConfigure.h> -#include <cmProcessOutput.h> -#include <cmSystemTools.h> +#include "cmConfigure.h" +#include "cmProcessOutput.h" +#include "cmSystemTools.h" #include <iostream> cmProcess::cmProcess() diff --git a/Source/CTest/cmProcess.h b/Source/CTest/cmProcess.h index 9d201d196f..86e905aca1 100644 --- a/Source/CTest/cmProcess.h +++ b/Source/CTest/cmProcess.h @@ -3,9 +3,9 @@ #ifndef cmProcess_h #define cmProcess_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep -#include <cmsys/Process.h> +#include "cmsys/Process.h" #include <string> #include <vector> diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx index ff8e010d7d..1698a848f1 100644 --- a/Source/CursesDialog/ccmake.cxx +++ b/Source/CursesDialog/ccmake.cxx @@ -1,6 +1,6 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCursesForm.h" #include "cmCursesMainForm.h" @@ -10,7 +10,7 @@ #include "cmSystemTools.h" #include "cmake.h" -#include <cmsys/Encoding.hxx> +#include "cmsys/Encoding.hxx" #include <iostream> #include <signal.h> #include <string.h> diff --git a/Source/CursesDialog/cmCursesBoolWidget.h b/Source/CursesDialog/cmCursesBoolWidget.h index f79f7e8ea0..45f01aa516 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.h +++ b/Source/CursesDialog/cmCursesBoolWidget.h @@ -3,7 +3,7 @@ #ifndef cmCursesBoolWidget_h #define cmCursesBoolWidget_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 5539fbe365..cdde1a3380 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -14,8 +14,8 @@ #include "cmSystemTools.h" #include "cmake.h" +#include "cmConfigure.h" #include <assert.h> -#include <cmConfigure.h> #include <vector> cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.h b/Source/CursesDialog/cmCursesCacheEntryComposite.h index 59a1fd7e83..1dbcfa4524 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.h +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h @@ -3,7 +3,7 @@ #ifndef cmCursesCacheEntryComposite_h #define cmCursesCacheEntryComposite_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> diff --git a/Source/CursesDialog/cmCursesDummyWidget.h b/Source/CursesDialog/cmCursesDummyWidget.h index fe43de599d..0381f259c0 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.h +++ b/Source/CursesDialog/cmCursesDummyWidget.h @@ -3,7 +3,7 @@ #ifndef cmCursesDummyWidget_h #define cmCursesDummyWidget_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" diff --git a/Source/CursesDialog/cmCursesFilePathWidget.h b/Source/CursesDialog/cmCursesFilePathWidget.h index 7df7f00afa..b4c04cbcfe 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.h +++ b/Source/CursesDialog/cmCursesFilePathWidget.h @@ -3,7 +3,7 @@ #ifndef cmCursesFilePathWidget_h #define cmCursesFilePathWidget_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmCursesPathWidget.h" diff --git a/Source/CursesDialog/cmCursesForm.cxx b/Source/CursesDialog/cmCursesForm.cxx index 0eb16cbfec..12e5d75b87 100644 --- a/Source/CursesDialog/cmCursesForm.cxx +++ b/Source/CursesDialog/cmCursesForm.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCursesForm.h" -#include <cmConfigure.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 85a80c2d17..7eb94a87ed 100644 --- a/Source/CursesDialog/cmCursesForm.h +++ b/Source/CursesDialog/cmCursesForm.h @@ -3,11 +3,11 @@ #ifndef cmCursesForm_h #define cmCursesForm_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmCursesStandardIncludes.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" class cmCursesForm { diff --git a/Source/CursesDialog/cmCursesLabelWidget.h b/Source/CursesDialog/cmCursesLabelWidget.h index 4d63f483bf..a0de4c6ddb 100644 --- a/Source/CursesDialog/cmCursesLabelWidget.h +++ b/Source/CursesDialog/cmCursesLabelWidget.h @@ -3,7 +3,7 @@ #ifndef cmCursesLabelWidget_h #define cmCursesLabelWidget_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h index e9eae7c19d..ab49c07c66 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.h +++ b/Source/CursesDialog/cmCursesLongMessageForm.h @@ -3,7 +3,7 @@ #ifndef cmCursesLongMessageForm_h #define cmCursesLongMessageForm_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCursesForm.h" #include "cmCursesStandardIncludes.h" diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index d891ea03e9..b91211ec94 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -3,7 +3,7 @@ #ifndef cmCursesMainForm_h #define cmCursesMainForm_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCursesForm.h" #include "cmCursesStandardIncludes.h" diff --git a/Source/CursesDialog/cmCursesOptionsWidget.h b/Source/CursesDialog/cmCursesOptionsWidget.h index 75065a248d..4b2e8b41ad 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.h +++ b/Source/CursesDialog/cmCursesOptionsWidget.h @@ -3,7 +3,7 @@ #ifndef cmCursesOptionsWidget_h #define cmCursesOptionsWidget_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" diff --git a/Source/CursesDialog/cmCursesPathWidget.h b/Source/CursesDialog/cmCursesPathWidget.h index 63ed05b767..097eeca3ea 100644 --- a/Source/CursesDialog/cmCursesPathWidget.h +++ b/Source/CursesDialog/cmCursesPathWidget.h @@ -3,7 +3,7 @@ #ifndef cmCursesPathWidget_h #define cmCursesPathWidget_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCursesStandardIncludes.h" #include "cmCursesStringWidget.h" diff --git a/Source/CursesDialog/cmCursesStandardIncludes.h b/Source/CursesDialog/cmCursesStandardIncludes.h index 7818e3e192..5c59504832 100644 --- a/Source/CursesDialog/cmCursesStandardIncludes.h +++ b/Source/CursesDialog/cmCursesStandardIncludes.h @@ -3,7 +3,7 @@ #ifndef cmCursesStandardIncludes_h #define cmCursesStandardIncludes_h -#include <cmConfigure.h> +#include "cmConfigure.h" #if defined(__hpux) #define _BOOL_DEFINED diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h index b3c1089b58..c07bfcecee 100644 --- a/Source/CursesDialog/cmCursesStringWidget.h +++ b/Source/CursesDialog/cmCursesStringWidget.h @@ -3,7 +3,7 @@ #ifndef cmCursesStringWidget_h #define cmCursesStringWidget_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" diff --git a/Source/CursesDialog/cmCursesWidget.cxx b/Source/CursesDialog/cmCursesWidget.cxx index a9918f7e97..229a050bb5 100644 --- a/Source/CursesDialog/cmCursesWidget.cxx +++ b/Source/CursesDialog/cmCursesWidget.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCursesWidget.h" -#include <cmConfigure.h> +#include "cmConfigure.h" cmCursesWidget::cmCursesWidget(int width, int height, int left, int top) { diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h index d226dd731d..5ce8a75cdc 100644 --- a/Source/CursesDialog/cmCursesWidget.h +++ b/Source/CursesDialog/cmCursesWidget.h @@ -3,7 +3,7 @@ #ifndef cmCursesWidget_h #define cmCursesWidget_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmCursesStandardIncludes.h" #include "cmStateTypes.h" diff --git a/Source/CursesDialog/form/form.h b/Source/CursesDialog/form/form.h index b65a3cafef..39ed75a7c2 100644 --- a/Source/CursesDialog/form/form.h +++ b/Source/CursesDialog/form/form.h @@ -33,7 +33,7 @@ #ifndef FORM_H #define FORM_H -#include <cmFormConfigure.h> +#include "cmFormConfigure.h" /* figure out which curses.h to include */ # if defined(CURSES_HAVE_NCURSES_H) diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index b2f0b2de8c..b955d7755c 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -8,6 +8,9 @@ #include "cmDocumentationEntry.h" #include "cmVersion.h" #include "cmake.h" +#include "cmsys/CommandLineArguments.hxx" +#include "cmsys/Encoding.hxx" +#include "cmsys/SystemTools.hxx" #include <QApplication> #include <QDir> #include <QLocale> @@ -15,9 +18,6 @@ #include <QTextCodec> #include <QTranslator> #include <QtPlugin> -#include <cmsys/CommandLineArguments.hxx> -#include <cmsys/Encoding.hxx> -#include <cmsys/SystemTools.hxx> #include <iostream> #include "cmSystemTools.h" // IWYU pragma: keep diff --git a/Source/QtDialog/Compilers.h b/Source/QtDialog/Compilers.h index 276e2a5d0e..6c8c8f52ab 100644 --- a/Source/QtDialog/Compilers.h +++ b/Source/QtDialog/Compilers.h @@ -3,7 +3,7 @@ #ifndef COMPILERS_HPP #define COMPILERS_HPP -#include <cmConfigure.h> +#include "cmConfigure.h" #include <QWidget> diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index 12f60370da..e14cdf2c92 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -3,7 +3,7 @@ #ifndef QCMake_h #define QCMake_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmake.h" diff --git a/Source/QtDialog/QCMakeWidgets.h b/Source/QtDialog/QCMakeWidgets.h index 0db810cbc9..1ec666ff67 100644 --- a/Source/QtDialog/QCMakeWidgets.h +++ b/Source/QtDialog/QCMakeWidgets.h @@ -3,7 +3,7 @@ #ifndef QCMakeWidgets_h #define QCMakeWidgets_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <QComboBox> #include <QCompleter> diff --git a/Source/QtDialog/RegexExplorer.h b/Source/QtDialog/RegexExplorer.h index caef9753c8..867989279c 100644 --- a/Source/QtDialog/RegexExplorer.h +++ b/Source/QtDialog/RegexExplorer.h @@ -3,8 +3,8 @@ #ifndef RegexExplorer_h #define RegexExplorer_h +#include "cmsys/RegularExpression.hxx" #include <QDialog> -#include <cmsys/RegularExpression.hxx> #include <string> #include "ui_RegexExplorer.h" diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx index 75a2177fdf..6026a57113 100644 --- a/Source/bindexplib.cxx +++ b/Source/bindexplib.cxx @@ -63,8 +63,8 @@ */ #include "bindexplib.h" -#include <cmsys/Encoding.hxx> -#include <cmsys/FStream.hxx> +#include "cmsys/Encoding.hxx" +#include "cmsys/FStream.hxx" #include <iostream> #include <windows.h> diff --git a/Source/bindexplib.h b/Source/bindexplib.h index 51fe49d156..bc904e9f85 100644 --- a/Source/bindexplib.h +++ b/Source/bindexplib.h @@ -3,7 +3,7 @@ #ifndef bindexplib_h #define bindexplib_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <set> #include <stdio.h> diff --git a/Source/cmAddCompileOptionsCommand.h b/Source/cmAddCompileOptionsCommand.h index 71009b4236..105d323100 100644 --- a/Source/cmAddCompileOptionsCommand.h +++ b/Source/cmAddCompileOptionsCommand.h @@ -3,7 +3,8 @@ #ifndef cmAddCompileOptionsCommand_h #define cmAddCompileOptionsCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmAddCustomCommandCommand.h b/Source/cmAddCustomCommandCommand.h index ea921630b7..912a91a4f4 100644 --- a/Source/cmAddCustomCommandCommand.h +++ b/Source/cmAddCustomCommandCommand.h @@ -3,7 +3,8 @@ #ifndef cmAddCustomCommandCommand_h #define cmAddCustomCommandCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmAddCustomTargetCommand.h b/Source/cmAddCustomTargetCommand.h index b6792472fe..c449b10483 100644 --- a/Source/cmAddCustomTargetCommand.h +++ b/Source/cmAddCustomTargetCommand.h @@ -3,7 +3,8 @@ #ifndef cmAddCustomTargetCommand_h #define cmAddCustomTargetCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmAddDefinitionsCommand.h b/Source/cmAddDefinitionsCommand.h index 735f8cc1e0..de4bc1cd95 100644 --- a/Source/cmAddDefinitionsCommand.h +++ b/Source/cmAddDefinitionsCommand.h @@ -3,7 +3,8 @@ #ifndef cmAddDefinitionsCommand_h #define cmAddDefinitionsCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmAddDependenciesCommand.h b/Source/cmAddDependenciesCommand.h index 8be546c6c4..88ac33637e 100644 --- a/Source/cmAddDependenciesCommand.h +++ b/Source/cmAddDependenciesCommand.h @@ -3,7 +3,8 @@ #ifndef cmDependenciessCommand_h #define cmDependenciessCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmAddExecutableCommand.h b/Source/cmAddExecutableCommand.h index 62583d8951..6531829a75 100644 --- a/Source/cmAddExecutableCommand.h +++ b/Source/cmAddExecutableCommand.h @@ -3,7 +3,8 @@ #ifndef cmExecutablesCommand_h #define cmExecutablesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmAddLibraryCommand.h b/Source/cmAddLibraryCommand.h index c23b2998fd..977645ef18 100644 --- a/Source/cmAddLibraryCommand.h +++ b/Source/cmAddLibraryCommand.h @@ -3,7 +3,8 @@ #ifndef cmLibrarysCommand_h #define cmLibrarysCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmAddSubDirectoryCommand.h b/Source/cmAddSubDirectoryCommand.h index 85305e6d05..b19477a459 100644 --- a/Source/cmAddSubDirectoryCommand.h +++ b/Source/cmAddSubDirectoryCommand.h @@ -3,7 +3,8 @@ #ifndef cmAddSubDirectoryCommand_h #define cmAddSubDirectoryCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmAddTestCommand.h b/Source/cmAddTestCommand.h index 07eff6866b..1d6c4cc9d5 100644 --- a/Source/cmAddTestCommand.h +++ b/Source/cmAddTestCommand.h @@ -3,7 +3,8 @@ #ifndef cmAddTestCommand_h #define cmAddTestCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index f5469e545b..70581ad283 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -3,10 +3,10 @@ #ifndef cmAlgorithms_h #define cmAlgorithms_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep +#include "cm_kwiml.h" #include <algorithm> -#include <cm_kwiml.h> #include <functional> #include <iterator> #include <sstream> diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx index 879c2ca36e..0f13b114fd 100644 --- a/Source/cmArchiveWrite.cxx +++ b/Source/cmArchiveWrite.cxx @@ -5,10 +5,10 @@ #include "cmLocale.h" #include "cmSystemTools.h" #include "cm_get_date.h" -#include <cm_libarchive.h> -#include <cmsys/Directory.hxx> -#include <cmsys/Encoding.hxx> -#include <cmsys/FStream.hxx> +#include "cm_libarchive.h" +#include "cmsys/Directory.hxx" +#include "cmsys/Encoding.hxx" +#include "cmsys/FStream.hxx" #include <iostream> #include <string.h> #include <time.h> diff --git a/Source/cmArchiveWrite.h b/Source/cmArchiveWrite.h index 27c62b9231..4c85c0d167 100644 --- a/Source/cmArchiveWrite.h +++ b/Source/cmArchiveWrite.h @@ -3,7 +3,7 @@ #ifndef cmArchiveWrite_h #define cmArchiveWrite_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <iosfwd> #include <stddef.h> diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx index 7cfa4d862d..c92c47b94c 100644 --- a/Source/cmAuxSourceDirectoryCommand.cxx +++ b/Source/cmAuxSourceDirectoryCommand.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmAuxSourceDirectoryCommand.h" +#include "cmsys/Directory.hxx" #include <algorithm> -#include <cmsys/Directory.hxx> #include <stddef.h> #include "cmAlgorithms.h" diff --git a/Source/cmAuxSourceDirectoryCommand.h b/Source/cmAuxSourceDirectoryCommand.h index d99bf7bd89..f8800a5c86 100644 --- a/Source/cmAuxSourceDirectoryCommand.h +++ b/Source/cmAuxSourceDirectoryCommand.h @@ -3,7 +3,8 @@ #ifndef cmAuxSourceDirectoryCommand_h #define cmAuxSourceDirectoryCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmBase32.h b/Source/cmBase32.h index 44bca2f3c7..c6758d4f3b 100644 --- a/Source/cmBase32.h +++ b/Source/cmBase32.h @@ -3,7 +3,7 @@ #ifndef cmBase32_h #define cmBase32_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <stddef.h> #include <string> diff --git a/Source/cmBreakCommand.h b/Source/cmBreakCommand.h index 5113e180dc..8ce5ca264c 100644 --- a/Source/cmBreakCommand.h +++ b/Source/cmBreakCommand.h @@ -3,7 +3,8 @@ #ifndef cmBreakCommand_h #define cmBreakCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmBuildCommand.h b/Source/cmBuildCommand.h index 62f1fd3b5d..7df54ec3d5 100644 --- a/Source/cmBuildCommand.h +++ b/Source/cmBuildCommand.h @@ -3,7 +3,8 @@ #ifndef cmBuildCommand_h #define cmBuildCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx index 93e5ca2763..9d2c0c642c 100644 --- a/Source/cmBuildNameCommand.cxx +++ b/Source/cmBuildNameCommand.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmBuildNameCommand.h" +#include "cmsys/RegularExpression.hxx" #include <algorithm> -#include <cmsys/RegularExpression.hxx> #include "cmMakefile.h" #include "cmStateTypes.h" diff --git a/Source/cmBuildNameCommand.h b/Source/cmBuildNameCommand.h index 1e1f4b566f..00f645aa40 100644 --- a/Source/cmBuildNameCommand.h +++ b/Source/cmBuildNameCommand.h @@ -3,7 +3,8 @@ #ifndef cmBuildNameCommand_h #define cmBuildNameCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmCLocaleEnvironmentScope.h b/Source/cmCLocaleEnvironmentScope.h index 32cc8dfe39..c4065e1310 100644 --- a/Source/cmCLocaleEnvironmentScope.h +++ b/Source/cmCLocaleEnvironmentScope.h @@ -3,7 +3,7 @@ #ifndef cmCLocaleEnvironmentScope_h #define cmCLocaleEnvironmentScope_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <map> #include <string> diff --git a/Source/cmCMakeHostSystemInformationCommand.h b/Source/cmCMakeHostSystemInformationCommand.h index 22f3d54dda..fe148a36ac 100644 --- a/Source/cmCMakeHostSystemInformationCommand.h +++ b/Source/cmCMakeHostSystemInformationCommand.h @@ -3,7 +3,8 @@ #ifndef cmCMakeHostSystemInformationCommand_h #define cmCMakeHostSystemInformationCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <stddef.h> #include <string> #include <vector> diff --git a/Source/cmCMakeMinimumRequired.h b/Source/cmCMakeMinimumRequired.h index 08a5c38e80..8db0860096 100644 --- a/Source/cmCMakeMinimumRequired.h +++ b/Source/cmCMakeMinimumRequired.h @@ -3,7 +3,8 @@ #ifndef cmCMakeMinimumRequired_h #define cmCMakeMinimumRequired_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmCMakePolicyCommand.h b/Source/cmCMakePolicyCommand.h index 409fc59be1..789e2946e6 100644 --- a/Source/cmCMakePolicyCommand.h +++ b/Source/cmCMakePolicyCommand.h @@ -3,7 +3,8 @@ #ifndef cmCMakePolicyCommand_h #define cmCMakePolicyCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmCPackPropertiesGenerator.h b/Source/cmCPackPropertiesGenerator.h index 37c6039297..6df52976f9 100644 --- a/Source/cmCPackPropertiesGenerator.h +++ b/Source/cmCPackPropertiesGenerator.h @@ -3,7 +3,7 @@ #ifndef cmCPackPropertiesGenerator_h #define cmCPackPropertiesGenerator_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmScriptGenerator.h" diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index e6e50e9e70..46fa86e35f 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2,15 +2,15 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCTest.h" -#include <cm_curl.h> -#include <cm_zlib.h> -#include <cmsys/Base64.h> -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/Process.h> -#include <cmsys/String.hxx> -#include <cmsys/SystemInformation.hxx> +#include "cm_curl.h" +#include "cm_zlib.h" +#include "cmsys/Base64.h" +#include "cmsys/Directory.hxx" +#include "cmsys/FStream.hxx" +#include "cmsys/Glob.hxx" +#include "cmsys/Process.h" +#include "cmsys/String.hxx" +#include "cmsys/SystemInformation.hxx" #include <ctype.h> #include <iostream> #include <map> diff --git a/Source/cmCTest.h b/Source/cmCTest.h index be736da9e9..60f3295e7f 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -3,10 +3,10 @@ #ifndef cmCTest_h #define cmCTest_h -#include <cmConfigure.h> +#include "cmConfigure.h" -#include <cmProcessOutput.h> -#include <cmsys/String.hxx> +#include "cmProcessOutput.h" +#include "cmsys/String.hxx" #include <map> #include <set> #include <sstream> diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index cb0ba63a6d..f7fefca6b6 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCacheManager.h" +#include "cmsys/FStream.hxx" +#include "cmsys/Glob.hxx" #include <algorithm> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> #include <sstream> #include <stdio.h> #include <string.h> diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index e82c9ef3ee..a72d6cb3e5 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -3,7 +3,7 @@ #ifndef cmCacheManager_h #define cmCacheManager_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <iosfwd> #include <map> diff --git a/Source/cmCallVisualStudioMacro.h b/Source/cmCallVisualStudioMacro.h index e9d34e56b4..ad35d306af 100644 --- a/Source/cmCallVisualStudioMacro.h +++ b/Source/cmCallVisualStudioMacro.h @@ -3,7 +3,7 @@ #ifndef cmCallVisualStudioMacro_h #define cmCallVisualStudioMacro_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <string> diff --git a/Source/cmCommand.h b/Source/cmCommand.h index 9107d85f16..f4a75d541d 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -3,7 +3,8 @@ #ifndef cmCommand_h #define cmCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmCommandArgumentParser.cxx b/Source/cmCommandArgumentParser.cxx index 4a7acfc1d1..aed0826c0d 100644 --- a/Source/cmCommandArgumentParser.cxx +++ b/Source/cmCommandArgumentParser.cxx @@ -85,7 +85,7 @@ Modify cmCommandArgumentParser.cxx: */ -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string.h> diff --git a/Source/cmCommandArgumentParser.y b/Source/cmCommandArgumentParser.y index d71b605d61..d6c83124e2 100644 --- a/Source/cmCommandArgumentParser.y +++ b/Source/cmCommandArgumentParser.y @@ -14,7 +14,7 @@ Modify cmCommandArgumentParser.cxx: */ -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string.h> diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 1222d5a0b5..153efc4f01 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -8,7 +8,7 @@ #include "cmSystemTools.h" #include "cmake.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iostream> #include <sstream> #include <string.h> diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h index 5bfb236eaa..2b65a5aaef 100644 --- a/Source/cmCommandArgumentParserHelper.h +++ b/Source/cmCommandArgumentParserHelper.h @@ -3,7 +3,7 @@ #ifndef cmCommandArgumentParserHelper_h #define cmCommandArgumentParserHelper_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmCommandArgumentsHelper.h b/Source/cmCommandArgumentsHelper.h index b19b0f928c..44db374d66 100644 --- a/Source/cmCommandArgumentsHelper.h +++ b/Source/cmCommandArgumentsHelper.h @@ -3,7 +3,7 @@ #ifndef cmCommandArgumentsHelper_h #define cmCommandArgumentsHelper_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <set> #include <string> diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index fe2c0fe19f..178a7ced04 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCommonTargetGenerator.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <set> #include <sstream> #include <utility> diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h index 425ff910aa..8ba2e22c39 100644 --- a/Source/cmCommonTargetGenerator.h +++ b/Source/cmCommonTargetGenerator.h @@ -3,7 +3,8 @@ #ifndef cmCommonTargetGenerator_h #define cmCommonTargetGenerator_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep + #include <map> #include <string> #include <vector> diff --git a/Source/cmComputeComponentGraph.h b/Source/cmComputeComponentGraph.h index 608dedc1ee..8cd4fe73a9 100644 --- a/Source/cmComputeComponentGraph.h +++ b/Source/cmComputeComponentGraph.h @@ -3,7 +3,7 @@ #ifndef cmComputeComponentGraph_h #define cmComputeComponentGraph_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmGraphAdjacencyList.h" diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index 6a4e8e0019..195b5444e7 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -3,7 +3,7 @@ #ifndef cmComputeLinkDepends_h #define cmComputeLinkDepends_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmGraphAdjacencyList.h" #include "cmLinkItem.h" diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h index 3d26ea7972..60878e4b20 100644 --- a/Source/cmComputeLinkInformation.h +++ b/Source/cmComputeLinkInformation.h @@ -3,9 +3,9 @@ #ifndef cmComputeLinkInformation_h #define cmComputeLinkInformation_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <iosfwd> #include <set> #include <string> diff --git a/Source/cmComputeTargetDepends.h b/Source/cmComputeTargetDepends.h index 2b6591f653..ccf99def82 100644 --- a/Source/cmComputeTargetDepends.h +++ b/Source/cmComputeTargetDepends.h @@ -3,7 +3,7 @@ #ifndef cmComputeTargetDepends_h #define cmComputeTargetDepends_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmGraphAdjacencyList.h" diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index f2eb6019b0..bcfbfbe902 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmConditionEvaluator.h" +#include "cmConfigure.h" +#include "cmsys/RegularExpression.hxx" #include <algorithm> -#include <cmConfigure.h> -#include <cmsys/RegularExpression.hxx> #include <sstream> #include <stdio.h> #include <stdlib.h> diff --git a/Source/cmConditionEvaluator.h b/Source/cmConditionEvaluator.h index 5815177d56..50f4edc4fa 100644 --- a/Source/cmConditionEvaluator.h +++ b/Source/cmConditionEvaluator.h @@ -3,7 +3,7 @@ #ifndef cmConditionEvaluator_h #define cmConditionEvaluator_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <list> #include <string> diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 5f89ba1330..e30b43f9cd 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -3,7 +3,7 @@ #ifndef cmConfigure_h #define cmConfigure_h -#include <cmsys/Configure.hxx> // IWYU pragma: export +#include "cmsys/Configure.hxx" // IWYU pragma: export #ifdef _MSC_VER #pragma warning(disable : 4786) diff --git a/Source/cmConfigureFileCommand.h b/Source/cmConfigureFileCommand.h index e558b85ff2..882219d2f0 100644 --- a/Source/cmConfigureFileCommand.h +++ b/Source/cmConfigureFileCommand.h @@ -3,7 +3,8 @@ #ifndef cmConfigureFileCommand_h #define cmConfigureFileCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmContinueCommand.h b/Source/cmContinueCommand.h index c5b8919370..4428d79033 100644 --- a/Source/cmContinueCommand.h +++ b/Source/cmContinueCommand.h @@ -3,7 +3,8 @@ #ifndef cmContinueCommand_h #define cmContinueCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index fd9d04b307..2287bc2d78 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCoreTryCompile.h" -#include <cmConfigure.h> -#include <cmsys/Directory.hxx> +#include "cmConfigure.h" +#include "cmsys/Directory.hxx" #include <set> #include <sstream> #include <stdio.h> diff --git a/Source/cmCoreTryCompile.h b/Source/cmCoreTryCompile.h index 4b96aedbf3..365154dfb0 100644 --- a/Source/cmCoreTryCompile.h +++ b/Source/cmCoreTryCompile.h @@ -3,7 +3,7 @@ #ifndef cmCoreTryCompile_h #define cmCoreTryCompile_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmCreateTestSourceList.h b/Source/cmCreateTestSourceList.h index 5e003cfc18..47391f383a 100644 --- a/Source/cmCreateTestSourceList.h +++ b/Source/cmCreateTestSourceList.h @@ -3,7 +3,7 @@ #ifndef cmCreateTestSourceList_h #define cmCreateTestSourceList_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <string> #include <vector> diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx index d5807b1790..7995b2cb34 100644 --- a/Source/cmCryptoHash.cxx +++ b/Source/cmCryptoHash.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCryptoHash.h" -#include <cm_kwiml.h> -#include <cm_rhash.h> -#include <cmsys/FStream.hxx> +#include "cm_kwiml.h" +#include "cm_rhash.h" +#include "cmsys/FStream.hxx" #include <string.h> static unsigned int const cmCryptoHashAlgoToId[] = { diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h index 0b562da8d8..021ad10283 100644 --- a/Source/cmCryptoHash.h +++ b/Source/cmCryptoHash.h @@ -3,7 +3,7 @@ #ifndef cmCryptoHash_h #define cmCryptoHash_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <stddef.h> #include <string> diff --git a/Source/cmCurl.h b/Source/cmCurl.h index 60ab9fe203..a2fa4b1c0a 100644 --- a/Source/cmCurl.h +++ b/Source/cmCurl.h @@ -3,9 +3,9 @@ #ifndef cmCurl_h #define cmCurl_h -#include <cmConfigure.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 050de17bfb..5e377b5740 100644 --- a/Source/cmCustomCommand.cxx +++ b/Source/cmCustomCommand.cxx @@ -4,7 +4,7 @@ #include "cmMakefile.h" -#include <cmConfigure.h> +#include "cmConfigure.h" cmCustomCommand::cmCustomCommand() : Backtrace() diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h index 73d53ff163..9e82f2505c 100644 --- a/Source/cmCustomCommand.h +++ b/Source/cmCustomCommand.h @@ -3,7 +3,7 @@ #ifndef cmCustomCommand_h #define cmCustomCommand_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmCustomCommandLines.h" #include "cmListFileCache.h" diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 8f4ff4b2fd..67213ecaa3 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -13,7 +13,7 @@ #include "cmSystemTools.h" #include "cm_auto_ptr.hxx" -#include <cmConfigure.h> +#include "cmConfigure.h" cmCustomCommandGenerator::cmCustomCommandGenerator(cmCustomCommand const& cc, const std::string& config, diff --git a/Source/cmCustomCommandGenerator.h b/Source/cmCustomCommandGenerator.h index 286aaf3329..0a2adb524d 100644 --- a/Source/cmCustomCommandGenerator.h +++ b/Source/cmCustomCommandGenerator.h @@ -3,8 +3,8 @@ #ifndef cmCustomCommandGenerator_h #define cmCustomCommandGenerator_h +#include "cmConfigure.h" // IWYU pragma: keep #include "cmCustomCommandLines.h" -#include <cmConfigure.h> // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmCustomCommandLines.h b/Source/cmCustomCommandLines.h index 87ed4e80a9..36838f23fd 100644 --- a/Source/cmCustomCommandLines.h +++ b/Source/cmCustomCommandLines.h @@ -3,7 +3,7 @@ #ifndef cmCustomCommandLines_h #define cmCustomCommandLines_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmDefinePropertyCommand.h b/Source/cmDefinePropertyCommand.h index 02e5b883fc..7a6e127f18 100644 --- a/Source/cmDefinePropertyCommand.h +++ b/Source/cmDefinePropertyCommand.h @@ -3,7 +3,8 @@ #ifndef cmDefinesPropertyCommand_h #define cmDefinesPropertyCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx index 47fe76a6b9..7aa7641e16 100644 --- a/Source/cmDefinitions.cxx +++ b/Source/cmDefinitions.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDefinitions.h" +#include "cmConfigure.h" #include <assert.h> -#include <cmConfigure.h> #include <set> #include <utility> diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index ad406653d0..160e8e1a90 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -3,7 +3,7 @@ #ifndef cmDefinitions_h #define cmDefinitions_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index b8c76b92dd..c898d12ba0 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -9,7 +9,7 @@ #include "cmSystemTools.h" #include "cmWorkingDirectory.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include <sstream> #include <string.h> #include <utility> diff --git a/Source/cmDepends.h b/Source/cmDepends.h index f677f802da..a80b585404 100644 --- a/Source/cmDepends.h +++ b/Source/cmDepends.h @@ -3,7 +3,7 @@ #ifndef cmDepends_h #define cmDepends_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <map> diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index 9d4b9cc10f..3b8451660c 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDependsC.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include <utility> #include "cmAlgorithms.h" diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h index 3b5eb62df0..4f52826c7c 100644 --- a/Source/cmDependsC.h +++ b/Source/cmDependsC.h @@ -3,11 +3,11 @@ #ifndef cmDependsC_h #define cmDependsC_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmDepends.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <iosfwd> #include <map> #include <queue> diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 7927402af2..8b05fab492 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDependsFortran.h" +#include "cmsys/FStream.hxx" #include <assert.h> -#include <cmsys/FStream.hxx> #include <iostream> #include <map> #include <stdlib.h> diff --git a/Source/cmDependsFortran.h b/Source/cmDependsFortran.h index 90b82d44e7..a9a1ed39be 100644 --- a/Source/cmDependsFortran.h +++ b/Source/cmDependsFortran.h @@ -3,7 +3,8 @@ #ifndef cmFortran_h #define cmFortran_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <iosfwd> #include <set> #include <string> diff --git a/Source/cmDependsJava.h b/Source/cmDependsJava.h index 1b9cca58fc..6efa51a60e 100644 --- a/Source/cmDependsJava.h +++ b/Source/cmDependsJava.h @@ -3,7 +3,7 @@ #ifndef cmDependsJava_h #define cmDependsJava_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmDepends.h" diff --git a/Source/cmDependsJavaParser.cxx b/Source/cmDependsJavaParser.cxx index b09bd0c2eb..bc45d45e17 100644 --- a/Source/cmDependsJavaParser.cxx +++ b/Source/cmDependsJavaParser.cxx @@ -85,7 +85,7 @@ Modify cmDependsJavaParser.cxx: */ -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <stdlib.h> #include <string.h> diff --git a/Source/cmDependsJavaParser.y b/Source/cmDependsJavaParser.y index 150ac92eba..1137f39016 100644 --- a/Source/cmDependsJavaParser.y +++ b/Source/cmDependsJavaParser.y @@ -14,7 +14,7 @@ Modify cmDependsJavaParser.cxx: */ -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <stdlib.h> #include <string.h> diff --git a/Source/cmDependsJavaParserHelper.cxx b/Source/cmDependsJavaParserHelper.cxx index f5998ef44a..7bc91bfd4e 100644 --- a/Source/cmDependsJavaParserHelper.cxx +++ b/Source/cmDependsJavaParserHelper.cxx @@ -2,12 +2,12 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDependsJavaParserHelper.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmDependsJavaLexer.h" #include "cmSystemTools.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include <iostream> #include <stdio.h> #include <stdlib.h> diff --git a/Source/cmDependsJavaParserHelper.h b/Source/cmDependsJavaParserHelper.h index 5f28f70ad3..0b445d9244 100644 --- a/Source/cmDependsJavaParserHelper.h +++ b/Source/cmDependsJavaParserHelper.h @@ -3,7 +3,7 @@ #ifndef cmDependsJavaParserHelper_h #define cmDependsJavaParserHelper_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmDisallowedCommand.h b/Source/cmDisallowedCommand.h index 00b0183e13..7c141dd056 100644 --- a/Source/cmDisallowedCommand.h +++ b/Source/cmDisallowedCommand.h @@ -3,7 +3,8 @@ #ifndef cmDisallowedCommand_h #define cmDisallowedCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index cb24adf853..5f25113218 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -9,9 +9,9 @@ #include "cmSystemTools.h" #include "cmVersion.h" +#include "cmsys/FStream.hxx" +#include "cmsys/Glob.hxx" #include <algorithm> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> #include <ctype.h> #include <string.h> #include <utility> diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h index 66afd2cc66..2866fef030 100644 --- a/Source/cmDocumentation.h +++ b/Source/cmDocumentation.h @@ -3,7 +3,7 @@ #ifndef _cmDocumentation_h #define _cmDocumentation_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmDocumentationFormatter.h" diff --git a/Source/cmDocumentationEntry.h b/Source/cmDocumentationEntry.h index 1ccb82db3a..ea43b88c3b 100644 --- a/Source/cmDocumentationEntry.h +++ b/Source/cmDocumentationEntry.h @@ -3,7 +3,7 @@ #ifndef cmDocumentationEntry_h #define cmDocumentationEntry_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h index ffa80f1131..1f04250c9d 100644 --- a/Source/cmDocumentationFormatter.h +++ b/Source/cmDocumentationFormatter.h @@ -3,7 +3,7 @@ #ifndef _cmDocumentationFormatter_h #define _cmDocumentationFormatter_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <iosfwd> diff --git a/Source/cmDocumentationSection.h b/Source/cmDocumentationSection.h index c1eb5c8eac..d9e8187f8c 100644 --- a/Source/cmDocumentationSection.h +++ b/Source/cmDocumentationSection.h @@ -3,7 +3,7 @@ #ifndef _cmDocumentationSection_h #define _cmDocumentationSection_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmDocumentationEntry.h" diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx index 39a59fc025..76a4a2946a 100644 --- a/Source/cmDynamicLoader.cxx +++ b/Source/cmDynamicLoader.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmDynamicLoader.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <map> #include <string> diff --git a/Source/cmDynamicLoader.h b/Source/cmDynamicLoader.h index 5d69400966..dd69b40071 100644 --- a/Source/cmDynamicLoader.h +++ b/Source/cmDynamicLoader.h @@ -8,7 +8,7 @@ #ifndef cmDynamicLoader_h #define cmDynamicLoader_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmsys/DynamicLoader.hxx" // IWYU pragma: export diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 0655da9648..2a8137f13f 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmELF.h" -#include <cm_auto_ptr.hxx> -#include <cm_kwiml.h> -#include <cmsys/FStream.hxx> +#include "cm_auto_ptr.hxx" +#include "cm_kwiml.h" +#include "cmsys/FStream.hxx" #include <map> #include <sstream> #include <stddef.h> diff --git a/Source/cmELF.h b/Source/cmELF.h index 763a24030d..a6e407fe1f 100644 --- a/Source/cmELF.h +++ b/Source/cmELF.h @@ -3,7 +3,7 @@ #ifndef cmELF_h #define cmELF_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <string> diff --git a/Source/cmEnableLanguageCommand.h b/Source/cmEnableLanguageCommand.h index bafb79e832..0748283705 100644 --- a/Source/cmEnableLanguageCommand.h +++ b/Source/cmEnableLanguageCommand.h @@ -3,7 +3,8 @@ #ifndef cmEnableLanguageCommand_h #define cmEnableLanguageCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmEnableTestingCommand.h b/Source/cmEnableTestingCommand.h index 67cd237bbf..b4ac068a22 100644 --- a/Source/cmEnableTestingCommand.h +++ b/Source/cmEnableTestingCommand.h @@ -3,7 +3,8 @@ #ifndef cmEnableTestingCommand_h #define cmEnableTestingCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx index 6a7292d6cb..fcc3c45c6a 100644 --- a/Source/cmExecProgramCommand.cxx +++ b/Source/cmExecProgramCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExecProgramCommand.h" -#include <cmsys/Process.h> +#include "cmsys/Process.h" #include <stdio.h> #include "cmMakefile.h" diff --git a/Source/cmExecProgramCommand.h b/Source/cmExecProgramCommand.h index 58e948e559..53d35cf30c 100644 --- a/Source/cmExecProgramCommand.h +++ b/Source/cmExecProgramCommand.h @@ -3,7 +3,8 @@ #ifndef cmExecProgramCommand_h #define cmExecProgramCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index 92cdf647d1..8c10dbe29a 100644 --- a/Source/cmExecuteProcessCommand.cxx +++ b/Source/cmExecuteProcessCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExecuteProcessCommand.h" -#include <cmsys/Process.h> +#include "cmsys/Process.h" #include <ctype.h> /* isspace */ #include <sstream> #include <stdio.h> diff --git a/Source/cmExecuteProcessCommand.h b/Source/cmExecuteProcessCommand.h index 9ce4338c6c..65e16d4378 100644 --- a/Source/cmExecuteProcessCommand.h +++ b/Source/cmExecuteProcessCommand.h @@ -3,7 +3,8 @@ #ifndef cmExecuteProcessCommand_h #define cmExecuteProcessCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmExpandedCommandArgument.h b/Source/cmExpandedCommandArgument.h index 9770fe68c4..fe86528db5 100644 --- a/Source/cmExpandedCommandArgument.h +++ b/Source/cmExpandedCommandArgument.h @@ -3,7 +3,7 @@ #ifndef cmExpandedCommandArgument_h #define cmExpandedCommandArgument_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> diff --git a/Source/cmExportBuildAndroidMKGenerator.h b/Source/cmExportBuildAndroidMKGenerator.h index 2a5a42e763..d028ef48dc 100644 --- a/Source/cmExportBuildAndroidMKGenerator.h +++ b/Source/cmExportBuildAndroidMKGenerator.h @@ -3,7 +3,7 @@ #ifndef cmExportBuildAndroidMKGenerator_h #define cmExportBuildAndroidMKGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <string> diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index 0c25268972..539d8541e4 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -185,9 +185,7 @@ void cmExportBuildFileGenerator::SetImportLocationProperty( } // Add the import library for windows DLLs. - if (target->IsDLLPlatform() && - (target->GetType() == cmStateEnums::SHARED_LIBRARY || - target->IsExecutableWithExports()) && + if (target->HasImportLibrary() && mf->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX")) { std::string prop = "IMPORTED_IMPLIB"; prop += suffix; diff --git a/Source/cmExportBuildFileGenerator.h b/Source/cmExportBuildFileGenerator.h index 0539b6aa49..0556983ac5 100644 --- a/Source/cmExportBuildFileGenerator.h +++ b/Source/cmExportBuildFileGenerator.h @@ -3,7 +3,7 @@ #ifndef cmExportBuildFileGenerator_h #define cmExportBuildFileGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmExportFileGenerator.h" diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index 09c01e9551..691048b812 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExportCommand.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <map> #include <sstream> diff --git a/Source/cmExportCommand.h b/Source/cmExportCommand.h index a0224d0c40..b95ea86ada 100644 --- a/Source/cmExportCommand.h +++ b/Source/cmExportCommand.h @@ -3,7 +3,8 @@ #ifndef cmExportCommand_h #define cmExportCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 6c21eaf402..5875f9e96f 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -17,9 +17,9 @@ #include "cmTargetExport.h" #include "cmake.h" +#include "cm_auto_ptr.hxx" +#include "cmsys/FStream.hxx" #include <assert.h> -#include <cm_auto_ptr.hxx> -#include <cmsys/FStream.hxx> #include <sstream> #include <string.h> #include <utility> diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index e7712d24d2..985c8f6bc6 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -3,7 +3,7 @@ #ifndef cmExportFileGenerator_h #define cmExportFileGenerator_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmGeneratorExpression.h" #include "cmVersion.h" diff --git a/Source/cmExportInstallAndroidMKGenerator.h b/Source/cmExportInstallAndroidMKGenerator.h index f2f8927f79..ebef783658 100644 --- a/Source/cmExportInstallAndroidMKGenerator.h +++ b/Source/cmExportInstallAndroidMKGenerator.h @@ -3,7 +3,7 @@ #ifndef cmExportInstallAndroidMKGenerator_h #define cmExportInstallAndroidMKGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <set> diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index 3c9777a23d..8fa9b7f882 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -3,7 +3,7 @@ #ifndef cmExportInstallFileGenerator_h #define cmExportInstallFileGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmExportFileGenerator.h" diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index deecad84e5..69150aee44 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExportLibraryDependenciesCommand.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include <map> #include <utility> diff --git a/Source/cmExportLibraryDependenciesCommand.h b/Source/cmExportLibraryDependenciesCommand.h index be53349623..4d3e36e039 100644 --- a/Source/cmExportLibraryDependenciesCommand.h +++ b/Source/cmExportLibraryDependenciesCommand.h @@ -3,7 +3,8 @@ #ifndef cmExportLibraryDependenciesCommand_h #define cmExportLibraryDependenciesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmExportSet.h b/Source/cmExportSet.h index 420f472d21..58ad617d4e 100644 --- a/Source/cmExportSet.h +++ b/Source/cmExportSet.h @@ -3,7 +3,7 @@ #ifndef cmExportSet_h #define cmExportSet_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmExportSetMap.h b/Source/cmExportSetMap.h index 509069289e..0f71c790c9 100644 --- a/Source/cmExportSetMap.h +++ b/Source/cmExportSetMap.h @@ -3,7 +3,7 @@ #ifndef cmExportSetMap_h #define cmExportSetMap_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <map> #include <string> diff --git a/Source/cmExportTryCompileFileGenerator.h b/Source/cmExportTryCompileFileGenerator.h index 88a70a1b64..9671fac8fe 100644 --- a/Source/cmExportTryCompileFileGenerator.h +++ b/Source/cmExportTryCompileFileGenerator.h @@ -3,7 +3,7 @@ #ifndef cmExportTryCompileFileGenerator_h #define cmExportTryCompileFileGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmExportFileGenerator.h" diff --git a/Source/cmExprParser.cxx b/Source/cmExprParser.cxx index a9088a61c3..19efca1f03 100644 --- a/Source/cmExprParser.cxx +++ b/Source/cmExprParser.cxx @@ -85,7 +85,7 @@ Modify cmExprParser.cxx: */ -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <stdlib.h> #include <string.h> diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y index 042966380e..220f7c8e4c 100644 --- a/Source/cmExprParser.y +++ b/Source/cmExprParser.y @@ -14,7 +14,7 @@ Modify cmExprParser.cxx: */ -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <stdlib.h> #include <string.h> diff --git a/Source/cmExprParserHelper.cxx b/Source/cmExprParserHelper.cxx index 1b49def248..c3f026a4e5 100644 --- a/Source/cmExprParserHelper.cxx +++ b/Source/cmExprParserHelper.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExprParserHelper.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmExprLexer.h" diff --git a/Source/cmExprParserHelper.h b/Source/cmExprParserHelper.h index df365fce8f..dcdaca967d 100644 --- a/Source/cmExprParserHelper.h +++ b/Source/cmExprParserHelper.h @@ -3,7 +3,7 @@ #ifndef cmExprParserHelper_h #define cmExprParserHelper_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmExternalMakefileProjectGenerator.h b/Source/cmExternalMakefileProjectGenerator.h index c49d39b5f8..6b8903790f 100644 --- a/Source/cmExternalMakefileProjectGenerator.h +++ b/Source/cmExternalMakefileProjectGenerator.h @@ -3,7 +3,7 @@ #ifndef cmExternalMakefileProjectGenerator_h #define cmExternalMakefileProjectGenerator_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmExtraCodeBlocksGenerator.h b/Source/cmExtraCodeBlocksGenerator.h index 06aadc47c3..450a9d02c5 100644 --- a/Source/cmExtraCodeBlocksGenerator.h +++ b/Source/cmExtraCodeBlocksGenerator.h @@ -3,7 +3,7 @@ #ifndef cmExtraCodeBlocksGenerator_h #define cmExtraCodeBlocksGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmExternalMakefileProjectGenerator.h" diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index 856d42eee7..98eebe614f 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -13,7 +13,7 @@ #include "cmXMLWriter.h" #include "cmake.h" -#include <cmsys/SystemInformation.hxx> +#include "cmsys/SystemInformation.hxx" #include <map> #include <set> #include <sstream> diff --git a/Source/cmExtraCodeLiteGenerator.h b/Source/cmExtraCodeLiteGenerator.h index 3263eb61d2..de330988d7 100644 --- a/Source/cmExtraCodeLiteGenerator.h +++ b/Source/cmExtraCodeLiteGenerator.h @@ -3,7 +3,7 @@ #ifndef cmGlobalCodeLiteGenerator_h #define cmGlobalCodeLiteGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmExternalMakefileProjectGenerator.h" diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index b4fc771c28..8d1adc7dd7 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExtraEclipseCDT4Generator.h" +#include "cmsys/RegularExpression.hxx" #include <algorithm> #include <assert.h> -#include <cmsys/RegularExpression.hxx> #include <map> #include <sstream> #include <stdio.h> diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h index fe7117286e..1380d18674 100644 --- a/Source/cmExtraEclipseCDT4Generator.h +++ b/Source/cmExtraEclipseCDT4Generator.h @@ -3,7 +3,7 @@ #ifndef cmExtraEclipseCDT4Generator_h #define cmExtraEclipseCDT4Generator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmExternalMakefileProjectGenerator.h" diff --git a/Source/cmExtraKateGenerator.h b/Source/cmExtraKateGenerator.h index badaca94fd..6b9c7af5ca 100644 --- a/Source/cmExtraKateGenerator.h +++ b/Source/cmExtraKateGenerator.h @@ -3,7 +3,7 @@ #ifndef cmExtraKateGenerator_h #define cmExtraKateGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmExternalMakefileProjectGenerator.h" diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 36ba520c6f..1fd1418de9 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExtraSublimeTextGenerator.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <set> #include <sstream> #include <string.h> diff --git a/Source/cmExtraSublimeTextGenerator.h b/Source/cmExtraSublimeTextGenerator.h index a860d34085..9022d3754b 100644 --- a/Source/cmExtraSublimeTextGenerator.h +++ b/Source/cmExtraSublimeTextGenerator.h @@ -3,7 +3,7 @@ #ifndef cmExtraSublimeTextGenerator_h #define cmExtraSublimeTextGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmExternalMakefileProjectGenerator.h" diff --git a/Source/cmFLTKWrapUICommand.h b/Source/cmFLTKWrapUICommand.h index 835f0a7ee8..7dde9c1722 100644 --- a/Source/cmFLTKWrapUICommand.h +++ b/Source/cmFLTKWrapUICommand.h @@ -3,7 +3,8 @@ #ifndef cmFLTKWrapUICommand_h #define cmFLTKWrapUICommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 63012a56a6..034a2668a2 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2,14 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFileCommand.h" +#include "cm_kwiml.h" +#include "cmsys/Directory.hxx" +#include "cmsys/FStream.hxx" +#include "cmsys/Glob.hxx" +#include "cmsys/RegularExpression.hxx" +#include "cmsys/String.hxx" #include <algorithm> #include <assert.h> -#include <cm_kwiml.h> -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/RegularExpression.hxx> -#include <cmsys/String.hxx> #include <list> #include <sstream> #include <stdio.h> @@ -37,7 +37,7 @@ #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmCurl.h" #include "cmFileLockResult.h" -#include <cm_curl.h> +#include "cm_curl.h" #endif #if defined(CMAKE_USE_ELF_PARSER) @@ -1147,6 +1147,7 @@ protected: bool UseGivenPermissionsDir; bool UseSourcePermissions; std::string Destination; + std::string FilesFromDir; std::vector<std::string> Files; int Doing; @@ -1156,6 +1157,7 @@ protected: DoingNone, DoingError, DoingDestination, + DoingFilesFromDir, DoingFiles, DoingPattern, DoingRegex, @@ -1251,6 +1253,12 @@ bool cmFileCopier::CheckKeyword(std::string const& arg) } else { this->Doing = DoingDestination; } + } else if (arg == "FILES_FROM_DIR") { + if (this->CurrentMatchRule) { + this->NotAfterMatch(arg); + } else { + this->Doing = DoingFilesFromDir; + } } else if (arg == "PATTERN") { this->Doing = DoingPattern; } else if (arg == "REGEX") { @@ -1314,13 +1322,7 @@ bool cmFileCopier::CheckValue(std::string const& arg) { switch (this->Doing) { case DoingFiles: - if (arg.empty() || cmSystemTools::FileIsFullPath(arg.c_str())) { - this->Files.push_back(arg); - } else { - std::string file = this->Makefile->GetCurrentSourceDirectory(); - file += "/" + arg; - this->Files.push_back(file); - } + this->Files.push_back(arg); break; case DoingDestination: if (arg.empty() || cmSystemTools::FileIsFullPath(arg.c_str())) { @@ -1331,6 +1333,16 @@ bool cmFileCopier::CheckValue(std::string const& arg) } this->Doing = DoingNone; break; + case DoingFilesFromDir: + if (cmSystemTools::FileIsFullPath(arg.c_str())) { + this->FilesFromDir = arg; + } else { + this->FilesFromDir = this->Makefile->GetCurrentSourceDirectory(); + this->FilesFromDir += "/" + arg; + } + cmSystemTools::ConvertToUnixSlashes(this->FilesFromDir); + this->Doing = DoingNone; + break; case DoingPattern: { // Convert the pattern to a regular expression. Require a // leading slash and trailing end-of-string in the matched @@ -1390,17 +1402,41 @@ bool cmFileCopier::Run(std::vector<std::string> const& args) return false; } - std::vector<std::string> const& files = this->Files; - for (std::vector<std::string>::size_type i = 0; i < files.size(); ++i) { + for (std::vector<std::string>::const_iterator i = this->Files.begin(); + i != this->Files.end(); ++i) { + std::string file; + if (!i->empty() && !cmSystemTools::FileIsFullPath(*i)) { + if (!this->FilesFromDir.empty()) { + file = this->FilesFromDir; + } else { + file = this->Makefile->GetCurrentSourceDirectory(); + } + file += "/"; + file += *i; + } else if (!this->FilesFromDir.empty()) { + this->FileCommand->SetError("option FILES_FROM_DIR requires all files " + "to be specified as relative paths."); + return false; + } else { + file = *i; + } + // Split the input file into its directory and name components. std::vector<std::string> fromPathComponents; - cmSystemTools::SplitPath(files[i], fromPathComponents); + cmSystemTools::SplitPath(file, fromPathComponents); std::string fromName = *(fromPathComponents.end() - 1); std::string fromDir = cmSystemTools::JoinPath( fromPathComponents.begin(), fromPathComponents.end() - 1); // Compute the full path to the destination file. std::string toFile = this->Destination; + if (!this->FilesFromDir.empty()) { + std::string dir = cmSystemTools::GetFilenamePath(*i); + if (!dir.empty()) { + toFile += "/"; + toFile += dir; + } + } std::string const& toName = this->ToName(fromName); if (!toName.empty()) { toFile += "/"; @@ -1751,6 +1787,11 @@ bool cmFileInstaller::Parse(std::vector<std::string> const& args) } if (!this->Rename.empty()) { + if (!this->FilesFromDir.empty()) { + this->FileCommand->SetError("INSTALL option RENAME may not be " + "combined with FILES_FROM_DIR."); + return false; + } if (this->InstallType != cmInstallType_FILES && this->InstallType != cmInstallType_PROGRAMS) { this->FileCommand->SetError("INSTALL option RENAME may be used " diff --git a/Source/cmFileCommand.h b/Source/cmFileCommand.h index 2d82a23b2c..121fec0004 100644 --- a/Source/cmFileCommand.h +++ b/Source/cmFileCommand.h @@ -3,7 +3,8 @@ #ifndef cmFileCommand_h #define cmFileCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmFileLock.h b/Source/cmFileLock.h index ab3cb1fda0..8f996cfe64 100644 --- a/Source/cmFileLock.h +++ b/Source/cmFileLock.h @@ -3,7 +3,7 @@ #ifndef cmFileLock_h #define cmFileLock_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h index fbe01c87e6..09c984c009 100644 --- a/Source/cmFileLockPool.h +++ b/Source/cmFileLockPool.h @@ -3,7 +3,7 @@ #ifndef cmFileLockPool_h #define cmFileLockPool_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <list> #include <string> diff --git a/Source/cmFileLockResult.h b/Source/cmFileLockResult.h index 679432a13b..4cedc0ae66 100644 --- a/Source/cmFileLockResult.h +++ b/Source/cmFileLockResult.h @@ -3,7 +3,7 @@ #ifndef cmFileLockResult_h #define cmFileLockResult_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx index 909be78ed7..9e660356df 100644 --- a/Source/cmFileMonitor.cxx +++ b/Source/cmFileMonitor.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFileMonitor.h" -#include <cmsys/SystemTools.hxx> +#include "cmsys/SystemTools.hxx" #include <cassert> #include <iostream> diff --git a/Source/cmFileMonitor.h b/Source/cmFileMonitor.h index 2957328b76..8574db0c90 100644 --- a/Source/cmFileMonitor.h +++ b/Source/cmFileMonitor.h @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #pragma once -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <functional> #include <string> diff --git a/Source/cmFilePathChecksum.h b/Source/cmFilePathChecksum.h index 59ca34c345..9d570eb4dd 100644 --- a/Source/cmFilePathChecksum.h +++ b/Source/cmFilePathChecksum.h @@ -3,7 +3,7 @@ #ifndef cmFilePathChecksum_h #define cmFilePathChecksum_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <stddef.h> #include <string> diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx index ef4337b7a3..f591a8dc77 100644 --- a/Source/cmFileTimeComparison.cxx +++ b/Source/cmFileTimeComparison.cxx @@ -13,7 +13,7 @@ #include "cm_sys_stat.h" #define cmFileTimeComparison_Type struct stat #else -#include <cmsys/Encoding.hxx> +#include "cmsys/Encoding.hxx" #include <windows.h> #define cmFileTimeComparison_Type FILETIME #endif diff --git a/Source/cmFileTimeComparison.h b/Source/cmFileTimeComparison.h index 6eb1500250..b1f8ed6362 100644 --- a/Source/cmFileTimeComparison.h +++ b/Source/cmFileTimeComparison.h @@ -3,7 +3,7 @@ #ifndef cmFileTimeComparison_h #define cmFileTimeComparison_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep class cmFileTimeComparisonInternal; diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index dce502113c..068dcfc66b 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindBase.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iostream> #include <map> #include <stddef.h> diff --git a/Source/cmFindBase.h b/Source/cmFindBase.h index 423d4533c4..81494f11dc 100644 --- a/Source/cmFindBase.h +++ b/Source/cmFindBase.h @@ -3,7 +3,7 @@ #ifndef cmFindBase_h #define cmFindBase_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmFindCommon.h b/Source/cmFindCommon.h index 4d6d569c19..426d233874 100644 --- a/Source/cmFindCommon.h +++ b/Source/cmFindCommon.h @@ -3,7 +3,7 @@ #ifndef cmFindCommon_h #define cmFindCommon_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <map> #include <set> diff --git a/Source/cmFindFileCommand.h b/Source/cmFindFileCommand.h index 5c94ebf237..489df655fa 100644 --- a/Source/cmFindFileCommand.h +++ b/Source/cmFindFileCommand.h @@ -3,7 +3,8 @@ #ifndef cmFindFileCommand_h #define cmFindFileCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include "cmFindPathCommand.h" diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index e92d672c3c..562a9fc51e 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindLibraryCommand.h" +#include "cmsys/RegularExpression.hxx" #include <algorithm> -#include <cmsys/RegularExpression.hxx> #include <set> #include <stdio.h> #include <string.h> diff --git a/Source/cmFindLibraryCommand.h b/Source/cmFindLibraryCommand.h index aeff62971b..4a60505314 100644 --- a/Source/cmFindLibraryCommand.h +++ b/Source/cmFindLibraryCommand.h @@ -3,7 +3,8 @@ #ifndef cmFindLibraryCommand_h #define cmFindLibraryCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index fe4cc54b4d..17fa92ccdf 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -2,14 +2,14 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindPackageCommand.h" +#include "cmSystemTools.h" +#include "cmsys/Directory.hxx" +#include "cmsys/FStream.hxx" +#include "cmsys/Glob.hxx" +#include "cmsys/RegularExpression.hxx" +#include "cmsys/String.h" #include <algorithm> #include <assert.h> -#include <cmSystemTools.h> -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/RegularExpression.hxx> -#include <cmsys/String.h> #include <functional> #include <iterator> #include <sstream> diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h index 61a8dd6f44..c42eccee31 100644 --- a/Source/cmFindPackageCommand.h +++ b/Source/cmFindPackageCommand.h @@ -3,8 +3,9 @@ #ifndef cmFindPackageCommand_h #define cmFindPackageCommand_h -#include <cmConfigure.h> -#include <cm_kwiml.h> +#include "cmConfigure.h" + +#include "cm_kwiml.h" #include <map> #include <set> #include <string> diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index 8d4bcf3de2..644b025fe1 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindPathCommand.h" -#include <cmsys/Glob.hxx> +#include "cmsys/Glob.hxx" #include "cmMakefile.h" #include "cmStateTypes.h" diff --git a/Source/cmFindPathCommand.h b/Source/cmFindPathCommand.h index edeeb3a6f9..205bb171bb 100644 --- a/Source/cmFindPathCommand.h +++ b/Source/cmFindPathCommand.h @@ -3,7 +3,8 @@ #ifndef cmFindPathCommand_h #define cmFindPathCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmFindProgramCommand.h b/Source/cmFindProgramCommand.h index dc17803f07..73894ba2d1 100644 --- a/Source/cmFindProgramCommand.h +++ b/Source/cmFindProgramCommand.h @@ -3,7 +3,8 @@ #ifndef cmFindProgramCommand_h #define cmFindProgramCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmForEachCommand.h b/Source/cmForEachCommand.h index 93c467620e..c71b9052f2 100644 --- a/Source/cmForEachCommand.h +++ b/Source/cmForEachCommand.h @@ -3,7 +3,8 @@ #ifndef cmForEachCommand_h #define cmForEachCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmFortranParser.cxx b/Source/cmFortranParser.cxx index c67227f0b5..2b3452f2e2 100644 --- a/Source/cmFortranParser.cxx +++ b/Source/cmFortranParser.cxx @@ -97,9 +97,9 @@ Modify cmFortranParser.cxx: - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] */ -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep -#include <cmsys/String.h> +#include "cmsys/String.h" #include <stdlib.h> #include <string.h> diff --git a/Source/cmFortranParser.h b/Source/cmFortranParser.h index 024b00ab70..d8b0023096 100644 --- a/Source/cmFortranParser.h +++ b/Source/cmFortranParser.h @@ -4,7 +4,7 @@ #define cmFortranParser_h #if !defined(cmFortranLexer_cxx) && !defined(cmFortranParser_cxx) -#include <cmConfigure.h> +#include "cmConfigure.h" #include <set> #include <string> diff --git a/Source/cmFortranParser.y b/Source/cmFortranParser.y index 3d68134e03..acfb40ad8e 100644 --- a/Source/cmFortranParser.y +++ b/Source/cmFortranParser.y @@ -26,9 +26,9 @@ Modify cmFortranParser.cxx: - "#if 0" out yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] */ -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep -#include <cmsys/String.h> +#include "cmsys/String.h" #include <stdlib.h> #include <string.h> diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx index 1abe673879..4e23f36919 100644 --- a/Source/cmFortranParserImpl.cxx +++ b/Source/cmFortranParserImpl.cxx @@ -3,8 +3,8 @@ #include "cmFortranParser.h" #include "cmSystemTools.h" +#include "cmConfigure.h" #include <assert.h> -#include <cmConfigure.h> #include <set> #include <stack> #include <stdio.h> diff --git a/Source/cmFunctionCommand.h b/Source/cmFunctionCommand.h index afea6f9c87..d6cc18eade 100644 --- a/Source/cmFunctionCommand.h +++ b/Source/cmFunctionCommand.h @@ -3,7 +3,8 @@ #ifndef cmFunctionCommand_h #define cmFunctionCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index 4731493747..6aa593cc0a 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -8,7 +8,7 @@ #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cm_codecvt.hxx" -#include <cm_zlib.h> +#include "cm_zlib.h" #endif cmGeneratedFileStream::cmGeneratedFileStream(Encoding encoding) diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h index a027b01f66..56f9988ff0 100644 --- a/Source/cmGeneratedFileStream.h +++ b/Source/cmGeneratedFileStream.h @@ -3,10 +3,10 @@ #ifndef cmGeneratedFileStream_h #define cmGeneratedFileStream_h -#include <cmConfigure.h> +#include "cmConfigure.h" -#include <cm_codecvt.hxx> -#include <cmsys/FStream.hxx> +#include "cm_codecvt.hxx" +#include "cmsys/FStream.hxx" #include <string> // This is the first base class of cmGeneratedFileStream. It will be diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index e70bbfed3a..570aa6ed5b 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGeneratorExpression.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <utility> #include "assert.h" diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 8f82a6b4f8..694ce8a992 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -3,11 +3,11 @@ #ifndef cmGeneratorExpression_h #define cmGeneratorExpression_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmListFileCache.h" -#include <cm_auto_ptr.hxx> +#include "cm_auto_ptr.hxx" #include <map> #include <set> #include <string> diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h index 8f102595f6..557a192208 100644 --- a/Source/cmGeneratorExpressionDAGChecker.h +++ b/Source/cmGeneratorExpressionDAGChecker.h @@ -3,7 +3,7 @@ #ifndef cmGeneratorExpressionDAGChecker_h #define cmGeneratorExpressionDAGChecker_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmListFileCache.h" diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx index aeb005fdd5..dc54488582 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.cxx +++ b/Source/cmGeneratorExpressionEvaluationFile.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGeneratorExpressionEvaluationFile.h" -#include <cmConfigure.h> -#include <cmsys/FStream.hxx> +#include "cmConfigure.h" +#include "cmsys/FStream.hxx" #include <sstream> #include <utility> diff --git a/Source/cmGeneratorExpressionEvaluationFile.h b/Source/cmGeneratorExpressionEvaluationFile.h index 1223ffd723..98727460ef 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.h +++ b/Source/cmGeneratorExpressionEvaluationFile.h @@ -3,7 +3,7 @@ #ifndef cmGeneratorExpressionEvaluationFile_h #define cmGeneratorExpressionEvaluationFile_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <map> #include <string> diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h index 41bea9bcb1..a6a341b30e 100644 --- a/Source/cmGeneratorExpressionEvaluator.h +++ b/Source/cmGeneratorExpressionEvaluator.h @@ -3,7 +3,7 @@ #ifndef cmGeneratorExpressionEvaluator_h #define cmGeneratorExpressionEvaluator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <stddef.h> #include <string> diff --git a/Source/cmGeneratorExpressionLexer.h b/Source/cmGeneratorExpressionLexer.h index cac255d864..e53f0b5477 100644 --- a/Source/cmGeneratorExpressionLexer.h +++ b/Source/cmGeneratorExpressionLexer.h @@ -3,7 +3,7 @@ #ifndef cmGeneratorExpressionLexer_h #define cmGeneratorExpressionLexer_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <stddef.h> #include <string> diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 44434995f0..8fee1190d4 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -14,18 +14,17 @@ #include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmPolicies.h" -#include "cmSourceFile.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cm_auto_ptr.hxx" #include "cmake.h" +#include "cmConfigure.h" +#include "cmsys/RegularExpression.hxx" +#include "cmsys/String.h" #include <algorithm> #include <assert.h> -#include <cmConfigure.h> -#include <cmsys/RegularExpression.hxx> -#include <cmsys/String.h> #include <errno.h> #include <map> #include <set> @@ -34,6 +33,8 @@ #include <string.h> #include <utility> +class cmSourceFile; + std::string cmGeneratorExpressionNode::EvaluateDependentExpression( std::string const& prop, cmLocalGenerator* lg, cmGeneratorExpressionContext* context, cmGeneratorTarget const* headTarget, @@ -1265,6 +1266,8 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode gt->LocalGenerator->ComputeObjectFilenames(mapping, gt); + cmMakefile* mf = context->LG->GetMakefile(); + std::string obj_dir = gt->ObjectDirectory; std::string result; const char* sep = ""; @@ -1278,10 +1281,7 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode assert(!map_it->second.empty()); result += sep; std::string objFile = obj_dir + map_it->second; - cmSourceFile* sf = - context->LG->GetMakefile()->GetOrCreateSource(objFile, true); - sf->SetObjectLibrary(tgtName); - sf->SetProperty("EXTERNAL_OBJECT", "1"); + mf->AddTargetObject(tgtName, objFile); result += objFile; sep = ";"; } diff --git a/Source/cmGeneratorExpressionNode.h b/Source/cmGeneratorExpressionNode.h index ecf745effd..ece1c113ce 100644 --- a/Source/cmGeneratorExpressionNode.h +++ b/Source/cmGeneratorExpressionNode.h @@ -3,7 +3,7 @@ #ifndef cmGeneratorExpressionNode_h #define cmGeneratorExpressionNode_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmGeneratorExpressionParser.h b/Source/cmGeneratorExpressionParser.h index e30cb20574..633381c8a9 100644 --- a/Source/cmGeneratorExpressionParser.h +++ b/Source/cmGeneratorExpressionParser.h @@ -3,7 +3,7 @@ #ifndef cmGeneratorExpressionParser_h #define cmGeneratorExpressionParser_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <vector> diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index e84bf4e466..32e2b008aa 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGeneratorTarget.h" +#include "cmsys/RegularExpression.hxx" #include <algorithm> #include <assert.h> -#include <cmsys/RegularExpression.hxx> #include <errno.h> #include <iterator> #include <queue> @@ -547,12 +547,6 @@ void cmGeneratorTarget::GetModuleDefinitionSources( IMPLEMENT_VISIT(SourceKindModuleDefinition); } -void cmGeneratorTarget::GetIDLSources(std::vector<cmSourceFile const*>& data, - const std::string& config) const -{ - IMPLEMENT_VISIT(SourceKindIDL); -} - void cmGeneratorTarget::GetHeaderSources( std::vector<cmSourceFile const*>& data, const std::string& config) const { @@ -975,6 +969,19 @@ void cmGeneratorTarget::GetSourceFiles(std::vector<cmSourceFile*>& files, } } +void cmGeneratorTarget::GetSourceFilesWithoutObjectLibraries( + std::vector<cmSourceFile*>& files, const std::string& config) const +{ + KindedSources const& kinded = this->GetKindedSources(config); + files.reserve(kinded.Sources.size()); + for (std::vector<SourceAndKind>::const_iterator si = kinded.Sources.begin(); + si != kinded.Sources.end(); ++si) { + if (si->Source->GetObjectLibrary().empty()) { + files.push_back(si->Source); + } + } +} + cmGeneratorTarget::KindedSources const& cmGeneratorTarget::GetKindedSources( std::string const& config) const { @@ -1095,6 +1102,43 @@ void cmGeneratorTarget::ComputeKindedSources(KindedSources& files, } } +std::vector<cmGeneratorTarget::AllConfigSource> const& +cmGeneratorTarget::GetAllConfigSources() const +{ + if (this->AllConfigSources.empty()) { + this->ComputeAllConfigSources(); + } + return this->AllConfigSources; +} + +void cmGeneratorTarget::ComputeAllConfigSources() const +{ + std::vector<std::string> configs; + this->Makefile->GetConfigurations(configs); + + std::map<cmSourceFile const*, size_t> index; + + for (size_t ci = 0; ci < configs.size(); ++ci) { + KindedSources const& sources = this->GetKindedSources(configs[ci]); + for (std::vector<cmGeneratorTarget::SourceAndKind>::const_iterator si = + sources.Sources.begin(); + si != sources.Sources.end(); ++si) { + std::map<cmSourceFile const*, size_t>::iterator mi = + index.find(si->Source); + if (mi == index.end()) { + AllConfigSource acs; + acs.Source = si->Source; + acs.Kind = si->Kind; + this->AllConfigSources.push_back(acs); + std::map<cmSourceFile const*, size_t>::value_type entry( + si->Source, this->AllConfigSources.size() - 1); + mi = index.insert(entry).first; + } + this->AllConfigSources[mi->second].Configs.push_back(ci); + } + } +} + std::string cmGeneratorTarget::GetCompilePDBName( const std::string& config) const { @@ -1963,41 +2007,6 @@ bool cmGeneratorTarget::IsDLLPlatform() const return this->DLLPlatform; } -void cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs, - const std::string& config) const -{ - std::vector<cmSourceFile const*> objectFiles; - this->GetExternalObjects(objectFiles, config); - std::vector<cmGeneratorTarget*> objectLibraries; - for (std::vector<cmSourceFile const*>::const_iterator it = - objectFiles.begin(); - it != objectFiles.end(); ++it) { - std::string objLib = (*it)->GetObjectLibrary(); - if (cmGeneratorTarget* tgt = - this->LocalGenerator->FindGeneratorTargetToUse(objLib)) { - objectLibraries.push_back(tgt); - } - } - - std::vector<cmGeneratorTarget*>::const_iterator end = - cmRemoveDuplicates(objectLibraries); - - for (std::vector<cmGeneratorTarget*>::const_iterator ti = - objectLibraries.begin(); - ti != end; ++ti) { - cmGeneratorTarget* ogt = *ti; - std::vector<cmSourceFile const*> objectSources; - ogt->GetObjectSources(objectSources, config); - for (std::vector<cmSourceFile const*>::const_iterator si = - objectSources.begin(); - si != objectSources.end(); ++si) { - std::string obj = ogt->ObjectDirectory; - obj += ogt->Objects[*si]; - objs.push_back(obj); - } - } -} - void cmGeneratorTarget::GetAutoUicOptions(std::vector<std::string>& result, const std::string& config) const { @@ -4961,11 +4970,11 @@ bool cmGeneratorTarget::GetConfigCommonSourceFiles( std::vector<std::string>::const_iterator it = configs.begin(); const std::string& firstConfig = *it; - this->GetSourceFiles(files, firstConfig); + this->GetSourceFilesWithoutObjectLibraries(files, firstConfig); for (; it != configs.end(); ++it) { std::vector<cmSourceFile*> configFiles; - this->GetSourceFiles(configFiles, *it); + this->GetSourceFilesWithoutObjectLibraries(configFiles, *it); if (configFiles != files) { std::string firstConfigFiles; const char* sep = ""; diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 00df14b3d6..d4f48fe909 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -3,7 +3,7 @@ #ifndef cmGeneratorTarget_h #define cmGeneratorTarget_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmLinkItem.h" #include "cmListFileCache.h" @@ -12,6 +12,7 @@ #include <map> #include <set> +#include <stddef.h> #include <string> #include <utility> #include <vector> @@ -69,6 +70,8 @@ public: bool GetPropertyAsBool(const std::string& prop) const; void GetSourceFiles(std::vector<cmSourceFile*>& files, const std::string& config) const; + void GetSourceFilesWithoutObjectLibraries(std::vector<cmSourceFile*>& files, + const std::string& config) const; /** Source file kinds (classifications). Generators use this to decide how to treat a source file. */ @@ -107,6 +110,17 @@ public: /** Get all sources needed for a configuration with kinds assigned. */ KindedSources const& GetKindedSources(std::string const& config) const; + struct AllConfigSource + { + cmSourceFile const* Source; + cmGeneratorTarget::SourceKind Kind; + std::vector<size_t> Configs; + }; + + /** Get all sources needed for all configurations with kinds and + per-source configurations assigned. */ + std::vector<AllConfigSource> const& GetAllConfigSources() const; + void GetObjectSources(std::vector<cmSourceFile const*>&, const std::string& config) const; const std::string& GetObjectName(cmSourceFile const* file); @@ -118,8 +132,6 @@ public: const std::string& config) const; void GetResxSources(std::vector<cmSourceFile const*>&, const std::string& config) const; - void GetIDLSources(std::vector<cmSourceFile const*>&, - const std::string& config) const; void GetExternalObjects(std::vector<cmSourceFile const*>&, const std::string& config) const; void GetHeaderSources(std::vector<cmSourceFile const*>&, @@ -340,6 +352,9 @@ public: std::string GetFullNameImported(const std::string& config, bool implib) const; + /** Get source files common to all configurations and diagnose cases + with per-config sources. Excludes sources added by a TARGET_OBJECTS + generator expression. */ bool GetConfigCommonSourceFiles(std::vector<cmSourceFile*>& files) const; bool HaveBuildTreeRPATH(const std::string& config) const; @@ -349,9 +364,6 @@ public: time config name placeholder if needed for the generator. */ std::string ObjectDirectory; - void UseObjectLibraries(std::vector<std::string>& objs, - const std::string& config) const; - void GetAppleArchs(const std::string& config, std::vector<std::string>& archVec) const; @@ -736,6 +748,9 @@ private: void ComputeKindedSources(KindedSources& files, std::string const& config) const; + mutable std::vector<AllConfigSource> AllConfigSources; + void ComputeAllConfigSources() const; + std::vector<TargetPropertyEntry*> IncludeDirectoriesEntries; std::vector<TargetPropertyEntry*> CompileOptionsEntries; std::vector<TargetPropertyEntry*> CompileFeaturesEntries; diff --git a/Source/cmGetCMakePropertyCommand.h b/Source/cmGetCMakePropertyCommand.h index 41a51a4409..c454e3447b 100644 --- a/Source/cmGetCMakePropertyCommand.h +++ b/Source/cmGetCMakePropertyCommand.h @@ -3,7 +3,8 @@ #ifndef cmGetCMakePropertyCommand_h #define cmGetCMakePropertyCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmGetDirectoryPropertyCommand.h b/Source/cmGetDirectoryPropertyCommand.h index 1ae3125395..0adf8187dd 100644 --- a/Source/cmGetDirectoryPropertyCommand.h +++ b/Source/cmGetDirectoryPropertyCommand.h @@ -3,7 +3,8 @@ #ifndef cmGetDirectoryPropertyCommand_h #define cmGetDirectoryPropertyCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmGetFilenameComponentCommand.h b/Source/cmGetFilenameComponentCommand.h index c0ad903a86..efc9d7b0e5 100644 --- a/Source/cmGetFilenameComponentCommand.h +++ b/Source/cmGetFilenameComponentCommand.h @@ -3,7 +3,8 @@ #ifndef cmGetFilenameComponentCommand_h #define cmGetFilenameComponentCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmGetPropertyCommand.h b/Source/cmGetPropertyCommand.h index f9a33acd8c..a57c675df8 100644 --- a/Source/cmGetPropertyCommand.h +++ b/Source/cmGetPropertyCommand.h @@ -3,7 +3,8 @@ #ifndef cmGetPropertyCommand_h #define cmGetPropertyCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmGetSourceFilePropertyCommand.h b/Source/cmGetSourceFilePropertyCommand.h index 0f7185122a..558e2abb04 100644 --- a/Source/cmGetSourceFilePropertyCommand.h +++ b/Source/cmGetSourceFilePropertyCommand.h @@ -3,7 +3,8 @@ #ifndef cmGetSourceFilePropertyCommand_h #define cmGetSourceFilePropertyCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmGetTargetPropertyCommand.h b/Source/cmGetTargetPropertyCommand.h index 32fe803c47..9cebb3bcfd 100644 --- a/Source/cmGetTargetPropertyCommand.h +++ b/Source/cmGetTargetPropertyCommand.h @@ -3,7 +3,8 @@ #ifndef cmGetTargetPropertyCommand_h #define cmGetTargetPropertyCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmGetTestPropertyCommand.h b/Source/cmGetTestPropertyCommand.h index 0491cc8b07..d3d10cbfa1 100644 --- a/Source/cmGetTestPropertyCommand.h +++ b/Source/cmGetTestPropertyCommand.h @@ -3,7 +3,8 @@ #ifndef cmGetTestPropertyCommand_h #define cmGetTestPropertyCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmGhsMultiGpj.h b/Source/cmGhsMultiGpj.h index 2c2b123430..7bc7bfc46c 100644 --- a/Source/cmGhsMultiGpj.h +++ b/Source/cmGhsMultiGpj.h @@ -3,7 +3,7 @@ #ifndef cmGhsMultiGpj_h #define cmGhsMultiGpj_h -#include <cmConfigure.h> +#include "cmConfigure.h" class cmGeneratedFileStream; diff --git a/Source/cmGlobalCommonGenerator.h b/Source/cmGlobalCommonGenerator.h index e8e6ad9633..f2ad059de2 100644 --- a/Source/cmGlobalCommonGenerator.h +++ b/Source/cmGlobalCommonGenerator.h @@ -3,7 +3,7 @@ #ifndef cmGlobalCommonGenerator_h #define cmGlobalCommonGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmGlobalGenerator.h" diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index ce83e2e46a..50ad1a881d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2,10 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalGenerator.h" +#include "cmsys/Directory.hxx" +#include "cmsys/FStream.hxx" #include <algorithm> #include <assert.h> -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> #include <iterator> #include <sstream> #include <stdio.h> @@ -44,8 +44,8 @@ #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmCryptoHash.h" -#include <cm_jsoncpp_value.h> -#include <cm_jsoncpp_writer.h> +#include "cm_jsoncpp_value.h" +#include "cm_jsoncpp_writer.h" #endif #if defined(_MSC_VER) && _MSC_VER >= 1800 @@ -1347,10 +1347,11 @@ void cmGlobalGenerator::Generate() for (std::map<std::string, cmExportBuildFileGenerator*>::iterator it = this->BuildExportSets.begin(); it != this->BuildExportSets.end(); ++it) { - if (!it->second->GenerateImportFile() && - !cmSystemTools::GetErrorOccuredFlag()) { - this->GetCMakeInstance()->IssueMessage(cmake::FATAL_ERROR, - "Could not write export file."); + if (!it->second->GenerateImportFile()) { + if (!cmSystemTools::GetErrorOccuredFlag()) { + this->GetCMakeInstance()->IssueMessage(cmake::FATAL_ERROR, + "Could not write export file."); + } return; } } diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index b228d41cb5..4200b2161a 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -3,7 +3,7 @@ #ifndef cmGlobalGenerator_h #define cmGlobalGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <map> diff --git a/Source/cmGlobalGeneratorFactory.h b/Source/cmGlobalGeneratorFactory.h index 5e948f7603..d5a6db06e5 100644 --- a/Source/cmGlobalGeneratorFactory.h +++ b/Source/cmGlobalGeneratorFactory.h @@ -3,7 +3,7 @@ #ifndef cmGlobalGeneratorFactory_h #define cmGlobalGeneratorFactory_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <string> #include <vector> diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 286f375994..42ab4d98a6 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalGhsMultiGenerator.h" -#include <cmsys/SystemTools.hxx> +#include "cmsys/SystemTools.hxx" #include "cmAlgorithms.h" #include "cmDocumentationEntry.h" diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index 75209c33e1..a958a17725 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -14,8 +14,8 @@ #include "cmXMLWriter.h" #include "cmake.h" -#include <cmsys/Directory.hxx> -#include <cmsys/FStream.hxx> +#include "cmsys/Directory.hxx" +#include "cmsys/FStream.hxx" #include <map> #include <set> #include <string.h> diff --git a/Source/cmGlobalKdevelopGenerator.h b/Source/cmGlobalKdevelopGenerator.h index 8121fa8eb7..bdcf8a190b 100644 --- a/Source/cmGlobalKdevelopGenerator.h +++ b/Source/cmGlobalKdevelopGenerator.h @@ -3,7 +3,7 @@ #ifndef cmGlobalKdevelopGenerator_h #define cmGlobalKdevelopGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmExternalMakefileProjectGenerator.h" diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx index 7e0d0d4555..3f223824a8 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.cxx +++ b/Source/cmGlobalMSYSMakefileGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalMSYSMakefileGenerator.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include "cmDocumentationEntry.h" #include "cmLocalUnixMakefileGenerator3.h" diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 1bdef53492..aae01cac74 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -2,11 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalNinjaGenerator.h" +#include "cm_jsoncpp_reader.h" +#include "cm_jsoncpp_value.h" +#include "cm_jsoncpp_writer.h" +#include "cmsys/FStream.hxx" #include <algorithm> -#include <cm_jsoncpp_reader.h> -#include <cm_jsoncpp_value.h> -#include <cm_jsoncpp_writer.h> -#include <cmsys/FStream.hxx> #include <ctype.h> #include <functional> #include <iterator> diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 956af514b9..e06afb0428 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -3,7 +3,7 @@ #ifndef cmGlobalNinjaGenerator_h #define cmGlobalNinjaGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <map> diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index bbf9f0f55f..a656102fbe 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -3,7 +3,7 @@ #ifndef cmGlobalUnixMakefileGenerator3_h #define cmGlobalUnixMakefileGenerator3_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <map> diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index ca98e6c920..ee9e47ab3c 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -23,9 +23,9 @@ #include "cmXMLWriter.h" #include "cmake.h" -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/RegularExpression.hxx> +#include "cmsys/FStream.hxx" +#include "cmsys/Glob.hxx" +#include "cmsys/RegularExpression.hxx" #include <algorithm> diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h index ae994087f7..b4b327d8ae 100644 --- a/Source/cmGlobalVisualStudio11Generator.h +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -3,7 +3,7 @@ #ifndef cmGlobalVisualStudio11Generator_h #define cmGlobalVisualStudio11Generator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <set> diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h index 3453628870..ebc95bb63f 100644 --- a/Source/cmGlobalVisualStudio12Generator.h +++ b/Source/cmGlobalVisualStudio12Generator.h @@ -3,7 +3,7 @@ #ifndef cmGlobalVisualStudio12Generator_h #define cmGlobalVisualStudio12Generator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <string> diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index d2ac36b1c5..df086d3fdf 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -217,24 +217,44 @@ struct NoWindowsH std::string cmGlobalVisualStudio14Generator::GetWindows10SDKVersion() { #if defined(_WIN32) && !defined(__CYGWIN__) - // This logic is taken from the vcvarsqueryregistry.bat file from VS2015 - // Try HKLM and then HKCU. - std::string win10Root; - if (!cmSystemTools::ReadRegistryValue( - "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\" - "Windows Kits\\Installed Roots;KitsRoot10", - win10Root, cmSystemTools::KeyWOW64_32) && - !cmSystemTools::ReadRegistryValue( - "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\" - "Windows Kits\\Installed Roots;KitsRoot10", - win10Root, cmSystemTools::KeyWOW64_32)) { + std::vector<std::string> win10Roots; + + { + std::string win10Root; + if (cmSystemTools::GetEnv("CMAKE_WINDOWS_KITS_10_DIR", win10Root)) { + cmSystemTools::ConvertToUnixSlashes(win10Root); + win10Roots.push_back(win10Root); + } + } + + { + // This logic is taken from the vcvarsqueryregistry.bat file from VS2015 + // Try HKLM and then HKCU. + std::string win10Root; + if (cmSystemTools::ReadRegistryValue( + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\" + "Windows Kits\\Installed Roots;KitsRoot10", + win10Root, cmSystemTools::KeyWOW64_32) || + cmSystemTools::ReadRegistryValue( + "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\" + "Windows Kits\\Installed Roots;KitsRoot10", + win10Root, cmSystemTools::KeyWOW64_32)) { + cmSystemTools::ConvertToUnixSlashes(win10Root); + win10Roots.push_back(win10Root); + } + } + + if (win10Roots.empty()) { return std::string(); } std::vector<std::string> sdks; - std::string path = win10Root + "Include/*"; // Grab the paths of the different SDKs that are installed - cmSystemTools::GlobDirs(path, sdks); + for (std::vector<std::string>::iterator i = win10Roots.begin(); + i != win10Roots.end(); ++i) { + std::string path = *i + "/Include/*"; + cmSystemTools::GlobDirs(path, sdks); + } // Skip SDKs that do not contain <um/windows.h> because that indicates that // only the UCRT MSIs were installed for them. diff --git a/Source/cmGlobalVisualStudio14Generator.h b/Source/cmGlobalVisualStudio14Generator.h index ab22978fc3..0ce9a56417 100644 --- a/Source/cmGlobalVisualStudio14Generator.h +++ b/Source/cmGlobalVisualStudio14Generator.h @@ -3,7 +3,7 @@ #ifndef cmGlobalVisualStudio14Generator_h #define cmGlobalVisualStudio14Generator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <string> diff --git a/Source/cmGlobalVisualStudio15Generator.h b/Source/cmGlobalVisualStudio15Generator.h index f979b65c01..4be88f44f2 100644 --- a/Source/cmGlobalVisualStudio15Generator.h +++ b/Source/cmGlobalVisualStudio15Generator.h @@ -3,7 +3,7 @@ #ifndef cmGlobalVisualStudio15Generator_h #define cmGlobalVisualStudio15Generator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <string> diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 2d0abf9cf6..38491759b2 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -9,7 +9,7 @@ #include "cmState.h" #include "cmUuid.h" #include "cmake.h" -#include <cmsys/Encoding.hxx> +#include "cmsys/Encoding.hxx" #include <assert.h> #include <windows.h> diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 6d16881ee6..87a22d1dc6 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -3,7 +3,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalVisualStudioGenerator.h" -#include <cmsys/Encoding.hxx> +#include "cmsys/Encoding.hxx" #include <iostream> #include <windows.h> @@ -887,7 +887,6 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand( objs.push_back((*it)->GetFullPath()); } - gt->UseObjectLibraries(objs, configName); for (std::vector<std::string>::iterator it = objs.begin(); it != objs.end(); ++it) { std::string objFile = *it; diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index f32f0bbe8a..60344f3abe 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -3,7 +3,7 @@ #ifndef cmGlobalVisualStudioGenerator_h #define cmGlobalVisualStudioGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <map> diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h index 1c290f8ad5..b2d6d5d715 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.h +++ b/Source/cmGlobalWatcomWMakeGenerator.h @@ -3,7 +3,7 @@ #ifndef cmGlobalWatcomWMakeGenerator_h #define cmGlobalWatcomWMakeGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmGlobalGeneratorFactory.h" #include "cmGlobalUnixMakefileGenerator3.h" diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index febe95d73b..ecc3e310a0 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalXCodeGenerator.h" +#include "cmsys/RegularExpression.hxx" #include <assert.h> -#include <cmsys/RegularExpression.hxx> #include <iomanip> #include <sstream> #include <stdio.h> @@ -152,6 +152,9 @@ cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(cmake* cm, this->CurrentLocalGenerator = 0; this->XcodeBuildCommandInitialized = false; + this->ObjectDirArchDefault = "$(CURRENT_ARCH)"; + this->ComputeObjectDirArch(); + cm->GetState()->SetIsGeneratorMultiConfig(true); } @@ -282,13 +285,7 @@ void cmGlobalXCodeGenerator::EnableLanguage( } mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1"); this->cmGlobalGenerator::EnableLanguage(lang, mf, optional); - const char* osxArch = mf->GetDefinition("CMAKE_OSX_ARCHITECTURES"); - const char* sysroot = mf->GetDefinition("CMAKE_OSX_SYSROOT"); - if (osxArch && sysroot) { - this->Architectures.clear(); - cmSystemTools::ExpandListArgument(std::string(osxArch), - this->Architectures); - } + this->ComputeArchitectures(mf); } void cmGlobalXCodeGenerator::GenerateBuildCommand( @@ -654,11 +651,6 @@ std::string GetGroupMapKeyFromPath(cmGeneratorTarget* target, return key; } -std::string GetGroupMapKey(cmGeneratorTarget* target, cmSourceFile* sf) -{ - return GetGroupMapKeyFromPath(target, sf->GetFullPath()); -} - cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFileFromPath( const std::string& fullpath, cmGeneratorTarget* target, const std::string& lang, cmSourceFile* sf) @@ -1054,11 +1046,14 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( // Add object library contents as external objects. (Equivalent to // the externalObjFiles above, except each one is not a cmSourceFile // within the target.) - std::vector<std::string> objs; - gtgt->UseObjectLibraries(objs, ""); - for (std::vector<std::string>::const_iterator oi = objs.begin(); + std::vector<cmSourceFile const*> objs; + gtgt->GetExternalObjects(objs, ""); + for (std::vector<cmSourceFile const*>::const_iterator oi = objs.begin(); oi != objs.end(); ++oi) { - std::string obj = *oi; + if ((*oi)->GetObjectLibrary().empty()) { + continue; + } + std::string const& obj = (*oi)->GetFullPath(); cmXCodeObject* xsf = this->CreateXCodeSourceFileFromPath(obj, gtgt, "", 0); externalObjFiles.push_back(xsf); @@ -2672,13 +2667,16 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) // Add object library contents as link flags. std::string linkObjs; const char* sep = ""; - std::vector<std::string> objs; - gt->UseObjectLibraries(objs, ""); - for (std::vector<std::string>::const_iterator oi = objs.begin(); + std::vector<cmSourceFile const*> objs; + gt->GetExternalObjects(objs, configName); + for (std::vector<cmSourceFile const*>::const_iterator oi = objs.begin(); oi != objs.end(); ++oi) { + if ((*oi)->GetObjectLibrary().empty()) { + continue; + } linkObjs += sep; sep = " "; - linkObjs += this->XCodeEscapePath(*oi); + linkObjs += this->XCodeEscapePath((*oi)->GetFullPath()); } this->AppendBuildSettingAttribute( target, this->GetTargetLinkFlagsVar(gt), linkObjs.c_str(), configName); @@ -2785,32 +2783,23 @@ bool cmGlobalXCodeGenerator::CreateGroups( gtgt->AddSource(plist); } - std::vector<cmSourceFile*> classes; - if (!gtgt->GetConfigCommonSourceFiles(classes)) { - return false; - } + std::vector<cmGeneratorTarget::AllConfigSource> const& sources = + gtgt->GetAllConfigSources(); + // Put cmSourceFile instances in proper groups: - for (std::vector<cmSourceFile*>::const_iterator s = classes.begin(); - s != classes.end(); s++) { - cmSourceFile* sf = *s; + for (std::vector<cmGeneratorTarget::AllConfigSource>::const_iterator si = + sources.begin(); + si != sources.end(); ++si) { + cmSourceFile const* sf = si->Source; + if (this->XcodeVersion >= 50 && !sf->GetObjectLibrary().empty()) { + // Object library files go on the link line instead. + continue; + } // Add the file to the list of sources. std::string const& source = sf->GetFullPath(); cmSourceGroup* sourceGroup = mf->FindSourceGroup(source.c_str(), sourceGroups); cmXCodeObject* pbxgroup = this->CreateOrGetPBXGroup(gtgt, sourceGroup); - std::string key = GetGroupMapKey(gtgt, sf); - this->GroupMap[key] = pbxgroup; - } - - // Put OBJECT_LIBRARY objects in proper groups: - std::vector<std::string> objs; - gtgt->UseObjectLibraries(objs, ""); - for (std::vector<std::string>::const_iterator oi = objs.begin(); - oi != objs.end(); ++oi) { - std::string const& source = *oi; - cmSourceGroup* sourceGroup = - mf->FindSourceGroup(source.c_str(), sourceGroups); - cmXCodeObject* pbxgroup = this->CreateOrGetPBXGroup(gtgt, sourceGroup); std::string key = GetGroupMapKeyFromPath(gtgt, source); this->GroupMap[key] = pbxgroup; } @@ -3089,23 +3078,16 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( this->CreateString(defaultConfigName)); cmXCodeObject* buildSettings = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); - const char* osxArch = - this->CurrentMakefile->GetDefinition("CMAKE_OSX_ARCHITECTURES"); const char* sysroot = this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT"); const char* deploymentTarget = this->CurrentMakefile->GetDefinition("CMAKE_OSX_DEPLOYMENT_TARGET"); - std::string archs; if (sysroot) { - if (osxArch) { - // recompute this as it may have been changed since enable language - this->Architectures.clear(); - cmSystemTools::ExpandListArgument(std::string(osxArch), - this->Architectures); - archs = cmJoin(this->Architectures, " "); - } buildSettings->AddAttribute("SDKROOT", this->CreateString(sysroot)); } + // recompute this as it may have been changed since enable language + this->ComputeArchitectures(this->CurrentMakefile); + std::string const archs = cmJoin(this->Architectures, " "); if (archs.empty()) { // Tell Xcode to use NATIVE_ARCH instead of ARCHS. buildSettings->AddAttribute("ONLY_ACTIVE_ARCH", this->CreateString("YES")); @@ -3212,6 +3194,48 @@ std::string cmGlobalXCodeGenerator::GetObjectsNormalDirectory( return dir; } +void cmGlobalXCodeGenerator::ComputeArchitectures(cmMakefile* mf) +{ + this->Architectures.clear(); + const char* osxArch = mf->GetDefinition("CMAKE_OSX_ARCHITECTURES"); + const char* sysroot = mf->GetDefinition("CMAKE_OSX_SYSROOT"); + if (osxArch && sysroot) { + cmSystemTools::ExpandListArgument(std::string(osxArch), + this->Architectures); + } + + if (this->Architectures.empty()) { + // With no ARCHS we use ONLY_ACTIVE_ARCH. + // Look up the arch that Xcode chooses in this case. + if (const char* arch = mf->GetDefinition("CMAKE_XCODE_CURRENT_ARCH")) { + this->ObjectDirArchDefault = arch; + } + } + + this->ComputeObjectDirArch(); +} + +void cmGlobalXCodeGenerator::ComputeObjectDirArch() +{ + if (this->XcodeVersion >= 21) { + if (this->Architectures.size() > 1) { + this->ObjectDirArch = "$(CURRENT_ARCH)"; + } else if (!this->Architectures.empty()) { + this->ObjectDirArch = this->Architectures[0]; + } else { + this->ObjectDirArch = this->ObjectDirArchDefault; + } + } else { +#if defined(__ppc__) + this->ObjectDirArch = "ppc"; +#elif defined(__i386) + this->ObjectDirArch = "i386"; +#else + this->ObjectDirArch = ""; +#endif + } +} + void cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( std::vector<cmXCodeObject*>& targets) { @@ -3721,15 +3745,7 @@ void cmGlobalXCodeGenerator::ComputeTargetObjectDirectory( std::string configName = this->GetCMakeCFGIntDir(); std::string dir = this->GetObjectsNormalDirectory("$(PROJECT_NAME)", configName, gt); - if (this->XcodeVersion >= 21) { - dir += "$(CURRENT_ARCH)/"; - } else { -#ifdef __ppc__ - dir += "ppc/"; -#endif -#ifdef __i386 - dir += "i386/"; -#endif - } + dir += this->ObjectDirArch; + dir += "/"; gt->ObjectDirectory = dir; } diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 172e414bb3..982dabd88e 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -3,7 +3,8 @@ #ifndef cmGlobalXCodeGenerator_h #define cmGlobalXCodeGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <iosfwd> #include <map> #include <set> @@ -240,6 +241,9 @@ private: const std::string& configName, const cmGeneratorTarget* t) const; + void ComputeArchitectures(cmMakefile* mf); + void ComputeObjectDirArch(); + void addObject(cmXCodeObject* obj); std::string PostBuildMakeTarget(std::string const& tName, std::string const& configName); @@ -261,6 +265,8 @@ private: std::map<std::string, cmXCodeObject*> FileRefs; std::map<cmGeneratorTarget const*, cmXCodeObject*> XCodeObjectMap; std::vector<std::string> Architectures; + std::string ObjectDirArchDefault; + std::string ObjectDirArch; std::string GeneratorToolset; }; diff --git a/Source/cmGraphAdjacencyList.h b/Source/cmGraphAdjacencyList.h index e6aec47c2b..527db164bb 100644 --- a/Source/cmGraphAdjacencyList.h +++ b/Source/cmGraphAdjacencyList.h @@ -3,7 +3,7 @@ #ifndef cmGraphAdjacencyList_h #define cmGraphAdjacencyList_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <vector> diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index 0f69aaa465..1fcd3cbde6 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGraphVizWriter.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iostream> #include <sstream> #include <utility> diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h index 1ff07abd7b..824999b965 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -3,11 +3,11 @@ #ifndef CMGRAPHVIZWRITER_H #define CMGRAPHVIZWRITER_H -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmStateTypes.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <map> #include <set> #include <string> diff --git a/Source/cmHexFileConverter.cxx b/Source/cmHexFileConverter.cxx index d9d6598936..78dceb7945 100644 --- a/Source/cmHexFileConverter.cxx +++ b/Source/cmHexFileConverter.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmHexFileConverter.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <stdio.h> #include <string.h> diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx index bda6b750fd..5e872d2fff 100644 --- a/Source/cmIDEOptions.cxx +++ b/Source/cmIDEOptions.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmIDEOptions.h" -#include <cmsys/String.h> +#include "cmsys/String.h" #include <iterator> #include <string.h> diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index 11f8aba446..19e96bd445 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -3,7 +3,7 @@ #ifndef cmIDEOptions_h #define cmIDEOptions_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <map> #include <string> diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h index f81db670f8..59d32e6d45 100644 --- a/Source/cmIfCommand.h +++ b/Source/cmIfCommand.h @@ -3,7 +3,8 @@ #ifndef cmIfCommand_h #define cmIfCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmIncludeCommand.h b/Source/cmIncludeCommand.h index 78edd43c22..06200cd6d1 100644 --- a/Source/cmIncludeCommand.h +++ b/Source/cmIncludeCommand.h @@ -3,7 +3,8 @@ #ifndef cmIncludeCommand_h #define cmIncludeCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmIncludeDirectoryCommand.h b/Source/cmIncludeDirectoryCommand.h index 287b5d3cd0..abe0c05813 100644 --- a/Source/cmIncludeDirectoryCommand.h +++ b/Source/cmIncludeDirectoryCommand.h @@ -3,7 +3,8 @@ #ifndef cmIncludeDirectoryCommand_h #define cmIncludeDirectoryCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmIncludeExternalMSProjectCommand.h b/Source/cmIncludeExternalMSProjectCommand.h index 9fcf467c54..5274f9ee40 100644 --- a/Source/cmIncludeExternalMSProjectCommand.h +++ b/Source/cmIncludeExternalMSProjectCommand.h @@ -3,7 +3,8 @@ #ifndef cmIncludeExternalMSProjectCommand_h #define cmIncludeExternalMSProjectCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmIncludeRegularExpressionCommand.h b/Source/cmIncludeRegularExpressionCommand.h index c68d9f297e..a0033609b4 100644 --- a/Source/cmIncludeRegularExpressionCommand.h +++ b/Source/cmIncludeRegularExpressionCommand.h @@ -3,7 +3,8 @@ #ifndef cmIncludeRegularExpressionCommand_h #define cmIncludeRegularExpressionCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 4c331c72be..c8923b088e 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallCommand.h" -#include <cmsys/Glob.hxx> +#include "cmsys/Glob.hxx" #include <sstream> #include <stddef.h> diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h index 187a6ceae1..fde629b388 100644 --- a/Source/cmInstallCommand.h +++ b/Source/cmInstallCommand.h @@ -3,7 +3,8 @@ #ifndef cmInstallCommand_h #define cmInstallCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx index 6b1546868d..b73414dd05 100644 --- a/Source/cmInstallCommandArguments.cxx +++ b/Source/cmInstallCommandArguments.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallCommandArguments.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmSystemTools.h" diff --git a/Source/cmInstallCommandArguments.h b/Source/cmInstallCommandArguments.h index c1523b2356..a576e72029 100644 --- a/Source/cmInstallCommandArguments.h +++ b/Source/cmInstallCommandArguments.h @@ -3,7 +3,7 @@ #ifndef cmInstallCommandArguments_h #define cmInstallCommandArguments_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmInstallDirectoryGenerator.h b/Source/cmInstallDirectoryGenerator.h index 0518092c87..029ce46c01 100644 --- a/Source/cmInstallDirectoryGenerator.h +++ b/Source/cmInstallDirectoryGenerator.h @@ -6,7 +6,8 @@ #include "cmInstallGenerator.h" #include "cmScriptGenerator.h" -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <iosfwd> #include <string> #include <vector> diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h index b0fe88916e..3a46a72fac 100644 --- a/Source/cmInstallExportGenerator.h +++ b/Source/cmInstallExportGenerator.h @@ -3,7 +3,7 @@ #ifndef cmInstallExportGenerator_h #define cmInstallExportGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmInstallGenerator.h" #include "cmScriptGenerator.h" diff --git a/Source/cmInstallFilesCommand.h b/Source/cmInstallFilesCommand.h index c3e2919644..588c2896a8 100644 --- a/Source/cmInstallFilesCommand.h +++ b/Source/cmInstallFilesCommand.h @@ -3,7 +3,8 @@ #ifndef cmInstallFilesCommand_h #define cmInstallFilesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmInstallFilesGenerator.h b/Source/cmInstallFilesGenerator.h index ca8c6e1104..578763b880 100644 --- a/Source/cmInstallFilesGenerator.h +++ b/Source/cmInstallFilesGenerator.h @@ -3,7 +3,7 @@ #ifndef cmInstallFilesGenerator_h #define cmInstallFilesGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmInstallGenerator.h" #include "cmScriptGenerator.h" diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h index 48e1644ee1..bb1dd54258 100644 --- a/Source/cmInstallGenerator.h +++ b/Source/cmInstallGenerator.h @@ -3,7 +3,7 @@ #ifndef cmInstallGenerator_h #define cmInstallGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmInstallType.h" #include "cmScriptGenerator.h" diff --git a/Source/cmInstallProgramsCommand.h b/Source/cmInstallProgramsCommand.h index ca07a2f39e..2381d798b6 100644 --- a/Source/cmInstallProgramsCommand.h +++ b/Source/cmInstallProgramsCommand.h @@ -3,7 +3,8 @@ #ifndef cmInstallProgramsCommand_h #define cmInstallProgramsCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmInstallScriptGenerator.h b/Source/cmInstallScriptGenerator.h index 0b54994d3e..e183999d06 100644 --- a/Source/cmInstallScriptGenerator.h +++ b/Source/cmInstallScriptGenerator.h @@ -3,7 +3,7 @@ #ifndef cmInstallScriptGenerator_h #define cmInstallScriptGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmInstallGenerator.h" diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h index 084a0333da..e6b11b8465 100644 --- a/Source/cmInstallTargetGenerator.h +++ b/Source/cmInstallTargetGenerator.h @@ -3,7 +3,7 @@ #ifndef cmInstallTargetGenerator_h #define cmInstallTargetGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmInstallGenerator.h" #include "cmScriptGenerator.h" diff --git a/Source/cmInstallTargetsCommand.h b/Source/cmInstallTargetsCommand.h index 150397d34f..77f461aee4 100644 --- a/Source/cmInstallTargetsCommand.h +++ b/Source/cmInstallTargetsCommand.h @@ -3,7 +3,8 @@ #ifndef cmInstallTargetsCommand_h #define cmInstallTargetsCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmInstalledFile.cxx b/Source/cmInstalledFile.cxx index 8dd42b6d4e..d51fd8d747 100644 --- a/Source/cmInstalledFile.cxx +++ b/Source/cmInstalledFile.cxx @@ -7,7 +7,7 @@ #include "cmMakefile.h" #include "cmSystemTools.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <utility> cmInstalledFile::cmInstalledFile() diff --git a/Source/cmLinkDirectoriesCommand.h b/Source/cmLinkDirectoriesCommand.h index 387b3b94fc..334b1b8df3 100644 --- a/Source/cmLinkDirectoriesCommand.h +++ b/Source/cmLinkDirectoriesCommand.h @@ -3,7 +3,8 @@ #ifndef cmLinkDirectoriesCommand_h #define cmLinkDirectoriesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmLinkItem.h b/Source/cmLinkItem.h index 6fd6f500fb..ae300e6bd6 100644 --- a/Source/cmLinkItem.h +++ b/Source/cmLinkItem.h @@ -3,7 +3,7 @@ #ifndef cmLinkItem_h #define cmLinkItem_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <algorithm> #include <map> diff --git a/Source/cmLinkLibrariesCommand.h b/Source/cmLinkLibrariesCommand.h index 66d7ec4f4f..430e5a81df 100644 --- a/Source/cmLinkLibrariesCommand.h +++ b/Source/cmLinkLibrariesCommand.h @@ -3,7 +3,8 @@ #ifndef cmLinkLibrariesCommand_h #define cmLinkLibrariesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index 57a70bc4de..bf65347c21 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -4,7 +4,7 @@ #ifndef cmLinkLineComputer_h #define cmLinkLineComputer_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> diff --git a/Source/cmLinkLineDeviceComputer.h b/Source/cmLinkLineDeviceComputer.h index f275a0dead..a827b069a3 100644 --- a/Source/cmLinkLineDeviceComputer.h +++ b/Source/cmLinkLineDeviceComputer.h @@ -4,7 +4,7 @@ #ifndef cmLinkLineDeviceComputer_h #define cmLinkLineDeviceComputer_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <string> diff --git a/Source/cmLinkedTree.h b/Source/cmLinkedTree.h index 4f95522603..55592cb352 100644 --- a/Source/cmLinkedTree.h +++ b/Source/cmLinkedTree.h @@ -3,7 +3,7 @@ #ifndef cmLinkedTree_h #define cmLinkedTree_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <assert.h> #include <iterator> diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index 295ea288fd..0542c4fcea 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmListCommand.h" +#include "cmsys/RegularExpression.hxx" #include <algorithm> #include <assert.h> -#include <cmsys/RegularExpression.hxx> #include <iterator> #include <sstream> #include <stdio.h> diff --git a/Source/cmListCommand.h b/Source/cmListCommand.h index e7413caa9a..8d4aeb1e35 100644 --- a/Source/cmListCommand.h +++ b/Source/cmListCommand.h @@ -3,7 +3,8 @@ #ifndef cmListCommand_h #define cmListCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 23b666ea61..16297f37f0 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -9,9 +9,9 @@ #include "cmSystemTools.h" #include "cmake.h" +#include "cmConfigure.h" #include <algorithm> #include <assert.h> -#include <cmConfigure.h> #include <sstream> struct cmListFileParser diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 1a30f2908b..bda4ea3250 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -3,7 +3,7 @@ #ifndef cmListFileCache_h #define cmListFileCache_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <iosfwd> #include <string> diff --git a/Source/cmListFileLexer.c b/Source/cmListFileLexer.c index 44d08940a0..3dd3b85b9b 100644 --- a/Source/cmListFileLexer.c +++ b/Source/cmListFileLexer.c @@ -558,7 +558,7 @@ Modify cmListFileLexer.c: /* IWYU pragma: no_forward_declare yyguts_t */ #ifdef WIN32 -#include <cmsys/Encoding.h> +#include "cmsys/Encoding.h" #endif /* Setup the proper cmListFileLexer_yylex declaration. */ diff --git a/Source/cmListFileLexer.in.l b/Source/cmListFileLexer.in.l index dd649234fa..5152dbf08f 100644 --- a/Source/cmListFileLexer.in.l +++ b/Source/cmListFileLexer.in.l @@ -21,7 +21,7 @@ Modify cmListFileLexer.c: /* IWYU pragma: no_forward_declare yyguts_t */ #ifdef WIN32 -#include <cmsys/Encoding.h> +#include "cmsys/Encoding.h" #endif /* Setup the proper cmListFileLexer_yylex declaration. */ diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx index ea84877a9b..00a30bf0e0 100644 --- a/Source/cmLoadCacheCommand.cxx +++ b/Source/cmLoadCacheCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmLoadCacheCommand.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include "cmMakefile.h" #include "cmStateTypes.h" diff --git a/Source/cmLoadCacheCommand.h b/Source/cmLoadCacheCommand.h index 539c74e62a..8dee973b7c 100644 --- a/Source/cmLoadCacheCommand.h +++ b/Source/cmLoadCacheCommand.h @@ -3,7 +3,8 @@ #ifndef cmLoadCacheCommand_h #define cmLoadCacheCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <set> #include <string> #include <vector> diff --git a/Source/cmLoadCommandCommand.h b/Source/cmLoadCommandCommand.h index d16dfeaa23..97a6bd743c 100644 --- a/Source/cmLoadCommandCommand.h +++ b/Source/cmLoadCommandCommand.h @@ -3,7 +3,8 @@ #ifndef cmLoadCommandCommand_h #define cmLoadCommandCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmLocalCommonGenerator.h b/Source/cmLocalCommonGenerator.h index f83f3713e2..3de29d7f15 100644 --- a/Source/cmLocalCommonGenerator.h +++ b/Source/cmLocalCommonGenerator.h @@ -3,7 +3,7 @@ #ifndef cmLocalCommonGenerator_h #define cmLocalCommonGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <string> diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 9333ed7fe5..93db1928eb 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -30,9 +30,9 @@ #include "cmCryptoHash.h" #endif +#include "cmsys/RegularExpression.hxx" #include <algorithm> #include <assert.h> -#include <cmsys/RegularExpression.hxx> #include <iterator> #include <sstream> #include <stdio.h> diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 901ca35418..304725790b 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -3,9 +3,9 @@ #ifndef cmLocalGenerator_h #define cmLocalGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" -#include <cm_kwiml.h> +#include "cm_kwiml.h" #include <iosfwd> #include <map> #include <set> diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 10803196f5..fda457857d 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -3,7 +3,7 @@ #ifndef cmLocalNinjaGenerator_h #define cmLocalNinjaGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <map> diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 4388e753c1..3313127f5e 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmLocalUnixMakefileGenerator3.h" +#include "cmsys/FStream.hxx" +#include "cmsys/Terminal.h" #include <algorithm> -#include <cmsys/FStream.hxx> -#include <cmsys/Terminal.h> #include <functional> #include <sstream> #include <stdio.h> diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index c3ecda44c5..f64409cbab 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -3,7 +3,7 @@ #ifndef cmLocalUnixMakefileGenerator3_h #define cmLocalUnixMakefileGenerator3_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmDepends.h" #include "cmLocalCommonGenerator.h" diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index 0516bdf5f9..85d4a73b78 100644 --- a/Source/cmLocalVisualStudio10Generator.cxx +++ b/Source/cmLocalVisualStudio10Generator.cxx @@ -8,7 +8,7 @@ #include "cmVisualStudio10TargetGenerator.h" #include "cmXMLParser.h" -#include <cm_expat.h> +#include "cm_expat.h" class cmVS10XMLParser : public cmXMLParser { diff --git a/Source/cmLocalVisualStudio10Generator.h b/Source/cmLocalVisualStudio10Generator.h index 1ed57ec654..e57dd8f20f 100644 --- a/Source/cmLocalVisualStudio10Generator.h +++ b/Source/cmLocalVisualStudio10Generator.h @@ -3,7 +3,7 @@ #ifndef cmLocalVisualStudio10Generator_h #define cmLocalVisualStudio10Generator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <string> diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 260a84bbfe..a36e1f62ca 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -9,8 +9,8 @@ #include "cmSourceFile.h" #include "cmSystemTools.h" #include "cmXMLParser.h" +#include "cm_expat.h" #include "cmake.h" -#include <cm_expat.h> #include "cmComputeLinkInformation.h" #include "cmGeneratedFileStream.h" @@ -30,7 +30,7 @@ public: typedef cmComputeLinkInformation::ItemVector ItemVector; void OutputLibraries(std::ostream& fout, ItemVector const& libs); void OutputObjects(std::ostream& fout, cmGeneratorTarget* t, - const char* isep = 0); + std::string const& config, const char* isep = 0); private: cmLocalVisualStudio7Generator* LocalGenerator; @@ -1043,7 +1043,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( if (this->GetVersion() < cmGlobalVisualStudioGenerator::VS8 || this->FortranProject) { std::ostringstream libdeps; - this->Internal->OutputObjects(libdeps, target); + this->Internal->OutputObjects(libdeps, target, configName); if (!libdeps.str().empty()) { fout << "\t\t\t\tAdditionalDependencies=\"" << libdeps.str() << "\"\n"; @@ -1096,7 +1096,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( << this->Makefile->GetSafeDefinition(standardLibsVar.c_str()); if (this->GetVersion() < cmGlobalVisualStudioGenerator::VS8 || this->FortranProject) { - this->Internal->OutputObjects(fout, target, " "); + this->Internal->OutputObjects(fout, target, configName, " "); } fout << " "; this->Internal->OutputLibraries(fout, cli.GetItems()); @@ -1181,7 +1181,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( << this->Makefile->GetSafeDefinition(standardLibsVar.c_str()); if (this->GetVersion() < cmGlobalVisualStudioGenerator::VS8 || this->FortranProject) { - this->Internal->OutputObjects(fout, target, " "); + this->Internal->OutputObjects(fout, target, configName, " "); } fout << " "; this->Internal->OutputLibraries(fout, cli.GetItems()); @@ -1300,20 +1300,26 @@ void cmLocalVisualStudio7GeneratorInternals::OutputLibraries( } void cmLocalVisualStudio7GeneratorInternals::OutputObjects( - std::ostream& fout, cmGeneratorTarget* gt, const char* isep) + std::ostream& fout, cmGeneratorTarget* gt, std::string const& configName, + const char* isep) { // VS < 8 does not support per-config source locations so we // list object library content on the link line instead. cmLocalVisualStudio7Generator* lg = this->LocalGenerator; std::string currentBinDir = lg->GetCurrentBinaryDirectory(); - std::vector<std::string> objs; - gt->UseObjectLibraries(objs, ""); + + std::vector<cmSourceFile const*> objs; + gt->GetExternalObjects(objs, configName); + const char* sep = isep ? isep : ""; - for (std::vector<std::string>::const_iterator oi = objs.begin(); - oi != objs.end(); ++oi) { - std::string rel = lg->ConvertToRelativePath(currentBinDir, oi->c_str()); - fout << sep << lg->ConvertToXMLOutputPath(rel.c_str()); - sep = " "; + for (std::vector<cmSourceFile const*>::const_iterator i = objs.begin(); + i != objs.end(); ++i) { + if (!(*i)->GetObjectLibrary().empty()) { + std::string const& objFile = (*i)->GetFullPath(); + std::string rel = lg->ConvertToRelativePath(currentBinDir, objFile); + fout << sep << lg->ConvertToXMLOutputPath(rel.c_str()); + sep = " "; + } } } @@ -1362,21 +1368,27 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout, // We may be modifying the source groups temporarily, so make a copy. std::vector<cmSourceGroup> sourceGroups = this->Makefile->GetSourceGroups(); - // get the classes from the source lists then add them to the groups - std::vector<cmSourceFile*> classes; - if (!target->GetConfigCommonSourceFiles(classes)) { - return; - } - for (std::vector<cmSourceFile*>::const_iterator i = classes.begin(); - i != classes.end(); i++) { - if (!(*i)->GetObjectLibrary().empty()) { - continue; + std::vector<cmGeneratorTarget::AllConfigSource> const& sources = + target->GetAllConfigSources(); + std::map<cmSourceFile const*, size_t> sourcesIndex; + + for (size_t si = 0; si < sources.size(); ++si) { + cmSourceFile const* sf = sources[si].Source; + sourcesIndex[sf] = si; + if (!sf->GetObjectLibrary().empty()) { + if (this->GetVersion() < cmGlobalVisualStudioGenerator::VS8 || + this->FortranProject) { + // VS < 8 does not support per-config source locations so we + // list object library content on the link line instead. + // See OutputObjects. + continue; + } } // Add the file to the list of sources. - std::string source = (*i)->GetFullPath(); + std::string const source = sf->GetFullPath(); cmSourceGroup* sourceGroup = this->Makefile->FindSourceGroup(source.c_str(), sourceGroups); - sourceGroup->AssignSource(*i); + sourceGroup->AssignSource(sf); } // open the project @@ -1389,25 +1401,7 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout, // Loop through every source group. for (unsigned int i = 0; i < sourceGroups.size(); ++i) { cmSourceGroup sg = sourceGroups[i]; - this->WriteGroup(&sg, target, fout, libName, configs); - } - - if (this->GetVersion() >= cmGlobalVisualStudioGenerator::VS8 && - !this->FortranProject) { - // VS >= 8 support per-config source locations so we - // list object library content as external objects. - std::vector<std::string> objs; - target->UseObjectLibraries(objs, ""); - if (!objs.empty()) { - // TODO: Separate sub-filter for each object library used? - fout << "\t\t<Filter Name=\"Object Libraries\">\n"; - for (std::vector<std::string>::const_iterator oi = objs.begin(); - oi != objs.end(); ++oi) { - std::string o = this->ConvertToXMLOutputPathSingle(oi->c_str()); - fout << "\t\t\t<File RelativePath=\"" << o << "\" />\n"; - } - fout << "\t\t</Filter>\n"; - } + this->WriteGroup(&sg, target, fout, libName, configs, sourcesIndex); } fout << "\t</Files>\n"; @@ -1429,25 +1423,28 @@ struct cmLVS7GFileConfig class cmLocalVisualStudio7GeneratorFCInfo { public: - cmLocalVisualStudio7GeneratorFCInfo(cmLocalVisualStudio7Generator* lg, - cmGeneratorTarget* target, - cmSourceFile const& sf, - std::vector<std::string> const& configs); + cmLocalVisualStudio7GeneratorFCInfo( + cmLocalVisualStudio7Generator* lg, cmGeneratorTarget* target, + cmGeneratorTarget::AllConfigSource const& acs, + std::vector<std::string> const& configs); std::map<std::string, cmLVS7GFileConfig> FileConfigMap; }; cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo( cmLocalVisualStudio7Generator* lg, cmGeneratorTarget* gt, - cmSourceFile const& sf, std::vector<std::string> const& configs) + cmGeneratorTarget::AllConfigSource const& acs, + std::vector<std::string> const& configs) { + cmSourceFile const& sf = *acs.Source; std::string objectName; if (gt->HasExplicitObjectName(&sf)) { objectName = gt->GetObjectName(&sf); } // Compute per-source, per-config information. + size_t ci = 0; for (std::vector<std::string>::const_iterator i = configs.begin(); - i != configs.end(); ++i) { + i != configs.end(); ++i, ++ci) { std::string configUpper = cmSystemTools::UpperCase(*i); cmLVS7GFileConfig fc; bool needfc = false; @@ -1513,7 +1510,9 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo( } // If HEADER_FILE_ONLY is set, we must suppress this generation in // the project file - fc.ExcludedFromBuild = (sf.GetPropertyAsBool("HEADER_FILE_ONLY")); + fc.ExcludedFromBuild = sf.GetPropertyAsBool("HEADER_FILE_ONLY") || + std::find(acs.Configs.begin(), acs.Configs.end(), ci) == + acs.Configs.end(); if (fc.ExcludedFromBuild) { needfc = true; } @@ -1568,7 +1567,8 @@ std::string cmLocalVisualStudio7Generator::ComputeLongestObjectDirectory( bool cmLocalVisualStudio7Generator::WriteGroup( const cmSourceGroup* sg, cmGeneratorTarget* target, std::ostream& fout, - const std::string& libName, std::vector<std::string> const& configs) + const std::string& libName, std::vector<std::string> const& configs, + std::map<cmSourceFile const*, size_t> const& sourcesIndex) { cmGlobalVisualStudio7Generator* gg = static_cast<cmGlobalVisualStudio7Generator*>(this->GlobalGenerator); @@ -1579,7 +1579,8 @@ bool cmLocalVisualStudio7Generator::WriteGroup( bool hasChildrenWithSources = false; std::ostringstream tmpOut; for (unsigned int i = 0; i < children.size(); ++i) { - if (this->WriteGroup(&children[i], target, tmpOut, libName, configs)) { + if (this->WriteGroup(&children[i], target, tmpOut, libName, configs, + sourcesIndex)) { hasChildrenWithSources = true; } } @@ -1595,15 +1596,26 @@ bool cmLocalVisualStudio7Generator::WriteGroup( this->WriteVCProjBeginGroup(fout, name.c_str(), ""); } + std::vector<cmGeneratorTarget::AllConfigSource> const& sources = + target->GetAllConfigSources(); + // Loop through each source in the source group. for (std::vector<const cmSourceFile*>::const_iterator sf = sourceFiles.begin(); sf != sourceFiles.end(); ++sf) { std::string source = (*sf)->GetFullPath(); - FCInfo fcinfo(this, target, *(*sf), configs); if (source != libName || target->GetType() == cmStateEnums::UTILITY || target->GetType() == cmStateEnums::GLOBAL_TARGET) { + // Look up the source kind and configs. + std::map<cmSourceFile const*, size_t>::const_iterator map_it = + sourcesIndex.find(*sf); + // The map entry must exist because we populated it earlier. + assert(map_it != sourcesIndex.end()); + cmGeneratorTarget::AllConfigSource const& acs = sources[map_it->second]; + + FCInfo fcinfo(this, target, acs, configs); + fout << "\t\t\t<File\n"; std::string d = this->ConvertToXMLOutputPathSingle(source.c_str()); // Tell MS-Dev what the source is. If the compiler knows how to @@ -1643,6 +1655,9 @@ bool cmLocalVisualStudio7Generator::WriteGroup( lang == "ASM_MASM") { aCompilerTool = "MASM"; } + if (acs.Kind == cmGeneratorTarget::SourceKindExternalObject) { + aCompilerTool = "VCCustomBuildTool"; + } for (std::map<std::string, cmLVS7GFileConfig>::const_iterator fci = fcinfo.FileConfigMap.begin(); fci != fcinfo.FileConfigMap.end(); ++fci) { diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h index ae6e2ede83..89a3ee353c 100644 --- a/Source/cmLocalVisualStudio7Generator.h +++ b/Source/cmLocalVisualStudio7Generator.h @@ -3,7 +3,7 @@ #ifndef cmLocalVisualStudio7Generator_h #define cmLocalVisualStudio7Generator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <string> @@ -119,7 +119,8 @@ private: bool WriteGroup(const cmSourceGroup* sg, cmGeneratorTarget* target, std::ostream& fout, const std::string& libName, - std::vector<std::string> const& configs); + std::vector<std::string> const& configs, + std::map<cmSourceFile const*, size_t> const& sourcesIndex); friend class cmLocalVisualStudio7GeneratorFCInfo; friend class cmLocalVisualStudio7GeneratorInternals; diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h index 39188f9026..85fb8a5112 100644 --- a/Source/cmLocalVisualStudioGenerator.h +++ b/Source/cmLocalVisualStudioGenerator.h @@ -3,7 +3,7 @@ #ifndef cmLocalVisualStudioGenerator_h #define cmLocalVisualStudioGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <map> #include <memory> diff --git a/Source/cmLocalXCodeGenerator.h b/Source/cmLocalXCodeGenerator.h index b4a8c6c05d..4ca02a9d01 100644 --- a/Source/cmLocalXCodeGenerator.h +++ b/Source/cmLocalXCodeGenerator.h @@ -3,7 +3,8 @@ #ifndef cmLocalXCodeGenerator_h #define cmLocalXCodeGenerator_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep + #include <map> #include <string> diff --git a/Source/cmLocale.h b/Source/cmLocale.h index cca7cf5491..b98009f663 100644 --- a/Source/cmLocale.h +++ b/Source/cmLocale.h @@ -3,7 +3,7 @@ #ifndef cmLocale_h #define cmLocale_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <locale.h> #include <string> diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h index 9a28dca0d5..612658c4e4 100644 --- a/Source/cmMSVC60LinkLineComputer.h +++ b/Source/cmMSVC60LinkLineComputer.h @@ -4,7 +4,7 @@ #ifndef cmMSVC60LinkLineComputer_h #define cmMSVC60LinkLineComputer_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <string> diff --git a/Source/cmMachO.cxx b/Source/cmMachO.cxx index 586e6c697a..a4350f7cee 100644 --- a/Source/cmMachO.cxx +++ b/Source/cmMachO.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMachO.h" +#include "cmsys/FStream.hxx" #include <algorithm> -#include <cmsys/FStream.hxx> #include <stddef.h> #include <string> #include <vector> diff --git a/Source/cmMachO.h b/Source/cmMachO.h index 901f17abc2..42745cf60a 100644 --- a/Source/cmMachO.h +++ b/Source/cmMachO.h @@ -3,7 +3,7 @@ #ifndef cmMachO_h #define cmMachO_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <string> diff --git a/Source/cmMacroCommand.h b/Source/cmMacroCommand.h index acb42339ce..f0020ff7d6 100644 --- a/Source/cmMacroCommand.h +++ b/Source/cmMacroCommand.h @@ -3,7 +3,8 @@ #ifndef cmMacroCommand_h #define cmMacroCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmMakeDirectoryCommand.h b/Source/cmMakeDirectoryCommand.h index d9cce6f735..54f4ab3538 100644 --- a/Source/cmMakeDirectoryCommand.h +++ b/Source/cmMakeDirectoryCommand.h @@ -3,7 +3,8 @@ #ifndef cmMakeDirectoryCommand_h #define cmMakeDirectoryCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index f7d822ac8c..4ed76c7b16 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2,10 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefile.h" +#include "cmsys/FStream.hxx" +#include "cmsys/RegularExpression.hxx" #include <algorithm> #include <assert.h> -#include <cmsys/FStream.hxx> -#include <cmsys/RegularExpression.hxx> #include <ctype.h> #include <sstream> #include <stdlib.h> @@ -94,6 +94,10 @@ cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator, this->AddSourceGroup("CMake Rules", "\\.rule$"); this->AddSourceGroup("Resources", "\\.plist$"); this->AddSourceGroup("Object Files", "\\.(lo|o|obj)$"); + + this->ObjectLibrariesSourceGroupIndex = this->SourceGroups.size(); + this->SourceGroups.push_back( + cmSourceGroup("Object Libraries", "^MATCH_NO_SOURCES$")); #endif } @@ -3124,6 +3128,18 @@ cmSourceFile* cmMakefile::GetOrCreateSource(const std::string& sourceName, return this->CreateSource(sourceName, generated); } +void cmMakefile::AddTargetObject(std::string const& tgtName, + std::string const& objFile) +{ + cmSourceFile* sf = this->GetOrCreateSource(objFile, true); + sf->SetObjectLibrary(tgtName); + sf->SetProperty("EXTERNAL_OBJECT", "1"); +#if defined(CMAKE_BUILD_WITH_CMAKE) + this->SourceGroups[this->ObjectLibrariesSourceGroupIndex].AddGroupFile( + sf->GetFullPath()); +#endif +} + void cmMakefile::EnableLanguage(std::vector<std::string> const& lang, bool optional) { diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 4e48c8888b..7543a89391 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -3,12 +3,13 @@ #ifndef cmMakefile_h #define cmMakefile_h -#include <cmConfigure.h> +#include "cmConfigure.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <map> #include <set> #include <stack> +#include <stddef.h> #include <string> #include <vector> @@ -406,6 +407,8 @@ public: cmSourceFile* GetOrCreateSource(const std::string& sourceName, bool generated = false); + void AddTargetObject(std::string const& tgtName, std::string const& objFile); + /** * Given a variable name, return its value (as a string). * If the variable is not found in this makefile instance, the @@ -817,6 +820,7 @@ protected: #if defined(CMAKE_BUILD_WITH_CMAKE) std::vector<cmSourceGroup> SourceGroups; + size_t ObjectLibrariesSourceGroupIndex; #endif std::vector<cmCommand*> FinalPassCommands; diff --git a/Source/cmMakefileExecutableTargetGenerator.h b/Source/cmMakefileExecutableTargetGenerator.h index 598ac3dd22..01aa6270cf 100644 --- a/Source/cmMakefileExecutableTargetGenerator.h +++ b/Source/cmMakefileExecutableTargetGenerator.h @@ -3,7 +3,7 @@ #ifndef cmMakefileExecutableTargetGenerator_h #define cmMakefileExecutableTargetGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <string> diff --git a/Source/cmMakefileLibraryTargetGenerator.h b/Source/cmMakefileLibraryTargetGenerator.h index 93ce902109..da1d8b65ca 100644 --- a/Source/cmMakefileLibraryTargetGenerator.h +++ b/Source/cmMakefileLibraryTargetGenerator.h @@ -3,7 +3,7 @@ #ifndef cmMakefileLibraryTargetGenerator_h #define cmMakefileLibraryTargetGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmMakefileTargetGenerator.h" diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 07b80058b9..32b1fee5ce 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -3,7 +3,7 @@ #ifndef cmMakefileTargetGenerator_h #define cmMakefileTargetGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <map> diff --git a/Source/cmMakefileUtilityTargetGenerator.h b/Source/cmMakefileUtilityTargetGenerator.h index 332c04e647..8df5dd46f1 100644 --- a/Source/cmMakefileUtilityTargetGenerator.h +++ b/Source/cmMakefileUtilityTargetGenerator.h @@ -3,7 +3,7 @@ #ifndef cmMakefileUtilityTargetGenerator_h #define cmMakefileUtilityTargetGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmMakefileTargetGenerator.h" diff --git a/Source/cmMarkAsAdvancedCommand.h b/Source/cmMarkAsAdvancedCommand.h index 26caa66249..8c2f85b15c 100644 --- a/Source/cmMarkAsAdvancedCommand.h +++ b/Source/cmMarkAsAdvancedCommand.h @@ -3,7 +3,8 @@ #ifndef cmMarkAsAdvancedCommand_h #define cmMarkAsAdvancedCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmMathCommand.h b/Source/cmMathCommand.h index 9b49b211b9..496d836cc0 100644 --- a/Source/cmMathCommand.h +++ b/Source/cmMathCommand.h @@ -3,7 +3,8 @@ #ifndef cmMathCommand_h #define cmMathCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmMessageCommand.h b/Source/cmMessageCommand.h index a5656355b9..ca83ed6fc5 100644 --- a/Source/cmMessageCommand.h +++ b/Source/cmMessageCommand.h @@ -3,7 +3,8 @@ #ifndef cmMessageCommand_h #define cmMessageCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmMessenger.cxx b/Source/cmMessenger.cxx index fe1c261cc8..3ae5bc5c27 100644 --- a/Source/cmMessenger.cxx +++ b/Source/cmMessenger.cxx @@ -8,7 +8,7 @@ #include "cmSystemTools.h" #if defined(CMAKE_BUILD_WITH_CMAKE) -#include <cmsys/SystemInformation.hxx> +#include "cmsys/SystemInformation.hxx" #endif #include <sstream> diff --git a/Source/cmMessenger.h b/Source/cmMessenger.h index 89f8efe082..4aafbd40bf 100644 --- a/Source/cmMessenger.h +++ b/Source/cmMessenger.h @@ -3,7 +3,7 @@ #ifndef cmMessenger_h #define cmMessenger_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmListFileCache.h" #include "cmake.h" diff --git a/Source/cmNewLineStyle.h b/Source/cmNewLineStyle.h index b46414cd99..397cd2c501 100644 --- a/Source/cmNewLineStyle.h +++ b/Source/cmNewLineStyle.h @@ -3,7 +3,7 @@ #ifndef cmNewLineStyle_h #define cmNewLineStyle_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h index ff0771b828..db6d4a8de5 100644 --- a/Source/cmNinjaLinkLineComputer.h +++ b/Source/cmNinjaLinkLineComputer.h @@ -4,7 +4,7 @@ #ifndef cmNinjaLinkLineComputer_h #define cmNinjaLinkLineComputer_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <string> diff --git a/Source/cmNinjaNormalTargetGenerator.h b/Source/cmNinjaNormalTargetGenerator.h index e5595ea086..677b1c666f 100644 --- a/Source/cmNinjaNormalTargetGenerator.h +++ b/Source/cmNinjaNormalTargetGenerator.h @@ -3,7 +3,7 @@ #ifndef cmNinjaNormalTargetGenerator_h #define cmNinjaNormalTargetGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmNinjaTargetGenerator.h" diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 2b16e1977b..b00815864d 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -2,10 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmNinjaTargetGenerator.h" +#include "cm_jsoncpp_value.h" +#include "cm_jsoncpp_writer.h" #include <algorithm> #include <assert.h> -#include <cm_jsoncpp_value.h> -#include <cm_jsoncpp_writer.h> #include <iterator> #include <map> #include <sstream> diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h index 7aba66b464..9ce86512aa 100644 --- a/Source/cmNinjaTargetGenerator.h +++ b/Source/cmNinjaTargetGenerator.h @@ -3,7 +3,7 @@ #ifndef cmNinjaTargetGenerator_h #define cmNinjaTargetGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmCommonTargetGenerator.h" #include "cmGlobalNinjaGenerator.h" diff --git a/Source/cmNinjaTypes.h b/Source/cmNinjaTypes.h index 3fd536ab45..b4af70e863 100644 --- a/Source/cmNinjaTypes.h +++ b/Source/cmNinjaTypes.h @@ -3,7 +3,7 @@ #ifndef cmNinjaTypes_h #define cmNinjaTypes_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <map> #include <string> diff --git a/Source/cmNinjaUtilityTargetGenerator.h b/Source/cmNinjaUtilityTargetGenerator.h index 897f4324ea..9256e369c4 100644 --- a/Source/cmNinjaUtilityTargetGenerator.h +++ b/Source/cmNinjaUtilityTargetGenerator.h @@ -3,7 +3,7 @@ #ifndef cmNinjaUtilityTargetGenerator_h #define cmNinjaUtilityTargetGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmNinjaTargetGenerator.h" diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx index c9f6cebbe3..c09feefa73 100644 --- a/Source/cmOSXBundleGenerator.cxx +++ b/Source/cmOSXBundleGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmOSXBundleGenerator.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmGeneratorTarget.h" #include "cmLocalGenerator.h" diff --git a/Source/cmOSXBundleGenerator.h b/Source/cmOSXBundleGenerator.h index 0a5a6c5ee5..be7e932f93 100644 --- a/Source/cmOSXBundleGenerator.h +++ b/Source/cmOSXBundleGenerator.h @@ -3,7 +3,7 @@ #ifndef cmOSXBundleGenerator_h #define cmOSXBundleGenerator_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <set> #include <string> diff --git a/Source/cmOptionCommand.h b/Source/cmOptionCommand.h index 09567ffc2f..86fa41fe9b 100644 --- a/Source/cmOptionCommand.h +++ b/Source/cmOptionCommand.h @@ -3,7 +3,8 @@ #ifndef cmOptionCommand_h #define cmOptionCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h index d9e01269f5..3a0637afb7 100644 --- a/Source/cmOrderDirectories.h +++ b/Source/cmOrderDirectories.h @@ -3,9 +3,9 @@ #ifndef cmOrderDirectories_h #define cmOrderDirectories_h -#include <cmConfigure.h> +#include "cmConfigure.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <map> #include <set> #include <string> diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index a3da4cd169..12a1773191 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -3,7 +3,7 @@ #ifndef cmOutputConverter_h #define cmOutputConverter_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx index 3db0fec5dd..8b8cf0760e 100644 --- a/Source/cmOutputRequiredFilesCommand.cxx +++ b/Source/cmOutputRequiredFilesCommand.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmOutputRequiredFilesCommand.h" -#include <cmsys/FStream.hxx> -#include <cmsys/RegularExpression.hxx> +#include "cmsys/FStream.hxx" +#include "cmsys/RegularExpression.hxx" #include <map> #include <utility> diff --git a/Source/cmOutputRequiredFilesCommand.h b/Source/cmOutputRequiredFilesCommand.h index c4ce680252..e261eb06df 100644 --- a/Source/cmOutputRequiredFilesCommand.h +++ b/Source/cmOutputRequiredFilesCommand.h @@ -3,7 +3,8 @@ #ifndef cmOutputRequiredFilesCommand_h #define cmOutputRequiredFilesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <set> #include <stdio.h> #include <string> diff --git a/Source/cmParseArgumentsCommand.h b/Source/cmParseArgumentsCommand.h index 079eadb82b..4d9416d727 100644 --- a/Source/cmParseArgumentsCommand.h +++ b/Source/cmParseArgumentsCommand.h @@ -3,7 +3,8 @@ #ifndef cmParseArgumentsCommand_h #define cmParseArgumentsCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmPathLabel.h b/Source/cmPathLabel.h index cd9743c70c..97551fb463 100644 --- a/Source/cmPathLabel.h +++ b/Source/cmPathLabel.h @@ -3,7 +3,7 @@ #ifndef cmPathLabel_h #define cmPathLabel_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 6339e11584..837557b7f8 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -8,8 +8,8 @@ #include "cmVersion.h" #include "cmake.h" +#include "cmConfigure.h" #include <assert.h> -#include <cmConfigure.h> #include <ctype.h> #include <sstream> #include <stdio.h> diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 72dcc4f002..120beb6820 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -3,7 +3,7 @@ #ifndef cmPolicies_h #define cmPolicies_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <bitset> #include <string> diff --git a/Source/cmProcessOutput.h b/Source/cmProcessOutput.h index d2e631f88c..b5ec4a8be6 100644 --- a/Source/cmProcessOutput.h +++ b/Source/cmProcessOutput.h @@ -3,7 +3,7 @@ #ifndef cmProcessOutput_h #define cmProcessOutput_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <stddef.h> #include <string> diff --git a/Source/cmProcessTools.cxx b/Source/cmProcessTools.cxx index b75665075d..de7b061265 100644 --- a/Source/cmProcessTools.cxx +++ b/Source/cmProcessTools.cxx @@ -3,7 +3,7 @@ #include "cmProcessTools.h" #include "cmProcessOutput.h" -#include <cmsys/Process.h> +#include "cmsys/Process.h" #include <ostream> void cmProcessTools::RunProcess(struct cmsysProcess_s* cp, OutputParser* out, diff --git a/Source/cmProcessTools.h b/Source/cmProcessTools.h index df131b95b9..e7d9a10eba 100644 --- a/Source/cmProcessTools.h +++ b/Source/cmProcessTools.h @@ -3,8 +3,8 @@ #ifndef cmProcessTools_h #define cmProcessTools_h +#include "cmConfigure.h" #include "cmProcessOutput.h" -#include <cmConfigure.h> #include <iosfwd> #include <string.h> diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index 4e0fa575aa..d47a047a15 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmProjectCommand.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <sstream> #include <stdio.h> @@ -62,10 +62,13 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args, bool haveVersion = false; bool haveLanguages = false; + bool haveDescription = false; std::string version; + std::string description; std::vector<std::string> languages; enum Doing { + DoingDescription, DoingLanguages, DoingVersion }; @@ -89,9 +92,21 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args, } haveVersion = true; doing = DoingVersion; + } else if (args[i] == "DESCRIPTION") { + if (haveDescription) { + this->Makefile->IssueMessage( + cmake::FATAL_ERROR, "DESCRITPION may be specified at most once."); + cmSystemTools::SetFatalErrorOccured(); + return true; + } + haveDescription = true; + doing = DoingDescription; } else if (doing == DoingVersion) { doing = DoingLanguages; version = args[i]; + } else if (doing == DoingDescription) { + doing = DoingLanguages; + description = args[i]; } else // doing == DoingLanguages { languages.push_back(args[i]); @@ -197,6 +212,22 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args, } } + if (haveDescription) { + this->Makefile->AddDefinition("PROJECT_DESCRIPTION", description.c_str()); + // Set the CMAKE_PROJECT_DESCRIPTION variable to be the highest-level + // project name in the tree. If there are two project commands + // in the same CMakeLists.txt file, and it is the top level + // CMakeLists.txt file, then go with the last one. + if (!this->Makefile->GetDefinition("CMAKE_PROJECT_DESCRIPTION") || + (this->Makefile->IsRootMakefile())) { + this->Makefile->AddDefinition("CMAKE_PROJECT_DESCRIPTION", + description.c_str()); + this->Makefile->AddCacheDefinition( + "CMAKE_PROJECT_DESCRIPTION", description.c_str(), + "Value Computed by CMake", cmStateEnums::STATIC); + } + } + if (languages.empty()) { // if no language is specified do c and c++ languages.push_back("C"); diff --git a/Source/cmProjectCommand.h b/Source/cmProjectCommand.h index cd92176c3a..8fc90d24bc 100644 --- a/Source/cmProjectCommand.h +++ b/Source/cmProjectCommand.h @@ -3,7 +3,8 @@ #ifndef cmProjectCommand_h #define cmProjectCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmProperty.cxx b/Source/cmProperty.cxx index 90122a49fc..222afb4973 100644 --- a/Source/cmProperty.cxx +++ b/Source/cmProperty.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmProperty.h" -#include <cmConfigure.h> +#include "cmConfigure.h" void cmProperty::Set(const char* value) { diff --git a/Source/cmProperty.h b/Source/cmProperty.h index 3f2dcfe137..d11c5efbb7 100644 --- a/Source/cmProperty.h +++ b/Source/cmProperty.h @@ -3,7 +3,7 @@ #ifndef cmProperty_h #define cmProperty_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> diff --git a/Source/cmPropertyDefinition.h b/Source/cmPropertyDefinition.h index eb8d064400..9adff49023 100644 --- a/Source/cmPropertyDefinition.h +++ b/Source/cmPropertyDefinition.h @@ -3,7 +3,7 @@ #ifndef cmPropertyDefinition_h #define cmPropertyDefinition_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmProperty.h" diff --git a/Source/cmPropertyDefinitionMap.h b/Source/cmPropertyDefinitionMap.h index e74750385d..97ba55391a 100644 --- a/Source/cmPropertyDefinitionMap.h +++ b/Source/cmPropertyDefinitionMap.h @@ -3,7 +3,7 @@ #ifndef cmPropertyDefinitionMap_h #define cmPropertyDefinitionMap_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmProperty.h" #include "cmPropertyDefinition.h" diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx index fa92ae231f..1e089d1c8a 100644 --- a/Source/cmPropertyMap.cxx +++ b/Source/cmPropertyMap.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmPropertyMap.h" +#include "cmConfigure.h" #include <algorithm> #include <assert.h> -#include <cmConfigure.h> #include <utility> cmProperty* cmPropertyMap::GetOrCreateProperty(const std::string& name) diff --git a/Source/cmPropertyMap.h b/Source/cmPropertyMap.h index e1db7df661..5a0515076d 100644 --- a/Source/cmPropertyMap.h +++ b/Source/cmPropertyMap.h @@ -3,7 +3,7 @@ #ifndef cmPropertyMap_h #define cmPropertyMap_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmProperty.h" diff --git a/Source/cmQTWrapCPPCommand.h b/Source/cmQTWrapCPPCommand.h index 8eb5ff93eb..34adf29b93 100644 --- a/Source/cmQTWrapCPPCommand.h +++ b/Source/cmQTWrapCPPCommand.h @@ -3,7 +3,8 @@ #ifndef cmQTWrapCPPCommand_h #define cmQTWrapCPPCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmQTWrapUICommand.h b/Source/cmQTWrapUICommand.h index 876ddd529f..279d4e9cf9 100644 --- a/Source/cmQTWrapUICommand.h +++ b/Source/cmQTWrapUICommand.h @@ -3,7 +3,8 @@ #ifndef cmQTWrapUICommand_h #define cmQTWrapUICommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmQtAutoGeneratorCommon.cxx b/Source/cmQtAutoGeneratorCommon.cxx index 2498fe80b2..18075147ca 100644 --- a/Source/cmQtAutoGeneratorCommon.cxx +++ b/Source/cmQtAutoGeneratorCommon.cxx @@ -4,8 +4,8 @@ #include "cmAlgorithms.h" #include "cmSystemTools.h" -#include <cmsys/FStream.hxx> -#include <cmsys/RegularExpression.hxx> +#include "cmsys/FStream.hxx" +#include "cmsys/RegularExpression.hxx" #include <sstream> #include <stddef.h> diff --git a/Source/cmQtAutoGeneratorCommon.h b/Source/cmQtAutoGeneratorCommon.h index b004005361..a131baf20e 100644 --- a/Source/cmQtAutoGeneratorCommon.h +++ b/Source/cmQtAutoGeneratorCommon.h @@ -3,7 +3,8 @@ #ifndef cmQtAutoGeneratorCommon_h #define cmQtAutoGeneratorCommon_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index d69794c743..e6d9a9f9bf 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -22,9 +22,9 @@ #include "cmGlobalVisualStudioGenerator.h" #endif +#include "cmConfigure.h" +#include "cmsys/FStream.hxx" #include <algorithm> -#include <cmConfigure.h> -#include <cmsys/FStream.hxx> #include <map> #include <set> #include <string> diff --git a/Source/cmQtAutoGeneratorInitializer.h b/Source/cmQtAutoGeneratorInitializer.h index 26f2c8ee76..ca806f5a9c 100644 --- a/Source/cmQtAutoGeneratorInitializer.h +++ b/Source/cmQtAutoGeneratorInitializer.h @@ -3,7 +3,7 @@ #ifndef cmQtAutoGeneratorInitializer_h #define cmQtAutoGeneratorInitializer_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep class cmGeneratorTarget; class cmLocalGenerator; diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 246dd8d902..88ec9e825e 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -3,11 +3,11 @@ #include "cmQtAutoGenerators.h" #include "cmQtAutoGeneratorCommon.h" +#include "cmConfigure.h" +#include "cmsys/FStream.hxx" +#include "cmsys/Terminal.h" #include <algorithm> #include <assert.h> -#include <cmConfigure.h> -#include <cmsys/FStream.hxx> -#include <cmsys/Terminal.h> #include <list> #include <sstream> #include <stdlib.h> diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index ee046deddd..d35905916f 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -3,9 +3,10 @@ #ifndef cmQtAutoGenerators_h #define cmQtAutoGenerators_h -#include <cmConfigure.h> // IWYU pragma: keep -#include <cmFilePathChecksum.h> -#include <cmsys/RegularExpression.hxx> +#include "cmConfigure.h" // IWYU pragma: keep + +#include "cmFilePathChecksum.h" +#include "cmsys/RegularExpression.hxx" #include <map> #include <set> diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index 355b8c41d9..70ffc7d5a3 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -6,8 +6,8 @@ #include "cmSystemTools.h" #include "cmVersion.h" +#include "cmsys/FStream.hxx" #include <algorithm> -#include <cmsys/FStream.hxx> #include <ctype.h> #include <iterator> #include <stddef.h> diff --git a/Source/cmRST.h b/Source/cmRST.h index 2fedf4bfa3..d1a8e27117 100644 --- a/Source/cmRST.h +++ b/Source/cmRST.h @@ -3,9 +3,9 @@ #ifndef _cmRST_h #define _cmRST_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <iosfwd> #include <map> #include <set> diff --git a/Source/cmRemoveCommand.h b/Source/cmRemoveCommand.h index c935f28708..38223a5d40 100644 --- a/Source/cmRemoveCommand.h +++ b/Source/cmRemoveCommand.h @@ -3,7 +3,8 @@ #ifndef cmRemoveCommand_h #define cmRemoveCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmRemoveDefinitionsCommand.h b/Source/cmRemoveDefinitionsCommand.h index 2bcc12dd73..2f6c924ca4 100644 --- a/Source/cmRemoveDefinitionsCommand.h +++ b/Source/cmRemoveDefinitionsCommand.h @@ -3,7 +3,8 @@ #ifndef cmRemoveDefinitionsCommand_h #define cmRemoveDefinitionsCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmReturnCommand.h b/Source/cmReturnCommand.h index 9496d67a37..ceed6b540c 100644 --- a/Source/cmReturnCommand.h +++ b/Source/cmReturnCommand.h @@ -3,7 +3,8 @@ #ifndef cmReturnCommand_h #define cmReturnCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmRulePlaceholderExpander.h b/Source/cmRulePlaceholderExpander.h index 83291664a2..90b41195ec 100644 --- a/Source/cmRulePlaceholderExpander.h +++ b/Source/cmRulePlaceholderExpander.h @@ -4,7 +4,7 @@ #ifndef cmRulePlaceholderExpander_h #define cmRulePlaceholderExpander_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <map> #include <string> diff --git a/Source/cmScriptGenerator.cxx b/Source/cmScriptGenerator.cxx index 4c5ab64f74..2a2dd40b8a 100644 --- a/Source/cmScriptGenerator.cxx +++ b/Source/cmScriptGenerator.cxx @@ -4,7 +4,7 @@ #include "cmSystemTools.h" -#include <cmConfigure.h> +#include "cmConfigure.h" cmScriptGenerator::cmScriptGenerator( const std::string& config_var, diff --git a/Source/cmScriptGenerator.h b/Source/cmScriptGenerator.h index a8f6fae9fa..0e98b27e9a 100644 --- a/Source/cmScriptGenerator.h +++ b/Source/cmScriptGenerator.h @@ -3,7 +3,7 @@ #ifndef cmScriptGenerator_h #define cmScriptGenerator_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <ostream> #include <string> diff --git a/Source/cmSearchPath.h b/Source/cmSearchPath.h index 9ffa87125b..932022aa1f 100644 --- a/Source/cmSearchPath.h +++ b/Source/cmSearchPath.h @@ -3,7 +3,7 @@ #ifndef cmSearchPath_h #define cmSearchPath_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <set> #include <string> diff --git a/Source/cmSeparateArgumentsCommand.h b/Source/cmSeparateArgumentsCommand.h index 1cbf56e79f..7edde487e3 100644 --- a/Source/cmSeparateArgumentsCommand.h +++ b/Source/cmSeparateArgumentsCommand.h @@ -3,7 +3,8 @@ #ifndef cmSeparateArgumentsCommand_h #define cmSeparateArgumentsCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmServerConnection.h b/Source/cmServerConnection.h index 9357831b58..1fabe37927 100644 --- a/Source/cmServerConnection.h +++ b/Source/cmServerConnection.h @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #pragma once -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmSetCommand.h b/Source/cmSetCommand.h index 190092acce..1c67bf9831 100644 --- a/Source/cmSetCommand.h +++ b/Source/cmSetCommand.h @@ -3,7 +3,8 @@ #ifndef cmSetCommand_h #define cmSetCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmSetDirectoryPropertiesCommand.h b/Source/cmSetDirectoryPropertiesCommand.h index 854ad4374a..e04de6e29d 100644 --- a/Source/cmSetDirectoryPropertiesCommand.h +++ b/Source/cmSetDirectoryPropertiesCommand.h @@ -3,7 +3,8 @@ #ifndef cmSetDirectoryPropertiesCommand_h #define cmSetDirectoryPropertiesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmSetPropertyCommand.h b/Source/cmSetPropertyCommand.h index fd7c922abb..3657f634d4 100644 --- a/Source/cmSetPropertyCommand.h +++ b/Source/cmSetPropertyCommand.h @@ -3,7 +3,8 @@ #ifndef cmSetsPropertiesCommand_h #define cmSetsPropertiesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <set> #include <string> #include <vector> diff --git a/Source/cmSetSourceFilesPropertiesCommand.h b/Source/cmSetSourceFilesPropertiesCommand.h index 8fa12c7806..7dce4377b2 100644 --- a/Source/cmSetSourceFilesPropertiesCommand.h +++ b/Source/cmSetSourceFilesPropertiesCommand.h @@ -3,7 +3,8 @@ #ifndef cmSetSourceFilesPropertiesCommand_h #define cmSetSourceFilesPropertiesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h index c3c0d06cfe..bb34d1e739 100644 --- a/Source/cmSetTargetPropertiesCommand.h +++ b/Source/cmSetTargetPropertiesCommand.h @@ -3,7 +3,8 @@ #ifndef cmSetTargetsPropertiesCommand_h #define cmSetTargetsPropertiesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmSetTestsPropertiesCommand.h b/Source/cmSetTestsPropertiesCommand.h index 45aed792c9..56a864ffb9 100644 --- a/Source/cmSetTestsPropertiesCommand.h +++ b/Source/cmSetTestsPropertiesCommand.h @@ -3,7 +3,8 @@ #ifndef cmSetTestsPropertiesCommand_h #define cmSetTestsPropertiesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx index 4322a6d282..7eace268f1 100644 --- a/Source/cmSiteNameCommand.cxx +++ b/Source/cmSiteNameCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSiteNameCommand.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include "cmMakefile.h" #include "cmStateTypes.h" diff --git a/Source/cmSiteNameCommand.h b/Source/cmSiteNameCommand.h index 01023b96ee..c7425f6b77 100644 --- a/Source/cmSiteNameCommand.h +++ b/Source/cmSiteNameCommand.h @@ -3,7 +3,8 @@ #ifndef cmSiteNameCommand_h #define cmSiteNameCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h index bbcc3006b6..0be659c5fe 100644 --- a/Source/cmSourceFile.h +++ b/Source/cmSourceFile.h @@ -3,7 +3,7 @@ #ifndef cmSourceFile_h #define cmSourceFile_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmPropertyMap.h" #include "cmSourceFileLocation.h" diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx index 4e0880e932..86711d7845 100644 --- a/Source/cmSourceFileLocation.cxx +++ b/Source/cmSourceFileLocation.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmSourceFileLocation.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmAlgorithms.h" #include "cmGlobalGenerator.h" diff --git a/Source/cmSourceFileLocation.h b/Source/cmSourceFileLocation.h index aa2e6c7686..6dbc2daedb 100644 --- a/Source/cmSourceFileLocation.h +++ b/Source/cmSourceFileLocation.h @@ -3,7 +3,7 @@ #ifndef cmSourceFileLocation_h #define cmSourceFileLocation_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h index 545da8192c..97affed6ed 100644 --- a/Source/cmSourceGroup.h +++ b/Source/cmSourceGroup.h @@ -3,9 +3,9 @@ #ifndef cmSourceGroup_h #define cmSourceGroup_h -#include <cmConfigure.h> +#include "cmConfigure.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <set> #include <string> #include <vector> diff --git a/Source/cmSourceGroupCommand.h b/Source/cmSourceGroupCommand.h index 55490963e5..3086177a84 100644 --- a/Source/cmSourceGroupCommand.h +++ b/Source/cmSourceGroupCommand.h @@ -3,7 +3,8 @@ #ifndef cmSourceGroupCommand_h #define cmSourceGroupCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmStandardLexer.h b/Source/cmStandardLexer.h index b9adee5bc3..c9f42e4cea 100644 --- a/Source/cmStandardLexer.h +++ b/Source/cmStandardLexer.h @@ -3,7 +3,7 @@ #ifndef cmStandardLexer_h #define cmStandardLexer_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep /* Disable some warnings. */ #if defined(_MSC_VER) @@ -50,7 +50,7 @@ #define YY_NO_UNPUT 1 #define ECHO -#include <cm_kwiml.h> +#include "cm_kwiml.h" typedef KWIML_INT_int8_t flex_int8_t; typedef KWIML_INT_uint8_t flex_uint8_t; typedef KWIML_INT_int16_t flex_int16_t; diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 0f497313e4..aca03585a2 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmState.h" +#include "cmsys/RegularExpression.hxx" #include <algorithm> #include <assert.h> -#include <cmsys/RegularExpression.hxx> #include <string.h> #include <utility> diff --git a/Source/cmState.h b/Source/cmState.h index 5659023cdc..d2af5ceabb 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -3,7 +3,7 @@ #ifndef cmState_h #define cmState_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <map> #include <set> diff --git a/Source/cmStateDirectory.h b/Source/cmStateDirectory.h index 8accc8e113..79bb369433 100644 --- a/Source/cmStateDirectory.h +++ b/Source/cmStateDirectory.h @@ -4,7 +4,7 @@ #ifndef cmStateDirectory_h #define cmStateDirectory_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmStatePrivate.h b/Source/cmStatePrivate.h index 20700f2b3d..b2c6a7c794 100644 --- a/Source/cmStatePrivate.h +++ b/Source/cmStatePrivate.h @@ -4,7 +4,7 @@ #ifndef cmStatePrivate_h #define cmStatePrivate_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmStateSnapshot.h b/Source/cmStateSnapshot.h index 72d0349b00..2e82ef4bfd 100644 --- a/Source/cmStateSnapshot.h +++ b/Source/cmStateSnapshot.h @@ -4,7 +4,7 @@ #ifndef cmStateSnapshot_h #define cmStateSnapshot_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmStateTypes.h b/Source/cmStateTypes.h index da14cdb30e..b2b12b409d 100644 --- a/Source/cmStateTypes.h +++ b/Source/cmStateTypes.h @@ -4,7 +4,7 @@ #ifndef cmStateTypes_h #define cmStateTypes_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmLinkedTree.h" diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index eb94080f3b..d6907e3e1d 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmStringCommand.h" -#include <cmsys/RegularExpression.hxx> +#include "cmsys/RegularExpression.hxx" #include <ctype.h> #include <sstream> #include <stdio.h> diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h index c63bc3f907..89ecb124fe 100644 --- a/Source/cmStringCommand.h +++ b/Source/cmStringCommand.h @@ -3,7 +3,8 @@ #ifndef cmStringCommand_h #define cmStringCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmSubdirCommand.h b/Source/cmSubdirCommand.h index ce1f876e84..ce2168d7c3 100644 --- a/Source/cmSubdirCommand.h +++ b/Source/cmSubdirCommand.h @@ -3,7 +3,8 @@ #ifndef cmSubdirCommand_h #define cmSubdirCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmSubdirDependsCommand.h b/Source/cmSubdirDependsCommand.h index 80ff24f386..ae8fbafd5c 100644 --- a/Source/cmSubdirDependsCommand.h +++ b/Source/cmSubdirDependsCommand.h @@ -3,7 +3,8 @@ #ifndef cmSubdirDependsCommand_h #define cmSubdirDependsCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index ee751f278b..8dc6571d02 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -9,7 +9,7 @@ #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmArchiveWrite.h" #include "cmLocale.h" -#include <cm_libarchive.h> +#include "cm_libarchive.h" #ifndef __LA_INT64_T #define __LA_INT64_T la_int64_t #endif @@ -27,14 +27,14 @@ #include "cmMachO.h" #endif +#include "cmsys/Directory.hxx" +#include "cmsys/Encoding.hxx" +#include "cmsys/FStream.hxx" +#include "cmsys/RegularExpression.hxx" +#include "cmsys/System.h" +#include "cmsys/Terminal.h" #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/Terminal.h> #include <ctype.h> #include <errno.h> #include <iostream> diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index e93eaaefa9..86d92beff0 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -3,11 +3,11 @@ #ifndef cmSystemTools_h #define cmSystemTools_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep +#include "cmProcessOutput.h" +#include "cmsys/Process.h" #include "cmsys/SystemTools.hxx" // IWYU pragma: export -#include <cmProcessOutput.h> -#include <cmsys/Process.h> #include <stddef.h> #include <string> #include <vector> diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index e3c7b63208..d29a8bd20b 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2,9 +2,9 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTarget.h" +#include "cmsys/RegularExpression.hxx" #include <algorithm> #include <assert.h> -#include <cmsys/RegularExpression.hxx> #include <map> #include <set> #include <sstream> diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 1d40d20120..c67143a341 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -3,7 +3,7 @@ #ifndef cmTarget_h #define cmTarget_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <iosfwd> #include <map> diff --git a/Source/cmTargetCompileDefinitionsCommand.h b/Source/cmTargetCompileDefinitionsCommand.h index caaf23b2a4..663b9d0320 100644 --- a/Source/cmTargetCompileDefinitionsCommand.h +++ b/Source/cmTargetCompileDefinitionsCommand.h @@ -3,7 +3,8 @@ #ifndef cmTargetCompileDefinitionsCommand_h #define cmTargetCompileDefinitionsCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmTargetCompileFeaturesCommand.h b/Source/cmTargetCompileFeaturesCommand.h index 01f2938fce..95214bf01e 100644 --- a/Source/cmTargetCompileFeaturesCommand.h +++ b/Source/cmTargetCompileFeaturesCommand.h @@ -3,7 +3,8 @@ #ifndef cmTargetCompileFeaturesCommand_h #define cmTargetCompileFeaturesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmTargetCompileOptionsCommand.h b/Source/cmTargetCompileOptionsCommand.h index 179013b92c..e4dfa75fbb 100644 --- a/Source/cmTargetCompileOptionsCommand.h +++ b/Source/cmTargetCompileOptionsCommand.h @@ -3,7 +3,8 @@ #ifndef cmTargetCompileOptionsCommand_h #define cmTargetCompileOptionsCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmTargetDepend.h b/Source/cmTargetDepend.h index a953efb2aa..1839923cb3 100644 --- a/Source/cmTargetDepend.h +++ b/Source/cmTargetDepend.h @@ -3,7 +3,7 @@ #ifndef cmTargetDepend_h #define cmTargetDepend_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <set> diff --git a/Source/cmTargetExport.h b/Source/cmTargetExport.h index b08ede289b..7b5339f0ae 100644 --- a/Source/cmTargetExport.h +++ b/Source/cmTargetExport.h @@ -3,7 +3,7 @@ #ifndef cmTargetExport_h #define cmTargetExport_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> diff --git a/Source/cmTargetIncludeDirectoriesCommand.h b/Source/cmTargetIncludeDirectoriesCommand.h index bc6cf0deae..d6d33f29fb 100644 --- a/Source/cmTargetIncludeDirectoriesCommand.h +++ b/Source/cmTargetIncludeDirectoriesCommand.h @@ -3,7 +3,8 @@ #ifndef cmTargetIncludeDirectoriesCommand_h #define cmTargetIncludeDirectoriesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmTargetLinkLibrariesCommand.h b/Source/cmTargetLinkLibrariesCommand.h index 762b48fc07..bfa233e574 100644 --- a/Source/cmTargetLinkLibrariesCommand.h +++ b/Source/cmTargetLinkLibrariesCommand.h @@ -3,7 +3,8 @@ #ifndef cmTargetLinkLibrariesCommand_h #define cmTargetLinkLibrariesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmTargetPropCommandBase.h b/Source/cmTargetPropCommandBase.h index 8b49653cdd..46a2f6b07f 100644 --- a/Source/cmTargetPropCommandBase.h +++ b/Source/cmTargetPropCommandBase.h @@ -3,7 +3,7 @@ #ifndef cmTargetPropCommandBase_h #define cmTargetPropCommandBase_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index 45d31be3bc..94688e3133 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -3,7 +3,7 @@ #ifndef cmTargetPropertyComputer_h #define cmTargetPropertyComputer_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> diff --git a/Source/cmTargetSourcesCommand.h b/Source/cmTargetSourcesCommand.h index b1afac21ce..6cc1abce83 100644 --- a/Source/cmTargetSourcesCommand.h +++ b/Source/cmTargetSourcesCommand.h @@ -3,7 +3,8 @@ #ifndef cmTargetSourcesCommand_h #define cmTargetSourcesCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmTest.h b/Source/cmTest.h index 274a9242dd..d4839d171f 100644 --- a/Source/cmTest.h +++ b/Source/cmTest.h @@ -3,7 +3,7 @@ #ifndef cmTest_h #define cmTest_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmListFileCache.h" #include "cmPropertyMap.h" diff --git a/Source/cmTestGenerator.h b/Source/cmTestGenerator.h index b350806c8b..7214375b4a 100644 --- a/Source/cmTestGenerator.h +++ b/Source/cmTestGenerator.h @@ -3,7 +3,7 @@ #ifndef cmTestGenerator_h #define cmTestGenerator_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmScriptGenerator.h" diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx index 3d42e262e2..4b97188479 100644 --- a/Source/cmTimestamp.cxx +++ b/Source/cmTimestamp.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTimestamp.h" -#include <cmConfigure.h> +#include "cmConfigure.h" #include <cstring> #include <sstream> #include <stdlib.h> diff --git a/Source/cmTimestamp.h b/Source/cmTimestamp.h index fdee564012..8dd499a3e3 100644 --- a/Source/cmTimestamp.h +++ b/Source/cmTimestamp.h @@ -3,7 +3,7 @@ #ifndef cmTimestamp_h #define cmTimestamp_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <time.h> diff --git a/Source/cmTryCompileCommand.h b/Source/cmTryCompileCommand.h index 52a034591f..8972f7e96d 100644 --- a/Source/cmTryCompileCommand.h +++ b/Source/cmTryCompileCommand.h @@ -3,7 +3,8 @@ #ifndef cmTryCompileCommand_h #define cmTryCompileCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index c4fc94e2f1..07e20e62f5 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTryRunCommand.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include <stdio.h> #include <string.h> diff --git a/Source/cmTryRunCommand.h b/Source/cmTryRunCommand.h index 8b44ac5a98..b086dde68d 100644 --- a/Source/cmTryRunCommand.h +++ b/Source/cmTryRunCommand.h @@ -3,7 +3,8 @@ #ifndef cmTryRunCommand_h #define cmTryRunCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmUnexpectedCommand.h b/Source/cmUnexpectedCommand.h index 897dfb6895..aee5d4da6a 100644 --- a/Source/cmUnexpectedCommand.h +++ b/Source/cmUnexpectedCommand.h @@ -3,7 +3,8 @@ #ifndef cmUnexpectedCommand_h #define cmUnexpectedCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmUnsetCommand.h b/Source/cmUnsetCommand.h index 5b07202fca..7e0f5b56f7 100644 --- a/Source/cmUnsetCommand.h +++ b/Source/cmUnsetCommand.h @@ -3,7 +3,8 @@ #ifndef cmUnsetCommand_h #define cmUnsetCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx index 8ef095890c..07095b137a 100644 --- a/Source/cmUseMangledMesaCommand.cxx +++ b/Source/cmUseMangledMesaCommand.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmUseMangledMesaCommand.h" -#include <cmsys/FStream.hxx> -#include <cmsys/RegularExpression.hxx> +#include "cmsys/FStream.hxx" +#include "cmsys/RegularExpression.hxx" #include "cmSystemTools.h" diff --git a/Source/cmUseMangledMesaCommand.h b/Source/cmUseMangledMesaCommand.h index 9a49f94a47..e8bd8c67f7 100644 --- a/Source/cmUseMangledMesaCommand.h +++ b/Source/cmUseMangledMesaCommand.h @@ -3,7 +3,8 @@ #ifndef cmUseMangledMesaCommand_h #define cmUseMangledMesaCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmUtilitySourceCommand.h b/Source/cmUtilitySourceCommand.h index 849b96695b..fa818bf9af 100644 --- a/Source/cmUtilitySourceCommand.h +++ b/Source/cmUtilitySourceCommand.h @@ -3,7 +3,8 @@ #ifndef cmUtilitySourceCommand_h #define cmUtilitySourceCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmUtils.hxx b/Source/cmUtils.hxx index 3f65872a9a..c5c767c02d 100644 --- a/Source/cmUtils.hxx +++ b/Source/cmUtils.hxx @@ -3,7 +3,7 @@ #ifndef cmUtils_hxx #define cmUtils_hxx -#include <cmsys/SystemTools.hxx> +#include "cmsys/SystemTools.hxx" // Use the make system's VERBOSE environment variable to enable // verbose output. This can be skipped by also setting CMAKE_NO_VERBOSE diff --git a/Source/cmUuid.h b/Source/cmUuid.h index 1bc2229526..158ce6ee41 100644 --- a/Source/cmUuid.h +++ b/Source/cmUuid.h @@ -3,7 +3,7 @@ #ifndef cmUuid_h #define cmUuid_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/cmVariableRequiresCommand.h b/Source/cmVariableRequiresCommand.h index baf717c666..6afb11a822 100644 --- a/Source/cmVariableRequiresCommand.h +++ b/Source/cmVariableRequiresCommand.h @@ -3,7 +3,8 @@ #ifndef cmVariableRequiresCommand_h #define cmVariableRequiresCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmVariableWatch.cxx b/Source/cmVariableWatch.cxx index c94ce17c26..419e1a411d 100644 --- a/Source/cmVariableWatch.cxx +++ b/Source/cmVariableWatch.cxx @@ -4,8 +4,8 @@ #include "cmAlgorithms.h" +#include "cm_auto_ptr.hxx" #include <algorithm> -#include <cm_auto_ptr.hxx> #include <utility> static const char* const cmVariableWatchAccessStrings[] = { diff --git a/Source/cmVariableWatch.h b/Source/cmVariableWatch.h index 0b8b433ec8..a575afe9da 100644 --- a/Source/cmVariableWatch.h +++ b/Source/cmVariableWatch.h @@ -3,7 +3,7 @@ #ifndef cmVariableWatch_h #define cmVariableWatch_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <map> #include <string> diff --git a/Source/cmVariableWatchCommand.h b/Source/cmVariableWatchCommand.h index 919bac4ec0..7096ed5eb7 100644 --- a/Source/cmVariableWatchCommand.h +++ b/Source/cmVariableWatchCommand.h @@ -3,7 +3,8 @@ #ifndef cmVariableWatchCommand_h #define cmVariableWatchCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <set> #include <string> #include <vector> diff --git a/Source/cmVersion.h b/Source/cmVersion.h index e77ec99b42..bfd994d099 100644 --- a/Source/cmVersion.h +++ b/Source/cmVersion.h @@ -3,7 +3,7 @@ #ifndef cmVersion_h #define cmVersion_h -#include <cm_kwiml.h> +#include "cm_kwiml.h" /** \class cmVersion * \brief Helper class for providing CMake and CTest version information. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index a9ccc6875c..fbfc1ed0a7 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -14,7 +14,7 @@ #include "cmVisualStudioGeneratorOptions.h" #include "windows.h" -#include <cm_auto_ptr.hxx> +#include "cm_auto_ptr.hxx" static std::string const kWINDOWS_7_1_SDK = "Windows7.1SDK"; @@ -1241,16 +1241,15 @@ void cmVisualStudio10TargetGenerator::WriteGroups() // collect up group information std::vector<cmSourceGroup> sourceGroups = this->Makefile->GetSourceGroups(); - std::vector<cmSourceFile*> classes; - if (!this->GeneratorTarget->GetConfigCommonSourceFiles(classes)) { - return; - } + + std::vector<cmGeneratorTarget::AllConfigSource> const& sources = + this->GeneratorTarget->GetAllConfigSources(); std::set<cmSourceGroup*> groupsUsed; - for (std::vector<cmSourceFile*>::const_iterator s = classes.begin(); - s != classes.end(); s++) { - cmSourceFile* sf = *s; - std::string const& source = sf->GetFullPath(); + for (std::vector<cmGeneratorTarget::AllConfigSource>::const_iterator si = + sources.begin(); + si != sources.end(); ++si) { + std::string const& source = si->Source->GetFullPath(); cmSourceGroup* sourceGroup = this->Makefile->FindSourceGroup(source.c_str(), sourceGroups); groupsUsed.insert(sourceGroup); @@ -1337,23 +1336,6 @@ void cmVisualStudio10TargetGenerator::WriteGroups() this->WriteString("</ItemGroup>\n", 1); } - // Add object library contents as external objects. - std::vector<std::string> objs; - this->GeneratorTarget->UseObjectLibraries(objs, ""); - if (!objs.empty()) { - this->WriteString("<ItemGroup>\n", 1); - for (std::vector<std::string>::const_iterator oi = objs.begin(); - oi != objs.end(); ++oi) { - std::string obj = *oi; - this->WriteString("<Object Include=\"", 2); - this->ConvertToWindowsSlash(obj); - (*this->BuildFileStream) << cmVS10EscapeXML(obj) << "\">\n"; - this->WriteString("<Filter>Object Libraries</Filter>\n", 3); - this->WriteString("</Object>\n", 2); - } - this->WriteString("</ItemGroup>\n", 1); - } - this->WriteString("<ItemGroup>\n", 1); for (std::set<cmSourceGroup*>::iterator g = groupsUsed.begin(); g != groupsUsed.end(); ++g) { @@ -1371,15 +1353,6 @@ void cmVisualStudio10TargetGenerator::WriteGroups() this->WriteString("</Filter>\n", 2); } } - if (!objs.empty()) { - this->WriteString("<Filter Include=\"Object Libraries\">\n", 2); - std::string guidName = "SG_Filter_Object Libraries"; - this->WriteString("<UniqueIdentifier>", 3); - std::string guid = this->GlobalGenerator->GetGUID(guidName.c_str()); - (*this->BuildFileStream) << "{" << guid << "}" - << "</UniqueIdentifier>\n"; - this->WriteString("</Filter>\n", 2); - } if (!resxObjs.empty() || !this->AddedFiles.empty()) { this->WriteString("<Filter Include=\"Resource Files\">\n", 2); @@ -1753,15 +1726,6 @@ void cmVisualStudio10TargetGenerator::WriteSource(std::string const& tool, this->Tools[tool].push_back(toolSource); } -void cmVisualStudio10TargetGenerator::WriteSources( - std::string const& tool, std::vector<cmSourceFile const*> const& sources) -{ - for (std::vector<cmSourceFile const*>::const_iterator si = sources.begin(); - si != sources.end(); ++si) { - this->WriteSource(tool, *si); - } -} - void cmVisualStudio10TargetGenerator::WriteAllSources() { if (this->GeneratorTarget->GetType() > cmStateEnums::UTILITY) { @@ -1769,108 +1733,121 @@ void cmVisualStudio10TargetGenerator::WriteAllSources() } this->WriteString("<ItemGroup>\n", 1); - std::vector<cmSourceFile const*> headerSources; - this->GeneratorTarget->GetHeaderSources(headerSources, ""); - for (std::vector<cmSourceFile const*>::const_iterator si = - headerSources.begin(); - si != headerSources.end(); ++si) { - this->WriteHeaderSource(*si); + std::vector<size_t> all_configs; + for (size_t ci = 0; ci < this->Configurations.size(); ++ci) { + all_configs.push_back(ci); } - std::vector<cmSourceFile const*> idlSources; - this->GeneratorTarget->GetIDLSources(idlSources, ""); - this->WriteSources("Midl", idlSources); - std::vector<cmSourceFile const*> objectSources; - this->GeneratorTarget->GetObjectSources(objectSources, ""); - for (std::vector<cmSourceFile const*>::const_iterator si = - objectSources.begin(); - si != objectSources.end(); ++si) { - const std::string& lang = (*si)->GetLanguage(); + std::vector<cmGeneratorTarget::AllConfigSource> const& sources = + this->GeneratorTarget->GetAllConfigSources(); + + for (std::vector<cmGeneratorTarget::AllConfigSource>::const_iterator si = + sources.begin(); + si != sources.end(); ++si) { std::string tool; - if (lang == "C" || lang == "CXX") { - tool = "ClCompile"; - } else if (lang == "ASM_MASM" && this->GlobalGenerator->IsMasmEnabled()) { - tool = "MASM"; - } else if (lang == "ASM_NASM" && this->GlobalGenerator->IsNasmEnabled()) { - tool = "NASM"; - } else if (lang == "RC") { - tool = "ResourceCompile"; - } else if (lang == "CSharp") { - tool = "Compile"; - } else if (lang == "CUDA" && this->GlobalGenerator->IsCudaEnabled()) { - tool = "CudaCompile"; + switch (si->Kind) { + case cmGeneratorTarget::SourceKindAppManifest: + tool = "AppxManifest"; + break; + case cmGeneratorTarget::SourceKindCertificate: + tool = "None"; + break; + case cmGeneratorTarget::SourceKindCustomCommand: + // Handled elsewhere. + break; + case cmGeneratorTarget::SourceKindExternalObject: + tool = "Object"; + if (this->LocalGenerator->GetVersion() < + cmGlobalVisualStudioGenerator::VS11) { + // For VS == 10 we cannot use LinkObjects to avoid linking custom + // command outputs. If an object file is generated in this target, + // then vs10 will use it in the build, and we have to list it as + // None instead of Object. + std::vector<cmSourceFile*> const* d = + this->GeneratorTarget->GetSourceDepends(si->Source); + if (d && !d->empty()) { + tool = "None"; + } + } + break; + case cmGeneratorTarget::SourceKindExtra: + this->WriteExtraSource(si->Source); + break; + case cmGeneratorTarget::SourceKindHeader: + this->WriteHeaderSource(si->Source); + break; + case cmGeneratorTarget::SourceKindIDL: + tool = "Midl"; + break; + case cmGeneratorTarget::SourceKindManifest: + // Handled elsewhere. + break; + case cmGeneratorTarget::SourceKindModuleDefinition: + tool = "None"; + break; + case cmGeneratorTarget::SourceKindObjectSource: { + const std::string& lang = si->Source->GetLanguage(); + if (lang == "C" || lang == "CXX") { + tool = "ClCompile"; + } else if (lang == "ASM_MASM" && + this->GlobalGenerator->IsMasmEnabled()) { + tool = "MASM"; + } else if (lang == "ASM_NASM" && + this->GlobalGenerator->IsNasmEnabled()) { + tool = "NASM"; + } else if (lang == "RC") { + tool = "ResourceCompile"; + } else if (lang == "CSharp") { + tool = "Compile"; + } else if (lang == "CUDA" && this->GlobalGenerator->IsCudaEnabled()) { + tool = "CudaCompile"; + } else { + tool = "None"; + } + } break; + case cmGeneratorTarget::SourceKindResx: + // Handled elsewhere. + break; + case cmGeneratorTarget::SourceKindXaml: + // Handled elsewhere. + break; } if (!tool.empty()) { - this->WriteSource(tool, *si, " "); - if (this->OutputSourceSpecificFlags(*si)) { + // Compute set of configurations to exclude, if any. + std::vector<size_t> const& include_configs = si->Configs; + std::vector<size_t> exclude_configs; + std::set_difference(all_configs.begin(), all_configs.end(), + include_configs.begin(), include_configs.end(), + std::back_inserter(exclude_configs)); + + if (si->Kind == cmGeneratorTarget::SourceKindObjectSource) { + // FIXME: refactor generation to avoid tracking XML syntax state. + this->WriteSource(tool, si->Source, " "); + bool have_nested = this->OutputSourceSpecificFlags(si->Source); + if (!exclude_configs.empty()) { + if (!have_nested) { + (*this->BuildFileStream) << ">\n"; + } + this->WriteExcludeFromBuild(exclude_configs); + have_nested = true; + } + if (have_nested) { + this->WriteString("</", 2); + (*this->BuildFileStream) << tool << ">\n"; + } else { + (*this->BuildFileStream) << " />\n"; + } + } else if (!exclude_configs.empty()) { + this->WriteSource(tool, si->Source, ">\n"); + this->WriteExcludeFromBuild(exclude_configs); this->WriteString("</", 2); (*this->BuildFileStream) << tool << ">\n"; } else { - (*this->BuildFileStream) << " />\n"; + this->WriteSource(tool, si->Source); } - } else { - this->WriteSource("None", *si); - } - } - - std::vector<cmSourceFile const*> manifestSources; - this->GeneratorTarget->GetAppManifest(manifestSources, ""); - this->WriteSources("AppxManifest", manifestSources); - - std::vector<cmSourceFile const*> certificateSources; - this->GeneratorTarget->GetCertificates(certificateSources, ""); - this->WriteSources("None", certificateSources); - - std::vector<cmSourceFile const*> externalObjects; - this->GeneratorTarget->GetExternalObjects(externalObjects, ""); - for (std::vector<cmSourceFile const*>::iterator si = externalObjects.begin(); - si != externalObjects.end();) { - if (!(*si)->GetObjectLibrary().empty()) { - si = externalObjects.erase(si); - } else { - ++si; } } - if (this->LocalGenerator->GetVersion() > - cmGlobalVisualStudioGenerator::VS10) { - // For VS >= 11 we use LinkObjects to avoid linking custom command - // outputs. Use Object for all external objects, generated or not. - this->WriteSources("Object", externalObjects); - } else { - // If an object file is generated in this target, then vs10 will use - // it in the build, and we have to list it as None instead of Object. - for (std::vector<cmSourceFile const*>::const_iterator si = - externalObjects.begin(); - si != externalObjects.end(); ++si) { - std::vector<cmSourceFile*> const* d = - this->GeneratorTarget->GetSourceDepends(*si); - this->WriteSource((d && !d->empty()) ? "None" : "Object", *si); - } - } - - std::vector<cmSourceFile const*> extraSources; - this->GeneratorTarget->GetExtraSources(extraSources, ""); - for (std::vector<cmSourceFile const*>::const_iterator si = - extraSources.begin(); - si != extraSources.end(); ++si) { - this->WriteExtraSource(*si); - } - - // Add object library contents as external objects. - std::vector<std::string> objs; - this->GeneratorTarget->UseObjectLibraries(objs, ""); - for (std::vector<std::string>::const_iterator oi = objs.begin(); - oi != objs.end(); ++oi) { - std::string obj = *oi; - this->WriteString("<Object Include=\"", 2); - this->ConvertToWindowsSlash(obj); - (*this->BuildFileStream) << cmVS10EscapeXML(obj) << "\" />\n"; - } - - std::vector<cmSourceFile const*> defSources; - this->GeneratorTarget->GetModuleDefinitionSources(defSources, ""); - this->WriteSources("None", defSources); if (this->IsMissingFiles) { this->WriteMissingFiles(); @@ -2049,6 +2026,19 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( return hasFlags; } +void cmVisualStudio10TargetGenerator::WriteExcludeFromBuild( + std::vector<size_t> const& exclude_configs) +{ + for (std::vector<size_t>::const_iterator ci = exclude_configs.begin(); + ci != exclude_configs.end(); ++ci) { + this->WriteString("", 3); + (*this->BuildFileStream) + << "<ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='" + << cmVS10EscapeXML(this->Configurations[*ci]) << "|" + << cmVS10EscapeXML(this->Platform) << "'\">true</ExcludedFromBuild>\n"; + } +} + void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions() { cmStateEnums::TargetType ttype = this->GeneratorTarget->GetType(); diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 52d55501dc..bd270bfdd4 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -3,7 +3,7 @@ #ifndef cmVisualStudioTargetGenerator_h #define cmVisualStudioTargetGenerator_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <map> @@ -62,8 +62,7 @@ private: void WriteNsightTegraConfigurationValues(std::string const& config); void WriteSource(std::string const& tool, cmSourceFile const* sf, const char* end = 0); - void WriteSources(std::string const& tool, - std::vector<cmSourceFile const*> const&); + void WriteExcludeFromBuild(std::vector<size_t> const& exclude_configs); void WriteAllSources(); void WriteDotNetReferences(); void WriteDotNetReference(std::string const& ref, std::string const& hint); diff --git a/Source/cmVisualStudio10ToolsetOptions.h b/Source/cmVisualStudio10ToolsetOptions.h index 2459f5e019..4233337bad 100644 --- a/Source/cmVisualStudio10ToolsetOptions.h +++ b/Source/cmVisualStudio10ToolsetOptions.h @@ -3,7 +3,7 @@ #ifndef cmVisualStudio10ToolsetOptions_h #define cmVisualStudio10ToolsetOptions_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <string> diff --git a/Source/cmVisualStudioGeneratorOptions.h b/Source/cmVisualStudioGeneratorOptions.h index 52689e0a55..44d271908e 100644 --- a/Source/cmVisualStudioGeneratorOptions.h +++ b/Source/cmVisualStudioGeneratorOptions.h @@ -3,7 +3,7 @@ #ifndef cmVisualStudioGeneratorOptions_h #define cmVisualStudioGeneratorOptions_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <iosfwd> #include <string> diff --git a/Source/cmVisualStudioSlnData.h b/Source/cmVisualStudioSlnData.h index b2f8db9279..e12047fb55 100644 --- a/Source/cmVisualStudioSlnData.h +++ b/Source/cmVisualStudioSlnData.h @@ -3,7 +3,7 @@ #ifndef cmVisualStudioSlnData_h #define cmVisualStudioSlnData_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <map> #include <string> diff --git a/Source/cmVisualStudioSlnParser.cxx b/Source/cmVisualStudioSlnParser.cxx index 939120a756..1a32abacf4 100644 --- a/Source/cmVisualStudioSlnParser.cxx +++ b/Source/cmVisualStudioSlnParser.cxx @@ -4,7 +4,7 @@ #include "cmSystemTools.h" #include "cmVisualStudioSlnData.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include <cassert> #include <stack> diff --git a/Source/cmVisualStudioSlnParser.h b/Source/cmVisualStudioSlnParser.h index a3391a642e..d517324072 100644 --- a/Source/cmVisualStudioSlnParser.h +++ b/Source/cmVisualStudioSlnParser.h @@ -3,7 +3,7 @@ #ifndef cmVisualStudioSlnParser_h #define cmVisualStudioSlnParser_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <bitset> #include <iosfwd> diff --git a/Source/cmVisualStudioWCEPlatformParser.h b/Source/cmVisualStudioWCEPlatformParser.h index 8ed608329e..75c3d1a398 100644 --- a/Source/cmVisualStudioWCEPlatformParser.h +++ b/Source/cmVisualStudioWCEPlatformParser.h @@ -3,7 +3,7 @@ #ifndef cmVisualStudioWCEPlatformParser_h #define cmVisualStudioWCEPlatformParser_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <map> #include <stddef.h> diff --git a/Source/cmWhileCommand.h b/Source/cmWhileCommand.h index abd36b3293..daf1046979 100644 --- a/Source/cmWhileCommand.h +++ b/Source/cmWhileCommand.h @@ -3,7 +3,8 @@ #ifndef cmWhileCommand_h #define cmWhileCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmWorkingDirectory.h b/Source/cmWorkingDirectory.h index af0fd447dd..aff9267552 100644 --- a/Source/cmWorkingDirectory.h +++ b/Source/cmWorkingDirectory.h @@ -3,7 +3,7 @@ #ifndef cmWorkingDirectory_h #define cmWorkingDirectory_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx index ce2de5754a..f569e80678 100644 --- a/Source/cmWriteFileCommand.cxx +++ b/Source/cmWriteFileCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmWriteFileCommand.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include "cmMakefile.h" #include "cmSystemTools.h" diff --git a/Source/cmWriteFileCommand.h b/Source/cmWriteFileCommand.h index 73e6e2256a..7196ccfb46 100644 --- a/Source/cmWriteFileCommand.h +++ b/Source/cmWriteFileCommand.h @@ -3,7 +3,8 @@ #ifndef cmWriteFileCommand_h #define cmWriteFileCommand_h -#include <cmConfigure.h> +#include "cmConfigure.h" + #include <string> #include <vector> diff --git a/Source/cmXCode21Object.h b/Source/cmXCode21Object.h index 083d229082..bcd8d93e18 100644 --- a/Source/cmXCode21Object.h +++ b/Source/cmXCode21Object.h @@ -3,7 +3,7 @@ #ifndef cmXCode21Object_h #define cmXCode21Object_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <iosfwd> #include <vector> diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h index 3bfecdfcfb..b92e6e33e2 100644 --- a/Source/cmXCodeObject.h +++ b/Source/cmXCodeObject.h @@ -3,7 +3,7 @@ #ifndef cmXCodeObject_h #define cmXCodeObject_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <algorithm> #include <iosfwd> diff --git a/Source/cmXCodeScheme.h b/Source/cmXCodeScheme.h index 0a8e7376b3..379afed42b 100644 --- a/Source/cmXCodeScheme.h +++ b/Source/cmXCodeScheme.h @@ -3,7 +3,7 @@ #ifndef cmXCodeScheme_h #define cmXCodeScheme_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmGlobalXCodeGenerator.h" #include "cmSystemTools.h" diff --git a/Source/cmXMLParser.cxx b/Source/cmXMLParser.cxx index 231e95e86f..18afbf3705 100644 --- a/Source/cmXMLParser.cxx +++ b/Source/cmXMLParser.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmXMLParser.h" -#include <cm_expat.h> -#include <cmsys/FStream.hxx> +#include "cm_expat.h" +#include "cmsys/FStream.hxx" #include <ctype.h> #include <iostream> #include <sstream> diff --git a/Source/cmXMLParser.h b/Source/cmXMLParser.h index 60da51e7c6..98ba04956f 100644 --- a/Source/cmXMLParser.h +++ b/Source/cmXMLParser.h @@ -3,7 +3,7 @@ #ifndef cmXMLParser_h #define cmXMLParser_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> diff --git a/Source/cmXMLSafe.h b/Source/cmXMLSafe.h index c41554dea6..9aaf2d1578 100644 --- a/Source/cmXMLSafe.h +++ b/Source/cmXMLSafe.h @@ -3,7 +3,7 @@ #ifndef cmXMLSafe_h #define cmXMLSafe_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <iosfwd> #include <string> diff --git a/Source/cmXMLWriter.cxx b/Source/cmXMLWriter.cxx index 541cb3d2c7..3cbc70dbd2 100644 --- a/Source/cmXMLWriter.cxx +++ b/Source/cmXMLWriter.cxx @@ -2,8 +2,8 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmXMLWriter.h" +#include "cmsys/FStream.hxx" #include <cassert> -#include <cmsys/FStream.hxx> cmXMLWriter::cmXMLWriter(std::ostream& output, std::size_t level) : Output(output) diff --git a/Source/cmXMLWriter.h b/Source/cmXMLWriter.h index 6d1e6b4226..14c82b16c9 100644 --- a/Source/cmXMLWriter.h +++ b/Source/cmXMLWriter.h @@ -3,7 +3,7 @@ #ifndef cmXMLWiter_h #define cmXMLWiter_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include "cmXMLSafe.h" diff --git a/Source/cm_auto_ptr.hxx b/Source/cm_auto_ptr.hxx index 538201836d..2b5c05954b 100644 --- a/Source/cm_auto_ptr.hxx +++ b/Source/cm_auto_ptr.hxx @@ -3,7 +3,7 @@ #ifndef CM_AUTO_PTR_HXX #define CM_AUTO_PTR_HXX -#include <cmConfigure.h> +#include "cmConfigure.h" #ifdef CMake_HAVE_CXX_AUTO_PTR diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx index 869dd32f9e..fcd1e48eeb 100644 --- a/Source/cm_codecvt.cxx +++ b/Source/cm_codecvt.cxx @@ -6,7 +6,7 @@ #if defined(_WIN32) #include <windows.h> #undef max -#include <cmsys/Encoding.hxx> +#include "cmsys/Encoding.hxx" #endif codecvt::codecvt(Encoding e) diff --git a/Source/cm_codecvt.hxx b/Source/cm_codecvt.hxx index fcd9954320..b9b52eccf8 100644 --- a/Source/cm_codecvt.hxx +++ b/Source/cm_codecvt.hxx @@ -3,7 +3,7 @@ #ifndef cm_codecvt_hxx #define cm_codecvt_hxx -#include <cmConfigure.h> +#include "cmConfigure.h" #include <locale> #include <vector> diff --git a/Source/cm_unordered_map.hxx b/Source/cm_unordered_map.hxx index dc8ca3524a..bf3890314c 100644 --- a/Source/cm_unordered_map.hxx +++ b/Source/cm_unordered_map.hxx @@ -3,7 +3,7 @@ #ifndef CM_UNORDERED_MAP_HXX #define CM_UNORDERED_MAP_HXX -#include <cmConfigure.h> +#include "cmConfigure.h" #if defined(CMake_HAVE_CXX_UNORDERED_MAP) @@ -12,7 +12,7 @@ #elif defined(CMAKE_BUILD_WITH_CMAKE) -#include <cmsys/hash_map.hxx> +#include "cmsys/hash_map.hxx" #define CM_UNORDERED_MAP cmsys::hash_map #else diff --git a/Source/cm_unordered_set.hxx b/Source/cm_unordered_set.hxx index ce58dbf53c..dd1a9a115a 100644 --- a/Source/cm_unordered_set.hxx +++ b/Source/cm_unordered_set.hxx @@ -3,7 +3,7 @@ #ifndef CM_UNORDERED_SET_HXX #define CM_UNORDERED_SET_HXX -#include <cmConfigure.h> +#include "cmConfigure.h" #if defined(CMake_HAVE_CXX_UNORDERED_SET) @@ -12,7 +12,7 @@ #elif defined(CMAKE_BUILD_WITH_CMAKE) -#include <cmsys/hash_set.hxx> +#include "cmsys/hash_set.hxx" #define CM_UNORDERED_SET cmsys::hash_set #else diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 4363c120f5..f0ae3169a4 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -28,7 +28,7 @@ #include "cm_sys_stat.h" #if defined(CMAKE_BUILD_WITH_CMAKE) -#include <cm_jsoncpp_writer.h> +#include "cm_jsoncpp_writer.h" #include "cmGraphVizWriter.h" #include "cmVariableWatch.h" @@ -107,10 +107,10 @@ #include <sys/time.h> #endif +#include "cmsys/FStream.hxx" +#include "cmsys/Glob.hxx" +#include "cmsys/RegularExpression.hxx" #include <algorithm> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/RegularExpression.hxx> #include <iostream> #include <sstream> #include <stdio.h> diff --git a/Source/cmake.h b/Source/cmake.h index abb13ac2ce..4c292f0f27 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -3,7 +3,7 @@ #ifndef cmake_h #define cmake_h -#include <cmConfigure.h> +#include "cmConfigure.h" #include <map> #include <set> @@ -16,7 +16,7 @@ #include "cmStateTypes.h" #if defined(CMAKE_BUILD_WITH_CMAKE) -#include <cm_jsoncpp_value.h> +#include "cm_jsoncpp_value.h" #endif class cmExternalMakefileProjectGeneratorFactory; diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 805a9f70c3..3d112413af 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -1,6 +1,6 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include <cmConfigure.h> +#include "cmConfigure.h" #include "cmAlgorithms.h" #include "cmDocumentationEntry.h" @@ -17,9 +17,9 @@ #include "cmDynamicLoader.h" #endif -#include <cmsys/Encoding.hxx> +#include "cmsys/Encoding.hxx" #if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) -#include <cmsys/ConsoleBuf.hxx> +#include "cmsys/ConsoleBuf.hxx" #endif #include <iostream> #include <string.h> @@ -27,7 +27,7 @@ #include <vector> #ifdef CMAKE_USE_LIBUV -#include <cm_uv.h> +#include "cm_uv.h" #endif #ifdef CMAKE_BUILD_WITH_CMAKE diff --git a/Source/cmakexbuild.cxx b/Source/cmakexbuild.cxx index e166bee3f8..f1f4bbb817 100644 --- a/Source/cmakexbuild.cxx +++ b/Source/cmakexbuild.cxx @@ -1,9 +1,9 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep -#include <cmsys/Process.h> +#include "cmsys/Process.h" #include <iostream> #include <string> #include <vector> diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx index b86ad6e4f2..0c5bbe2df3 100644 --- a/Source/cmcldeps.cxx +++ b/Source/cmcldeps.cxx @@ -18,8 +18,8 @@ // /showIncludes is equivalent to -MD, not -MMD, that is, system headers are // included. -#include <cmSystemTools.h> -#include <cmsys/Encoding.hxx> +#include "cmSystemTools.h" +#include "cmsys/Encoding.hxx" #include <algorithm> #include <sstream> diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 9e08b9c1e8..974dd5f4b9 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -32,12 +32,12 @@ #include "cmVisualStudioWCEPlatformParser.h" #endif +#include "cmConfigure.h" +#include "cmsys/Directory.hxx" +#include "cmsys/FStream.hxx" +#include "cmsys/Process.h" +#include "cmsys/Terminal.h" #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> diff --git a/Source/cmcmd.h b/Source/cmcmd.h index 139d2a8241..929f1ae471 100644 --- a/Source/cmcmd.h +++ b/Source/cmcmd.h @@ -3,7 +3,7 @@ #ifndef cmcmd_h #define cmcmd_h -#include <cmConfigure.h> // IWYU pragma: keep +#include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 1cf75c8799..135062dc9d 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -1,6 +1,6 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include <cmConfigure.h> +#include "cmConfigure.h" #include "CTest/cmCTestLaunch.h" #include "CTest/cmCTestScriptHandler.h" @@ -9,9 +9,9 @@ #include "cmSystemTools.h" #include "cmake.h" -#include <cmsys/Encoding.hxx> +#include "cmsys/Encoding.hxx" #if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) -#include <cmsys/ConsoleBuf.hxx> +#include "cmsys/ConsoleBuf.hxx" #endif #include <iostream> #include <string.h> diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index de68118f1a..28fe9e7ae0 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -796,6 +796,8 @@ ENDFOREACH() IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS) ADD_LIBRARY(${KWSYS_NAMESPACE} ${KWSYS_LIBRARY_TYPE} ${KWSYS_C_SRCS} ${KWSYS_CXX_SRCS}) + SET_PROPERTY(TARGET ${KWSYS_NAMESPACE} PROPERTY C_INCLUDE_WHAT_YOU_USE "") + SET_PROPERTY(TARGET ${KWSYS_NAMESPACE} PROPERTY CXX_INCLUDE_WHAT_YOU_USE "") SET_PROPERTY(TARGET ${KWSYS_NAMESPACE} PROPERTY LABELS ${KWSYS_LABELS_LIB}) IF(KWSYS_USE_DynamicLoader) IF(UNIX) @@ -940,6 +942,8 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) ENDIF() IF(KWSYS_USE_ConsoleBuf) ADD_EXECUTABLE(testConsoleBufChild testConsoleBufChild.cxx) + SET_PROPERTY(TARGET testConsoleBufChild PROPERTY C_INCLUDE_WHAT_YOU_USE "") + SET_PROPERTY(TARGET testConsoleBufChild PROPERTY CXX_INCLUDE_WHAT_YOU_USE "") SET_PROPERTY(TARGET testConsoleBufChild PROPERTY LABELS ${KWSYS_LABELS_EXE}) TARGET_LINK_LIBRARIES(testConsoleBufChild ${KWSYS_NAMESPACE}) SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS} @@ -967,6 +971,8 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) ${KWSYS_CXX_TESTS} ) ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestsCxx ${KWSYS_CXX_TEST_SRCS}) + SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY C_INCLUDE_WHAT_YOU_USE "") + SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY CXX_INCLUDE_WHAT_YOU_USE "") SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY LABELS ${KWSYS_LABELS_EXE}) TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE}TestsCxx ${KWSYS_NAMESPACE}) diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx index 93312e9dd4..70f1a434ed 100644 --- a/Source/kwsys/SystemInformation.cxx +++ b/Source/kwsys/SystemInformation.cxx @@ -4341,18 +4341,35 @@ unsigned char SystemInformationImplementation::GetAPICId() void SystemInformationImplementation::CPUCountWindows() { #if defined(_WIN32) - std::vector<SYSTEM_LOGICAL_PROCESSOR_INFORMATION> ProcInfo; this->NumberOfPhysicalCPU = 0; this->NumberOfLogicalCPU = 0; + typedef BOOL(WINAPI * GetLogicalProcessorInformationType)( + PSYSTEM_LOGICAL_PROCESSOR_INFORMATION, PDWORD); + static GetLogicalProcessorInformationType pGetLogicalProcessorInformation = + (GetLogicalProcessorInformationType)GetProcAddress( + GetModuleHandleW(L"kernel32"), "GetLogicalProcessorInformation"); + + if (!pGetLogicalProcessorInformation) { + // Fallback to approximate implementation on ancient Windows versions. + SYSTEM_INFO info; + ZeroMemory(&info, sizeof(info)); + GetSystemInfo(&info); + this->NumberOfPhysicalCPU = + static_cast<unsigned int>(info.dwNumberOfProcessors); + this->NumberOfLogicalCPU = this->NumberOfPhysicalCPU; + return; + } + + std::vector<SYSTEM_LOGICAL_PROCESSOR_INFORMATION> ProcInfo; { DWORD Length = 0; - DWORD rc = GetLogicalProcessorInformation(NULL, &Length); + DWORD rc = pGetLogicalProcessorInformation(NULL, &Length); assert(FALSE == rc); (void)rc; // Silence unused variable warning in Borland C++ 5.81 assert(GetLastError() == ERROR_INSUFFICIENT_BUFFER); ProcInfo.resize(Length / sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION)); - rc = GetLogicalProcessorInformation(&ProcInfo[0], &Length); + rc = pGetLogicalProcessorInformation(&ProcInfo[0], &Length); assert(rc != FALSE); (void)rc; // Silence unused variable warning in Borland C++ 5.81 } diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 65b7b26b5b..100a49ce89 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -54,7 +54,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/stat.h> #include <time.h> #if defined(_WIN32) && !defined(_MSC_VER) && defined(__GNUC__) @@ -1258,6 +1257,38 @@ bool SystemTools::TestFileAccess(const std::string& filename, } //---------------------------------------------------------------------------- +int SystemTools::Stat(const char* path, SystemTools::Stat_t* buf) +{ + if (!path) { + errno = EFAULT; + return -1; + } + return SystemTools::Stat(std::string(path), buf); +} + +//---------------------------------------------------------------------------- +int SystemTools::Stat(const std::string& path, SystemTools::Stat_t* buf) +{ + if (path.empty()) { + errno = ENOENT; + return -1; + } +#if defined(_WIN32) && !defined(__CYGWIN__) + // Ideally we should use ConvertToWindowsExtendedPath to support + // long paths, but _wstat64 rejects paths with '?' in them, thinking + // they are wildcards. + std::wstring const& wpath = Encoding::ToWide(path); +#if defined(__BORLANDC__) + return _wstati64(wpath.c_str(), buf); +#else + return _wstat64(wpath.c_str(), buf); +#endif +#else + return stat(path.c_str(), buf); +#endif +} + +//---------------------------------------------------------------------------- #ifdef __CYGWIN__ bool SystemTools::PathCygwinToWin32(const char* path, char* win32_path) { diff --git a/Source/kwsys/SystemTools.hxx.in b/Source/kwsys/SystemTools.hxx.in index 7a5256b236..53abce7a0d 100644 --- a/Source/kwsys/SystemTools.hxx.in +++ b/Source/kwsys/SystemTools.hxx.in @@ -13,6 +13,9 @@ #include <@KWSYS_NAMESPACE@/String.hxx> #include <sys/types.h> +// include sys/stat.h after sys/types.h +#include <sys/stat.h> + #if !defined(_WIN32) || defined(__CYGWIN__) #include <unistd.h> // For access permissions for use with access() #endif @@ -324,6 +327,27 @@ public: TestFilePermissions permissions); static bool TestFileAccess(const std::string& filename, TestFilePermissions permissions); +/** + * Cross platform wrapper for stat struct + */ +#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(__BORLANDC__) + typedef struct stati64 Stat_t; +#else + typedef struct _stat64 Stat_t; +#endif +#else + typedef struct stat Stat_t; +#endif + + /** + * Cross platform wrapper for stat system call + * + * On Windows this may not work for paths longer than 250 characters + * due to limitations of the underlying '_wstat64' call. + */ + static int Stat(const char* path, Stat_t* buf); + static int Stat(const std::string& path, Stat_t* buf); /** * Converts Cygwin path to Win32 path. Uses dictionary container for diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx index 8e1ea258a8..9b08a04a03 100644 --- a/Source/kwsys/testSystemTools.cxx +++ b/Source/kwsys/testSystemTools.cxx @@ -135,6 +135,19 @@ static bool CheckFileOperations() res = false; } + kwsys::SystemTools::Stat_t buf; + if (kwsys::SystemTools::Stat(testTxtFile.c_str(), &buf) != 0) { + std::cerr << "Problem with Stat - unable to stat text file: " + << testTxtFile << std::endl; + res = false; + } + + if (kwsys::SystemTools::Stat(testBinFile, &buf) != 0) { + std::cerr << "Problem with Stat - unable to stat bin file: " << testBinFile + << std::endl; + res = false; + } + if (!kwsys::SystemTools::MakeDirectory(testNewDir)) { std::cerr << "Problem with MakeDirectory for: " << testNewDir << std::endl; res = false; diff --git a/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in b/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in index e2cdec89ab..b4c6fae44e 100644 --- a/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in +++ b/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in @@ -1,5 +1,5 @@ #include <cmSystemTools.h> -#include <cmsys/Encoding.hxx> +#include "cmsys/Encoding.hxx" #include <string> #define RETVAL @_retval@ diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index 5d4ca707af..46431bc330 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -1,6 +1,6 @@ #include <cmConfigure.h> -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include <iostream> #include <map> #include <stdlib.h> diff --git a/Tests/CMakeLib/testEncoding.cxx b/Tests/CMakeLib/testEncoding.cxx index 403c896e5a..5e40638f7a 100644 --- a/Tests/CMakeLib/testEncoding.cxx +++ b/Tests/CMakeLib/testEncoding.cxx @@ -1,9 +1,9 @@ -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include <iostream> #include <string> #ifdef _WIN32 -#include <cmsys/ConsoleBuf.hxx> +#include "cmsys/ConsoleBuf.hxx" #endif #ifdef _WIN32 diff --git a/Tests/CMakeLib/testRST.cxx b/Tests/CMakeLib/testRST.cxx index e1b0903e69..889127650e 100644 --- a/Tests/CMakeLib/testRST.cxx +++ b/Tests/CMakeLib/testRST.cxx @@ -3,7 +3,7 @@ #include "cmRST.h" #include "cmSystemTools.h" -#include <cmsys/FStream.hxx> +#include "cmsys/FStream.hxx" #include <iostream> #include <string> diff --git a/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-result.txt b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-stderr.txt b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-stderr.txt new file mode 100644 index 0000000000..9d5f876a5a --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-stderr.txt @@ -0,0 +1,15 @@ +^CMake Error at INSTALL-FILES_FROM_DIR-bad.cmake:[0-9]+ \(file\): + file option FILES_FROM_DIR requires all files to be specified as relative + paths\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) ++ +CMake Error at INSTALL-FILES_FROM_DIR-bad.cmake:[0-9]+ \(file\): + file INSTALL option RENAME may not be combined with FILES_FROM_DIR\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) ++ +CMake Error at INSTALL-FILES_FROM_DIR-bad.cmake:[0-9]+ \(file\): + file option FILES_FROM_DIR may not appear after PATTERN or REGEX\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad.cmake b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad.cmake new file mode 100644 index 0000000000..807b704e07 --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad.cmake @@ -0,0 +1,5 @@ +set(src ${CMAKE_CURRENT_SOURCE_DIR}/from) +set(dst ${CMAKE_CURRENT_BINARY_DIR}/from) +file(INSTALL FILES ${src}/a.txt FILES_FROM_DIR ${src} DESTINATION ${dst}) +file(INSTALL FILES a.txt FILES_FROM_DIR ${src} DESTINATION ${dst} RENAME b.txt) +file(INSTALL FILES a.txt DESTINATION ${dst} PATTERN *.txt FILES_FROM_DIR) diff --git a/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-stdout.txt b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-stdout.txt new file mode 100644 index 0000000000..1c3c69303c --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-stdout.txt @@ -0,0 +1,8 @@ +-- Before Installing +-- Installing: .*/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-build/from/a.txt +-- Installing: .*/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-build/from/a/b.txt +-- Installing: .*/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-build/from/a/b/c.txt +-- Up-to-date: .*/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-build/from/a.txt +-- Up-to-date: .*/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-build/from/a/b.txt +-- Up-to-date: .*/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-build/from/a/b/c.txt +-- After Installing diff --git a/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR.cmake b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR.cmake new file mode 100644 index 0000000000..24e5282f36 --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-FILES_FROM_DIR.cmake @@ -0,0 +1,7 @@ +set(src ${CMAKE_CURRENT_SOURCE_DIR}/from) +set(dst ${CMAKE_CURRENT_BINARY_DIR}/from) +file(REMOVE RECURSE ${dst}) +message(STATUS "Before Installing") +file(INSTALL FILES a.txt a/b.txt a/b/c.txt FILES_FROM_DIR ${src} DESTINATION ${dst}) +file(INSTALL FILES a.txt a/b.txt a/b/c.txt FILES_FROM_DIR from DESTINATION ${dst}) +message(STATUS "After Installing") diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake index 63cbdd9799..26051b4d73 100644 --- a/Tests/RunCMake/file/RunCMakeTest.cmake +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -8,6 +8,8 @@ run_cmake(UPLOAD-unused-argument) run_cmake(UPLOAD-httpheader-not-set) run_cmake(UPLOAD-pass-not-set) run_cmake(INSTALL-DIRECTORY) +run_cmake(INSTALL-FILES_FROM_DIR) +run_cmake(INSTALL-FILES_FROM_DIR-bad) run_cmake(INSTALL-MESSAGE-bad) run_cmake(FileOpenFailRead) run_cmake(LOCK) diff --git a/Tests/RunCMake/file/from/a.txt b/Tests/RunCMake/file/from/a.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/Tests/RunCMake/file/from/a.txt diff --git a/Tests/RunCMake/file/from/a/b.txt b/Tests/RunCMake/file/from/a/b.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/Tests/RunCMake/file/from/a/b.txt diff --git a/Tests/RunCMake/file/from/a/b/c.txt b/Tests/RunCMake/file/from/a/b/c.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/Tests/RunCMake/file/from/a/b/c.txt diff --git a/Tests/RunCMake/project/ProjectDescription-stdout.txt b/Tests/RunCMake/project/ProjectDescription-stdout.txt new file mode 100644 index 0000000000..ffa90923ed --- /dev/null +++ b/Tests/RunCMake/project/ProjectDescription-stdout.txt @@ -0,0 +1 @@ +PROJECT_DESCRIPTION=Test Project diff --git a/Tests/RunCMake/project/ProjectDescription.cmake b/Tests/RunCMake/project/ProjectDescription.cmake new file mode 100644 index 0000000000..3a47362231 --- /dev/null +++ b/Tests/RunCMake/project/ProjectDescription.cmake @@ -0,0 +1,6 @@ +cmake_policy(SET CMP0048 NEW) +project(ProjectDescriptionTest VERSION 1.0.0 DESCRIPTION "Test Project" LANGUAGES) +if(NOT PROJECT_DESCRIPTION) + message(FATAL_ERROR "PROJECT_DESCRIPTION expected to be set") +endif() +message(STATUS "PROJECT_DESCRIPTION=${PROJECT_DESCRIPTION}") diff --git a/Tests/RunCMake/project/ProjectDescription2-result.txt b/Tests/RunCMake/project/ProjectDescription2-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/project/ProjectDescription2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/project/ProjectDescription2-stderr.txt b/Tests/RunCMake/project/ProjectDescription2-stderr.txt new file mode 100644 index 0000000000..558e2dfbb5 --- /dev/null +++ b/Tests/RunCMake/project/ProjectDescription2-stderr.txt @@ -0,0 +1 @@ + DESCRITPION may be specified at most once. diff --git a/Tests/RunCMake/project/ProjectDescription2.cmake b/Tests/RunCMake/project/ProjectDescription2.cmake new file mode 100644 index 0000000000..3f186ba195 --- /dev/null +++ b/Tests/RunCMake/project/ProjectDescription2.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0048 NEW) +project(ProjectDescriptionTest VERSION 1.0.0 DESCRIPTION "Test Project" DESCRIPTION "Only once allowed" LANGUAGES) diff --git a/Tests/RunCMake/project/RunCMakeTest.cmake b/Tests/RunCMake/project/RunCMakeTest.cmake index dba97d2b2f..3d13e2ef4b 100644 --- a/Tests/RunCMake/project/RunCMakeTest.cmake +++ b/Tests/RunCMake/project/RunCMakeTest.cmake @@ -7,6 +7,8 @@ run_cmake(LanguagesImplicit) run_cmake(LanguagesEmpty) run_cmake(LanguagesNONE) run_cmake(LanguagesTwice) +run_cmake(ProjectDescription) +run_cmake(ProjectDescription2) run_cmake(VersionAndLanguagesEmpty) run_cmake(VersionEmpty) run_cmake(VersionInvalid) diff --git a/Utilities/IWYU/mapping.imp b/Utilities/IWYU/mapping.imp new file mode 100644 index 0000000000..cfa90ccffd --- /dev/null +++ b/Utilities/IWYU/mapping.imp @@ -0,0 +1,136 @@ +[ + # C++ alternatives to C standard headers + { include: [ "<assert.h>", public, "<cassert>", public ] }, + { include: [ "<complex.h>", public, "<ccomplex>", public ] }, + { include: [ "<ctype.h>", public, "<cctype>", public ] }, + { include: [ "<errno.h>", public, "<cerrno>", public ] }, + { include: [ "<float.h>", public, "<cfloat>", public ] }, + { include: [ "<iso646.h>", public, "<ciso646>", public ] }, + { include: [ "<limits.h>", public, "<climits>", public ] }, + { include: [ "<locale.h>", public, "<clocale>", public ] }, + { include: [ "<math.h>", public, "<cmath>", public ] }, + { include: [ "<setjmp.h>", public, "<csetjmp>", public ] }, + { include: [ "<signal.h>", public, "<csignal>", public ] }, + { include: [ "<stdarg.h>", public, "<cstdarg>", public ] }, + { include: [ "<stddef.h>", public, "<cstddef>", public ] }, + { include: [ "<stdio.h>", public, "<cstdio>", public ] }, + { include: [ "<stdlib.h>", public, "<cstdlib>", public ] }, + { include: [ "<string.h>", public, "<cstring>", public ] }, + { include: [ "<time.h>", public, "<ctime>", public ] }, + { include: [ "<wchar.h>", public, "<cwchar>", public ] }, + { include: [ "<wctype.h>", public, "<cwctype>", public ] }, + + # HACK: check whether this can be removed with next iwyu release. + { include: [ "<bits/time.h>", private, "<time.h>", public ] }, + { include: [ "<bits/types/clock_t.h>", private, "<time.h>", public ] }, + { include: [ "<bits/types/struct_timespec.h>", private, "<time.h>", public ] }, + { include: [ "<bits/types/struct_timeval.h>", private, "<time.h>", public ] }, + { include: [ "<bits/types/struct_tm.h>", private, "<time.h>", public ] }, + { include: [ "<bits/types/time_t.h>", private, "<time.h>", public ] }, + + # HACK: check whether this can be removed with next iwyu release. + { symbol: [ "__GLIBC__", private, "<stdlib.h>", public ] }, + { symbol: [ "_Noreturn", private, "<stdlib.h>", public ] }, + + # HACK: iwyu wrongly thinks that including <iosfwd> is sufficient. + { symbol: [ "std::stringstream", private, "<sstream>", public ] }, + { symbol: [ "std::istringstream", private, "<sstream>", public ] }, + { symbol: [ "std::ostringstream", private, "<sstream>", public ] }, + + # HACK: iwyu suggests those two files each time vector[] is used. + # https://github.com/include-what-you-use/include-what-you-use/issues/166 + { include: [ "<ext/alloc_traits.h>", private, "<vector>", public ] }, + { include: [ "<memory>", public, "<vector>", public ] }, + + # TODO: enable this block and remove some <utility> includes? + #{ symbol: [ "std::pair", private, "<utility>", public ] }, + #{ symbol: [ "std::pair", private, "<map>", public ] }, + #{ symbol: [ "std::pair", private, "<set>", public ] }, + + # Wrappers for headers added in TR1 / C++11 + # { include: [ "<array>", public, "\"cm_array.hxx\"", public ] }, + # { include: [ "<functional>", public, "\"cm_functional.hxx\"", public ] }, + # { include: [ "<memory>", public, "\"cm_memory.hxx\"", public ] }, + { include: [ "<unordered_map>", public, "\"cm_unordered_map.hxx\"", public ] }, + { include: [ "<unordered_set>", public, "\"cm_unordered_set.hxx\"", public ] }, + # { include: [ "<tr1/array>", public, "\"cm_array.hxx\"", public ] }, + # { include: [ "<tr1/functional>", public, "\"cm_functional.hxx\"", public ] }, + # { include: [ "<tr1/memory>", public, "\"cm_memory.hxx\"", public ] }, + { include: [ "<tr1/unordered_map>", public, "\"cm_unordered_map.hxx\"", public ] }, + { include: [ "<tr1/unordered_set>", public, "\"cm_unordered_set.hxx\"", public ] }, + + # KWIML + { include: [ "<stdint.h>", public, "\"cm_kwiml.h\"", public ] }, + { include: [ "<inttypes.h>", public, "\"cm_kwiml.h\"", public ] }, + + # Self-sufficient wrapper for <sys/stat.h> + { include: [ "<sys/stat.h>", public, "\"cm_sys_stat.h\"", public ] }, + { symbol: [ "mode_t", private, "\"cm_sys_stat.h\"", public ] }, + + # TODO: remove once TR1 / C++11 is required. + { include: [ "\"cmsys/hash_fun.hxx\"", private, "\"cm_unordered_map.hxx\"", public ] }, + { include: [ "\"cmsys/hash_fun.hxx\"", private, "\"cm_unordered_set.hxx\"", public ] }, + { include: [ "\"cmsys/hash_map.hxx\"", private, "\"cm_unordered_map.hxx\"", public ] }, + { include: [ "\"cmsys/hash_set.hxx\"", private, "\"cm_unordered_set.hxx\"", public ] }, + { include: [ "\"cmsys/hashtable.hxx\"", private, "\"cm_unordered_map.hxx\"", public ] }, + { include: [ "\"cmsys/hashtable.hxx\"", private, "\"cm_unordered_set.hxx\"", public ] }, + + # Wrappers for 3rd-party libraries used from the system. + { include: [ "<archive.h>", private, "\"cm_libarchive.h\"", public ] }, + { include: [ "<archive_entry.h>", private, "\"cm_libarchive.h\"", public ] }, + { include: [ "@<curl/.+\\.h>", private, "\"cm_curl.h\"", public ] }, + { include: [ "<expat.h>", private, "\"cm_expat.h\"", public ] }, + { include: [ "<expat_external.h>", private, "\"cm_expat.h\"", public ] }, + { include: [ "<json/reader.h>", private, "\"cm_jsoncpp_reader.h\"", public ] }, + { include: [ "<json/value.h>", private, "\"cm_jsoncpp_value.h\"", public ] }, + { include: [ "<json/writer.h>", private, "\"cm_jsoncpp_writer.h\"", public ] }, + { include: [ "<rhash.h>", private, "\"cm_rhash.h\"", public ] }, + { include: [ "<uv.h>", private, "\"cm_uv.h\"", public ] }, + { include: [ "@<uv-.+\\.h>", private, "\"cm_uv.h\"", public ] }, + { include: [ "<kwiml/abi.h>", private, "\"cm_kwiml.h\"", public ] }, + { include: [ "<kwiml/int.h>", private, "\"cm_kwiml.h\"", public ] }, + { include: [ "<xmlrpc.h>", private, "\"cm_xmlrpc.h\"", public ] }, + { include: [ "<xmlrpc_client.h>", private, "\"cm_xmlrpc.h\"", public ] }, + { include: [ "@<xmlrpc-c/.+\\.h>", private, "\"cm_xmlrpc.h\"", public ] }, + { include: [ "<zconf.h>", private, "\"cm_zlib.h\"", public ] }, + { include: [ "<zlib.h>", private, "\"cm_zlib.h\"", public ] }, + + # Wrappers for bundled 3rd-party libraries. + { include: [ "\"cmlibarchive/libarchive/archive.h\"", private, "\"cm_libarchive.h\"", public ] }, + { include: [ "\"cmlibarchive/libarchive/archive_entry.h\"", private, "\"cm_libarchive.h\"", public ] }, + { include: [ "@\"cmcurl/include/curl/.+\\.h\"", private, "\"cm_curl.h\"", public ] }, + { include: [ "\"cmexpat/lib/expat.h\"", private, "\"cm_expat.h\"", public ] }, + { include: [ "\"cmexpat/lib/expat_external.h\"", private, "\"cm_expat.h\"", public ] }, + { include: [ "\"cmjsoncpp/include/json/reader.h\"", private, "\"cm_jsoncpp_reader.h\"", public ] }, + { include: [ "\"cmjsoncpp/include/json/value.h\"", private, "\"cm_jsoncpp_value.h\"", public ] }, + { include: [ "\"cmjsoncpp/include/json/writer.h\"", private, "\"cm_jsoncpp_writer.h\"", public ] }, + { include: [ "\"cmlibrhash/librhash/rhash.h\"", private, "\"cm_rhash.h\"", public ] }, + { include: [ "\"cmlibuv/include/uv.h\"", private, "\"cm_uv.h\"", public ] }, + { include: [ "@\"cmlibuv/include/uv-.+\\.h\"", private, "\"cm_uv.h\"", public ] }, + { include: [ "\"KWIML/include/kwiml/abi.h\"", private, "\"cm_kwiml.h\"", public ] }, + { include: [ "\"KWIML/include/kwiml/int.h\"", private, "\"cm_kwiml.h\"", public ] }, + { include: [ "\"cmzlib/cm_zlib_mangle.h\"", private, "\"cm_zlib.h\"", public ] }, + { include: [ "\"cmzlib/zconf.h\"", private, "\"cm_zlib.h\"", public ] }, + { include: [ "\"cmzlib/zlib.h\"", private, "\"cm_zlib.h\"", public ] }, + + { symbol: [ "std::ifstream", private, "\"cmsys/FStream.hxx\"", public ] }, + { symbol: [ "std::ofstream", private, "\"cmsys/FStream.hxx\"", public ] }, + { symbol: [ "cmsys::ifstream", private, "\"cmsys/FStream.hxx\"", public ] }, + { symbol: [ "cmsys::ofstream", private, "\"cmsys/FStream.hxx\"", public ] }, + + { include: [ "<istream>", public, "\"cmsys/FStream.hxx\"", public ] }, + { include: [ "<ostream>", public, "\"cmsys/FStream.hxx\"", public ] }, + { include: [ "<fstream>", public, "\"cmsys/FStream.hxx\"", public ] }, + + # major and minor are used as macro arguments. Those are false matches. + { symbol: [ "major", private, "\"cm_kwiml.h\"", public ] }, + { symbol: [ "minor", private, "\"cm_kwiml.h\"", public ] }, + { symbol: [ "major", private, "\"cmVersion.h\"", public ] }, + { symbol: [ "minor", private, "\"cmVersion.h\"", public ] }, + + { include: [ "<curses.h>", private, "\"cmCursesStandardIncludes.h\"", public ] }, + { include: [ "\"form.h\"", private, "\"cmCursesStandardIncludes.h\"", public ] }, + { include: [ "<form.h>", private, "\"cmCursesStandardIncludes.h\"", public ] }, +] + +# vim: set ft=toml: diff --git a/Utilities/KWIML/test/CMakeLists.txt b/Utilities/KWIML/test/CMakeLists.txt index 1bf93bb4e2..40fe62f200 100644 --- a/Utilities/KWIML/test/CMakeLists.txt +++ b/Utilities/KWIML/test/CMakeLists.txt @@ -38,6 +38,8 @@ endif() add_executable(kwiml_test ${test_srcs}) set_property(TARGET kwiml_test PROPERTY COMPILE_DEFINITIONS ${test_defs}) +set_property(TARGET kwiml_test PROPERTY C_INCLUDE_WHAT_YOU_USE "") +set_property(TARGET kwiml_test PROPERTY CXX_INCLUDE_WHAT_YOU_USE "") set_property(TARGET kwiml_test PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) add_test(NAME ${KWIML_TEST_PREFIX}.test COMMAND kwiml_test) |