summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:00 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:00 +0900
commit9d41175628605ea4864b68853cd2d7c873c4d869 (patch)
tree931e3b2734834e6a0a013645677205ed8c5aa432
parent484e650e5f7846961a1597af681a9186b2a03729 (diff)
downloadcmake-9d41175628605ea4864b68853cd2d7c873c4d869.tar.gz
cmake-9d41175628605ea4864b68853cd2d7c873c4d869.tar.bz2
cmake-9d41175628605ea4864b68853cd2d7c873c4d869.zip
Imported Upstream version 3.17.1upstream/3.17.1
-rw-r--r--CMakeLists.txt4
-rw-r--r--Help/cpack_gen/nsis.rst4
-rw-r--r--Help/generator/Ninja Multi-Config.rst40
-rw-r--r--Help/manual/cmake.1.rst4
-rw-r--r--Help/prop_tgt/MACHO_COMPATIBILITY_VERSION.rst27
-rw-r--r--Help/prop_tgt/MACHO_CURRENT_VERSION.rst24
-rw-r--r--Help/prop_tgt/SOVERSION.rst20
-rw-r--r--Help/prop_tgt/VERSION.rst20
-rw-r--r--Help/prop_tgt/XCODE_GENERATE_SCHEME.rst1
-rw-r--r--Help/prop_tgt/XCODE_SCHEME_WORKING_DIRECTORY.rst4
-rw-r--r--Help/release/3.15.rst9
-rw-r--r--Help/release/3.17.rst14
-rw-r--r--Help/variable/CMAKE_CROSS_CONFIGS.rst12
-rw-r--r--Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst10
-rw-r--r--Help/variable/CMAKE_DEFAULT_CONFIGS.rst16
-rw-r--r--Help/variable/CMAKE_FIND_DEBUG_MODE.rst1
-rw-r--r--Help/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH.rst2
-rw-r--r--Help/variable/CMAKE_XCODE_SCHEME_WORKING_DIRECTORY.rst4
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake6
-rw-r--r--Modules/CMakeRCInformation.cmake2
-rw-r--r--Modules/CheckIPOSupported.cmake6
-rw-r--r--Modules/Compiler/XL-CXX.cmake8
-rw-r--r--Modules/ExternalProject.cmake2
-rw-r--r--Modules/FindPython.cmake14
-rw-r--r--Modules/FindPython/Support.cmake10
-rw-r--r--Modules/FindPython2.cmake14
-rw-r--r--Modules/FindPython3.cmake14
-rw-r--r--Modules/Platform/Darwin-Initialize.cmake4
-rw-r--r--Modules/Platform/Windows-Clang.cmake9
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx4
-rw-r--r--Source/CTest/cmProcess.cxx21
-rw-r--r--Source/CTest/cmProcess.h1
-rw-r--r--Source/CursesDialog/cmCursesLongMessageForm.cxx35
-rw-r--r--Source/CursesDialog/cmCursesLongMessageForm.h6
-rw-r--r--Source/CursesDialog/cmCursesMainForm.cxx24
-rw-r--r--Source/CursesDialog/cmCursesMainForm.h2
-rw-r--r--Source/QtDialog/QCMake.cxx2
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx2
-rw-r--r--Source/cmLocalGenerator.cxx47
-rw-r--r--Source/cmLocalGenerator.h1
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx6
-rw-r--r--Source/cmcmd.cxx29
-rw-r--r--Tests/ExternalProject/CMakeLists.txt9
-rw-r--r--Tests/RunCMake/CTestTimeout/Basic-stdout.txt2
-rw-r--r--Tests/RunCMake/CTestTimeout/Fork-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake17
-rw-r--r--Tests/RunCMake/CommandLine/llvm_rc_failing_first_command-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/llvm_rc_failing_second_command-stderr.txt1
-rw-r--r--Tests/RunCMake/target_link_libraries/ConfigCase-result.txt1
-rw-r--r--Tests/RunCMake/target_link_libraries/ConfigCase-stderr.txt13
-rw-r--r--Tests/RunCMake/target_link_libraries/ConfigCase.cmake6
-rw-r--r--Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake8
-rw-r--r--Utilities/Release/linux/x86_64/Dockerfile4
-rw-r--r--Utilities/Release/linux/x86_64/deps/Dockerfile8
55 files changed, 370 insertions, 191 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18b8d7d6e..fb7b9b7d6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -810,6 +810,10 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
PATTERN "*.sh*" PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
+ PATTERN "ExportImportList"
+ PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
+ GROUP_READ GROUP_EXECUTE
+ WORLD_READ WORLD_EXECUTE
REGEX "Help/(dev|guide)($|/)" EXCLUDE
)
diff --git a/Help/cpack_gen/nsis.rst b/Help/cpack_gen/nsis.rst
index a310e9f36..d1e495f99 100644
--- a/Help/cpack_gen/nsis.rst
+++ b/Help/cpack_gen/nsis.rst
@@ -1,7 +1,9 @@
CPack NSIS Generator
--------------------
-CPack Nullsoft Scriptable Install System (NSIS) generator specific options
+CPack Nullsoft Scriptable Install System (NSIS) generator specific options.
+
+The NSIS generator requires NSIS 3.0 or newer.
Variables specific to CPack NSIS generator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/Help/generator/Ninja Multi-Config.rst b/Help/generator/Ninja Multi-Config.rst
index 1f68535ff..f480eb82e 100644
--- a/Help/generator/Ninja Multi-Config.rst
+++ b/Help/generator/Ninja Multi-Config.rst
@@ -33,53 +33,19 @@ below for how to enable cross-config mode.
The ``Ninja Multi-Config`` generator recognizes the following variables:
:variable:`CMAKE_CONFIGURATION_TYPES`
- Specifies the total set of configurations to build. See the variable's
- documentation for more information.
+ Specifies the total set of configurations to build.
:variable:`CMAKE_CROSS_CONFIGS`
Specifies a :ref:`semicolon-separated list <CMake Language Lists>` of
configurations available from all ``build-<Config>.ninja`` files.
- This variable activates cross-config mode.
- Targets from each config specified in this variable can be built from any
- ``build-<Config>.ninja`` file. Custom commands will use the configuration
- native to ``build-<Config>.ninja``. If it is set to ``all``, all
- configurations from :variable:`CMAKE_CONFIGURATION_TYPES` are cross-configs.
- If it is not specified, or empty, each ``build-<Config>.ninja`` file will
- only contain build rules for its own configuration.
-
- The value of this variable must be a subset of
- :variable:`CMAKE_CONFIGURATION_TYPES`.
:variable:`CMAKE_DEFAULT_BUILD_TYPE`
- Specifies the configuration to use by default in a ``build.ninja`` file. If
- this variable is specified, ``build.ninja`` uses build rules from
- ``build-<Config>.ninja`` by default. All custom commands are executed with
- this configuration. If the variable is not specified, the first item from
- :variable:`CMAKE_CONFIGURATION_TYPES` is used instead.
-
- The value of this variable must be one of the items from
- :variable:`CMAKE_CONFIGURATION_TYPES`.
+ Specifies the configuration to use by default in a ``build.ninja`` file.
:variable:`CMAKE_DEFAULT_CONFIGS`
Specifies a :ref:`semicolon-separated list <CMake Language Lists>` of
configurations to build for a target in ``build.ninja``
- if no ``:<Config>`` suffix is specified. If it is set to ``all``, all
- configurations from :variable:`CMAKE_CROSS_CONFIGS` are used. If
- it is not specified, it defaults to
- :variable:`CMAKE_DEFAULT_BUILD_TYPE`.
-
- For example, if you set
- :variable:`CMAKE_DEFAULT_BUILD_TYPE` to ``Release``, but
- set :variable:`CMAKE_DEFAULT_CONFIGS` to ``Debug`` or ``all``,
- all ``<target>`` aliases in ``build.ninja`` will resolve to
- ``<target>:Debug`` or ``<target>:all``, but custom commands will still use
- the ``Release`` configuration.
-
- The value of this variable must be a subset of
- :variable:`CMAKE_CROSS_CONFIGS` or be the same as
- :variable:`CMAKE_DEFAULT_BUILD_TYPE`. It must not be
- specified if :variable:`CMAKE_DEFAULT_BUILD_TYPE` or
- :variable:`CMAKE_CROSS_CONFIGS` is not used.
+ if no ``:<Config>`` suffix is specified.
Consider the following example:
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 28a081f96..d34387431 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -242,10 +242,12 @@ Options
:command:`message(SEND_ERROR)` calls.
``--debug-find``
- Put cmake find in a debug mode.
+ Put cmake find commands in a debug mode.
Print extra find call information during the cmake run to standard
error. Output is designed for human consumption and not for parsing.
+ See also the :variable:`CMAKE_FIND_DEBUG_MODE` variable for debugging
+ a more local part of the project.
``--trace``
Put cmake in trace mode.
diff --git a/Help/prop_tgt/MACHO_COMPATIBILITY_VERSION.rst b/Help/prop_tgt/MACHO_COMPATIBILITY_VERSION.rst
index f3fedbabe..26d5cc86c 100644
--- a/Help/prop_tgt/MACHO_COMPATIBILITY_VERSION.rst
+++ b/Help/prop_tgt/MACHO_COMPATIBILITY_VERSION.rst
@@ -4,11 +4,22 @@ MACHO_COMPATIBILITY_VERSION
What compatibility version number is this target for Mach-O binaries.
For shared libraries on Mach-O systems (e.g. macOS, iOS)
-the ``MACHO_COMPATIBILITY_VERSION`` property correspond to
-``compatibility version`` and :prop_tgt:`MACHO_CURRENT_VERSION` to
-``current version``.
-See the :prop_tgt:`FRAMEWORK` target property for an example.
-
-Versions of Mach-O binaries may be checked with the ``otool -L <binary>``
-command. If ``MACHO_COMPATIBILITY_VERSION`` is not set, the value of
-the :prop_tgt:`SOVERSION` property will be used.
+the ``MACHO_COMPATIBILITY_VERSION`` property corresponds to the
+*compatibility version* and :prop_tgt:`MACHO_CURRENT_VERSION` corresponds to
+the *current version*. These are both embedded in the shared library binary
+and can be checked with the ``otool -L <binary>`` command.
+
+It should be noted that the :prop_tgt:`MACHO_CURRENT_VERSION` and
+``MACHO_COMPATIBILITY_VERSION`` properties do not affect the file
+names or version-related symlinks that CMake generates for the library.
+The :prop_tgt:`VERSION` and :prop_tgt:`SOVERSION` target properties still
+control the file and symlink names. The ``install_name`` is also still
+controlled by :prop_tgt:`SOVERSION`.
+
+When :prop_tgt:`MACHO_CURRENT_VERSION` and ``MACHO_COMPATIBILITY_VERSION``
+are not given, :prop_tgt:`VERSION` and :prop_tgt:`SOVERSION` are used for
+the version details to be embedded in the binaries respectively.
+The :prop_tgt:`MACHO_CURRENT_VERSION` and ``MACHO_COMPATIBILITY_VERSION``
+properties only need to be given if the project needs to decouple the file
+and symlink naming from the version details embedded in the binaries
+(e.g. to match libtool conventions).
diff --git a/Help/prop_tgt/MACHO_CURRENT_VERSION.rst b/Help/prop_tgt/MACHO_CURRENT_VERSION.rst
index 4a1d3f063..9afb35699 100644
--- a/Help/prop_tgt/MACHO_CURRENT_VERSION.rst
+++ b/Help/prop_tgt/MACHO_CURRENT_VERSION.rst
@@ -4,10 +4,22 @@ MACHO_CURRENT_VERSION
What current version number is this target for Mach-O binaries.
For shared libraries on Mach-O systems (e.g. macOS, iOS)
-the :prop_tgt:`MACHO_COMPATIBILITY_VERSION` property correspond to
-``compatibility version`` and ``MACHO_CURRENT_VERSION`` to ``current version``.
-See the :prop_tgt:`FRAMEWORK` target property for an example.
+the :prop_tgt:`MACHO_COMPATIBILITY_VERSION` property corresponds to the
+*compatibility version* and ``MACHO_CURRENT_VERSION`` corresponds to the
+*current version*. These are both embedded in the shared library binary
+and can be checked with the ``otool -L <binary>`` command.
-Versions of Mach-O binaries may be checked with the ``otool -L <binary>``
-command. If ``MACHO_CURRENT_VERSION`` is not set, the value of
-the :prop_tgt:`VERSION` property will be used.
+It should be noted that the ``MACHO_CURRENT_VERSION`` and
+:prop_tgt:`MACHO_COMPATIBILITY_VERSION` properties do not affect the file
+names or version-related symlinks that CMake generates for the library.
+The :prop_tgt:`VERSION` and :prop_tgt:`SOVERSION` target properties still
+control the file and symlink names. The ``install_name`` is also still
+controlled by :prop_tgt:`SOVERSION`.
+
+When ``MACHO_CURRENT_VERSION`` and :prop_tgt:`MACHO_COMPATIBILITY_VERSION`
+are not given, :prop_tgt:`VERSION` and :prop_tgt:`SOVERSION` are used for
+the version details to be embedded in the binaries respectively.
+The ``MACHO_CURRENT_VERSION`` and :prop_tgt:`MACHO_COMPATIBILITY_VERSION`
+properties only need to be given if the project needs to decouple the file
+and symlink naming from the version details embedded in the binaries
+(e.g. to match libtool conventions).
diff --git a/Help/prop_tgt/SOVERSION.rst b/Help/prop_tgt/SOVERSION.rst
index d6f8a941f..b377f2228 100644
--- a/Help/prop_tgt/SOVERSION.rst
+++ b/Help/prop_tgt/SOVERSION.rst
@@ -21,9 +21,17 @@ Mach-O Versions
^^^^^^^^^^^^^^^
For shared libraries and executables on Mach-O systems (e.g. macOS, iOS),
-the ``SOVERSION`` property is a fallback to
-:prop_tgt:`MACHO_COMPATIBILITY_VERSION` property which corresponds to
-*compatiblity version* and :prop_tgt:`VERSION` is a fallback to
-:prop_tgt:`MACHO_CURRENT_VERSION` which corresponds to *current version*.
-See the :prop_tgt:`FRAMEWORK` target property for an example. Versions
-of Mach-O binaries may be checked with the ``otool -L <binary>`` command.
+the ``SOVERSION`` property corresponds to the *compatibility version* and
+:prop_tgt:`VERSION` corresponds to the *current version* (unless Mach-O
+specific overrides are provided, as discussed below).
+See the :prop_tgt:`FRAMEWORK` target property for an example.
+
+For shared libraries, the :prop_tgt:`MACHO_COMPATIBILITY_VERSION` and
+:prop_tgt:`MACHO_CURRENT_VERSION` properties can be used to
+override the *compatibility version* and *current version* respectively.
+Note that ``SOVERSION`` will still be used to form the ``install_name``
+and both ``SOVERSION`` and :prop_tgt:`VERSION` may also affect the file
+and symlink names.
+
+Versions of Mach-O binaries may be checked with the ``otool -L <binary>``
+command.
diff --git a/Help/prop_tgt/VERSION.rst b/Help/prop_tgt/VERSION.rst
index f592f4a61..95db4837b 100644
--- a/Help/prop_tgt/VERSION.rst
+++ b/Help/prop_tgt/VERSION.rst
@@ -23,9 +23,17 @@ Mach-O Versions
^^^^^^^^^^^^^^^
For shared libraries and executables on Mach-O systems (e.g. macOS, iOS),
-the ``VERSION`` property is a fallback to :prop_tgt:`MACHO_CURRENT_VERSION`
-property which corresponds to *current version* and :prop_tgt:`SOVERSION`
-is a fallback to :prop_tgt:`MACHO_COMPATIBILITY_VERSION` which corresponds
-to *compatiblity version*. See the :prop_tgt:`FRAMEWORK` target
-property for an example. Versions of Mach-O binaries may be checked with the
-``otool -L <binary>`` command.
+the :prop_tgt:`SOVERSION` property corresponds to the *compatibility version*
+and ``VERSION`` corresponds to the *current version* (unless Mach-O specific
+overrides are provided, as discussed below).
+See the :prop_tgt:`FRAMEWORK` target property for an example.
+
+For shared libraries, the :prop_tgt:`MACHO_COMPATIBILITY_VERSION` and
+:prop_tgt:`MACHO_CURRENT_VERSION` properties can be used to
+override the *compatibility version* and *current version* respectively.
+Note that :prop_tgt:`SOVERSION` will still be used to form the
+``install_name`` and both :prop_tgt:`SOVERSION` and ``VERSION`` may also
+affect the file and symlink names.
+
+Versions of Mach-O binaries may be checked with the ``otool -L <binary>``
+command.
diff --git a/Help/prop_tgt/XCODE_GENERATE_SCHEME.rst b/Help/prop_tgt/XCODE_GENERATE_SCHEME.rst
index 0e182cfc2..c32b4dea3 100644
--- a/Help/prop_tgt/XCODE_GENERATE_SCHEME.rst
+++ b/Help/prop_tgt/XCODE_GENERATE_SCHEME.rst
@@ -38,3 +38,4 @@ The following target properties will be applied on the
- :prop_tgt:`XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING`
- :prop_tgt:`XCODE_SCHEME_ENVIRONMENT`
- :prop_tgt:`XCODE_SCHEME_EXECUTABLE`
+- :prop_tgt:`XCODE_SCHEME_WORKING_DIRECTORY`
diff --git a/Help/prop_tgt/XCODE_SCHEME_WORKING_DIRECTORY.rst b/Help/prop_tgt/XCODE_SCHEME_WORKING_DIRECTORY.rst
index 7ffa74bb4..f538f1da8 100644
--- a/Help/prop_tgt/XCODE_SCHEME_WORKING_DIRECTORY.rst
+++ b/Help/prop_tgt/XCODE_SCHEME_WORKING_DIRECTORY.rst
@@ -1,8 +1,8 @@
XCODE_SCHEME_WORKING_DIRECTORY
------------------------------
-Specify the ``Working Directory`` a of the `Run` and `Profile`
-action in the generated Xcode scheme. In case the value contains
+Specify the ``Working Directory`` of the *Run* and *Profile*
+actions in the generated Xcode scheme. In case the value contains
generator expressions those are evaluated.
This property is initialized by the value of the variable
diff --git a/Help/release/3.15.rst b/Help/release/3.15.rst
index 957e6e958..e68e7d38b 100644
--- a/Help/release/3.15.rst
+++ b/Help/release/3.15.rst
@@ -332,6 +332,15 @@ Deprecated and Removed Features
Other Changes
=============
+* If a feature specified by :command:`target_compile_features` is available
+ in the compiler's default standard level, CMake 3.14 and below incorrectly
+ added unnecessary ``-std=`` flags that could lower the standard level.
+ This bug has been fixed in CMake 3.15. This behavior change may expose
+ bugs in existing projects that were relying on undocumented implementation
+ details. Specifying compile features only ensures that the compiler runs
+ in a mode that has those features, not that any specific standard level is
+ used or explicit ``-std=`` flag passed.
+
* CMake learned how to compile C++14 with the IBM AIX XL compiler
and the SunPro compiler and to compile C++20 with the AppleClang compiler.
diff --git a/Help/release/3.17.rst b/Help/release/3.17.rst
index c2cfdf03f..7c5b44d9c 100644
--- a/Help/release/3.17.rst
+++ b/Help/release/3.17.rst
@@ -282,6 +282,8 @@ Deprecated and Removed Features
option and cannot be fixed without breaking compatibility, and so have
been superseded.
+* The :cpack_gen:`CPack NSIS Generator` now requires NSIS 3.0 or later.
+
Other Changes
=============
@@ -319,3 +321,15 @@ Other Changes
* The :generator:`Xcode` generator no longer hard-codes ``-Wmost``,
``-Wno-four-char-constants``, and ``-Wno-unknown-pragmas`` warning flags.
+
+Updates
+=======
+
+Changes made since CMake 3.17.0 include the following.
+
+3.17.1
+------
+
+* CMake 3.17.0 updated the :cpack_gen:`CPack NSIS Generator` with changes
+ that require NSIS 3.0 or later. CMake 3.17.1 now enforces the use
+ of a sufficiently new version.
diff --git a/Help/variable/CMAKE_CROSS_CONFIGS.rst b/Help/variable/CMAKE_CROSS_CONFIGS.rst
index c850af204..94157f3bb 100644
--- a/Help/variable/CMAKE_CROSS_CONFIGS.rst
+++ b/Help/variable/CMAKE_CROSS_CONFIGS.rst
@@ -3,5 +3,13 @@ CMAKE_CROSS_CONFIGS
Specifies a :ref:`semicolon-separated list <CMake Language Lists>` of
configurations available from all ``build-<Config>.ninja`` files in the
-:generator:`Ninja Multi-Config` generator. See the generator's
-documentation for more details.
+:generator:`Ninja Multi-Config` generator. This variable activates
+cross-config mode. Targets from each config specified in this variable can be
+built from any ``build-<Config>.ninja`` file. Custom commands will use the
+configuration native to ``build-<Config>.ninja``. If it is set to ``all``, all
+configurations from :variable:`CMAKE_CONFIGURATION_TYPES` are cross-configs. If
+it is not specified, or empty, each ``build-<Config>.ninja`` file will only
+contain build rules for its own configuration.
+
+The value of this variable must be a subset of
+:variable:`CMAKE_CONFIGURATION_TYPES`.
diff --git a/Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst b/Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst
index 62ee0d294..aa4f82dbd 100644
--- a/Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst
+++ b/Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst
@@ -2,5 +2,11 @@ CMAKE_DEFAULT_BUILD_TYPE
------------------------
Specifies the configuration to use by default in a ``build.ninja`` file in the
-:generator:`Ninja Multi-Config` generator. See the generator's documentation
-for more details.
+:generator:`Ninja Multi-Config` generator. If this variable is specified,
+``build.ninja`` uses build rules from ``build-<Config>.ninja`` by default. All
+custom commands are executed with this configuration. If the variable is not
+specified, the first item from :variable:`CMAKE_CONFIGURATION_TYPES` is used
+instead.
+
+The value of this variable must be one of the items from
+:variable:`CMAKE_CONFIGURATION_TYPES`.
diff --git a/Help/variable/CMAKE_DEFAULT_CONFIGS.rst b/Help/variable/CMAKE_DEFAULT_CONFIGS.rst
index 86d8a5a49..84c642aa5 100644
--- a/Help/variable/CMAKE_DEFAULT_CONFIGS.rst
+++ b/Help/variable/CMAKE_DEFAULT_CONFIGS.rst
@@ -3,5 +3,17 @@ CMAKE_DEFAULT_CONFIGS
Specifies a :ref:`semicolon-separated list <CMake Language Lists>` of configurations
to build for a target in ``build.ninja`` if no ``:<Config>`` suffix is specified in
-the :generator:`Ninja Multi-Config` generator.
-See the generator's documentation for more details.
+the :generator:`Ninja Multi-Config` generator. If it is set to ``all``, all
+configurations from :variable:`CMAKE_CROSS_CONFIGS` are used. If it is not
+specified, it defaults to :variable:`CMAKE_DEFAULT_BUILD_TYPE`.
+
+For example, if you set :variable:`CMAKE_DEFAULT_BUILD_TYPE` to ``Release``,
+but set :variable:`CMAKE_DEFAULT_CONFIGS` to ``Debug`` or ``all``, all
+``<target>`` aliases in ``build.ninja`` will resolve to ``<target>:Debug`` or
+``<target>:all``, but custom commands will still use the ``Release``
+configuration.
+
+The value of this variable must be a subset of :variable:`CMAKE_CROSS_CONFIGS`
+or be the same as :variable:`CMAKE_DEFAULT_BUILD_TYPE`. It must not be
+specified if :variable:`CMAKE_DEFAULT_BUILD_TYPE` or
+:variable:`CMAKE_CROSS_CONFIGS` is not used.
diff --git a/Help/variable/CMAKE_FIND_DEBUG_MODE.rst b/Help/variable/CMAKE_FIND_DEBUG_MODE.rst
index 33ffdd681..f5fd8ce9f 100644
--- a/Help/variable/CMAKE_FIND_DEBUG_MODE.rst
+++ b/Help/variable/CMAKE_FIND_DEBUG_MODE.rst
@@ -3,6 +3,7 @@ CMAKE_FIND_DEBUG_MODE
Print extra find call information for the following commands to standard
error:
+
* :command:`find_program`
* :command:`find_library`
* :command:`find_file`
diff --git a/Help/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH.rst b/Help/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH.rst
index a99c108c8..34524d1d6 100644
--- a/Help/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH.rst
+++ b/Help/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH.rst
@@ -9,5 +9,5 @@ any directories outside the project that are in the linker search path or
contain linked library files. The directories are appended after the
value of the :prop_tgt:`INSTALL_RPATH` target property.
-This varibale is used to initialize the target property
+This variable is used to initialize the target property
:prop_tgt:`INSTALL_RPATH_USE_LINK_PATH` for all targets.
diff --git a/Help/variable/CMAKE_XCODE_SCHEME_WORKING_DIRECTORY.rst b/Help/variable/CMAKE_XCODE_SCHEME_WORKING_DIRECTORY.rst
index cc690f7b1..5bb790797 100644
--- a/Help/variable/CMAKE_XCODE_SCHEME_WORKING_DIRECTORY.rst
+++ b/Help/variable/CMAKE_XCODE_SCHEME_WORKING_DIRECTORY.rst
@@ -1,8 +1,8 @@
CMAKE_XCODE_SCHEME_WORKING_DIRECTORY
------------------------------------
-Specify the ``Working Directory`` a of the `Run` and `Profile`
-action in the generated Xcode scheme.
+Specify the ``Working Directory`` of the *Run* and *Profile*
+actions in the generated Xcode scheme.
This variable initializes the
:prop_tgt:`XCODE_SCHEME_WORKING_DIRECTORY`
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index d125791f2..d3ed45be6 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -128,7 +128,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
set(CMAKE_EXECUTABLE_FORMAT "Unknown" CACHE INTERNAL "Executable file format")
endif()
- if(CMAKE_GENERATOR STREQUAL "Ninja" AND MSVC_${lang}_ARCHITECTURE_ID)
+ if(CMAKE_GENERATOR MATCHES "^Ninja" AND MSVC_${lang}_ARCHITECTURE_ID)
foreach(userflags "${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}" "")
CMAKE_DETERMINE_MSVC_SHOWINCLUDES_PREFIX(${lang} "${userflags}")
endforeach()
@@ -246,8 +246,10 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
set(id_platform ${CMAKE_VS_PLATFORM_NAME})
set(id_lang "${lang}")
set(id_PostBuildEvent_Command "")
- if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "^([Ll][Ll][Vv][Mm](_v[0-9]+(_xp)?)?|[Cc][Ll][Aa][Nn][Gg][Cc][Ll])$")
+ if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "^[Ll][Ll][Vv][Mm](_v[0-9]+(_xp)?)?$")
set(id_cl_var "ClangClExecutable")
+ elseif(CMAKE_VS_PLATFORM_TOOLSET MATCHES "^[Cc][Ll][Aa][Nn][Gg][Cc][Ll]$")
+ set(id_cl "$(CLToolExe)")
elseif(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*")
set(id_cl clang.exe)
else()
diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake
index 7c3a5ab30..b634796b7 100644
--- a/Modules/CMakeRCInformation.cmake
+++ b/Modules/CMakeRCInformation.cmake
@@ -39,7 +39,7 @@ set(CMAKE_RC_FLAG_REGEX "^[-/](D|I)")
# now define the following rule variables
# CMAKE_RC_COMPILE_OBJECT
-set(CMAKE_INCLUDE_FLAG_RC "-I")
+set(CMAKE_INCLUDE_FLAG_RC "-I ")
# compile a Resource file into an object file
if(NOT CMAKE_RC_COMPILE_OBJECT)
set(CMAKE_RC_COMPILE_OBJECT
diff --git a/Modules/CheckIPOSupported.cmake b/Modules/CheckIPOSupported.cmake
index 0d6ad20ae..90a9f6180 100644
--- a/Modules/CheckIPOSupported.cmake
+++ b/Modules/CheckIPOSupported.cmake
@@ -113,7 +113,7 @@ macro(_ipo_run_language_check language)
endforeach()
try_compile(
- result
+ _IPO_LANGUAGE_CHECK_RESULT
"${bindir}"
"${srcdir}"
"${TRY_COMPILE_PROJECT_NAME}"
@@ -122,8 +122,10 @@ macro(_ipo_run_language_check language)
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON"
OUTPUT_VARIABLE output
)
+ set(_IPO_LANGUAGE_CHECK_RESULT "${_IPO_LANGUAGE_CHECK_RESULT}")
+ unset(_IPO_LANGUAGE_CHECK_RESULT CACHE)
- if(NOT result)
+ if(NOT _IPO_LANGUAGE_CHECK_RESULT)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"${language} compiler IPO check failed with the following output:\n"
"${output}\n")
diff --git a/Modules/Compiler/XL-CXX.cmake b/Modules/Compiler/XL-CXX.cmake
index 303785112..41e3e1119 100644
--- a/Modules/Compiler/XL-CXX.cmake
+++ b/Modules/Compiler/XL-CXX.cmake
@@ -17,8 +17,14 @@ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.1)
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-qlanglvl=extended0x")
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-qlanglvl=extended0x")
set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON)
+
+ # XL does not really have full C++11 or C++14 support, but since we do not
+ # have a granular XL-CXX-FeatureTests table for it just pretend it does.
+ # This way projects that specify granular features will at least get a
+ # compiler mode for the corresponding standard.
set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON)
- if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.1.0)
+
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.1.0 AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-qlanglvl=extended1y")
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-qlanglvl=extended1y")
set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 5bac0d841..a9448e5e0 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -2595,7 +2595,7 @@ function(_ep_add_download_command name)
set(cmd ${CMAKE_COMMAND} -E rm -rf ${source_dir}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${abs_dir} ${source_dir})
else()
- get_property(no_extract TARGET "${name}" PROPERTY _EP_DOWNLOAD_NO_EXTRACT SET)
+ get_property(no_extract TARGET "${name}" PROPERTY _EP_DOWNLOAD_NO_EXTRACT)
if("${url}" MATCHES "^[a-z]+://")
# TODO: Should download and extraction be different steps?
if("x${fname}" STREQUAL "x")
diff --git a/Modules/FindPython.cmake b/Modules/FindPython.cmake
index 9dfa222dc..32ef12023 100644
--- a/Modules/FindPython.cmake
+++ b/Modules/FindPython.cmake
@@ -191,8 +191,7 @@ Hints
``Python_FIND_STRATEGY``
This variable defines how lookup will be done.
- The ``Python_FIND_STRATEGY`` variable can be set to empty or one of the
- following:
+ The ``Python_FIND_STRATEGY`` variable can be set to one of the following:
* ``VERSION``: Try to find the most recent version in all specified
locations.
@@ -205,8 +204,7 @@ Hints
``Python_FIND_REGISTRY``
On Windows the ``Python_FIND_REGISTRY`` variable determine the order
of preference between registry and environment variables.
- the ``Python_FIND_REGISTRY`` variable can be set to empty or one of the
- following:
+ the ``Python_FIND_REGISTRY`` variable can be set to one of the following:
* ``FIRST``: Try to use registry before environment variables.
This is the default.
@@ -216,8 +214,8 @@ Hints
``Python_FIND_FRAMEWORK``
On macOS the ``Python_FIND_FRAMEWORK`` variable determine the order of
preference between Apple-style and unix-style package components.
- This variable can be set to empty or take same values as
- :variable:`CMAKE_FIND_FRAMEWORK` variable.
+ This variable can take same values as :variable:`CMAKE_FIND_FRAMEWORK`
+ variable.
.. note::
@@ -231,8 +229,8 @@ Hints
``virtualenv`` or ``conda``. It is meaningful only when a virtual environment
is active (i.e. the ``activate`` script has been evaluated). In this case, it
takes precedence over ``Python_FIND_REGISTRY`` and ``CMAKE_FIND_FRAMEWORK``
- variables. The ``Python_FIND_VIRTUALENV`` variable can be set to empty or
- one of the following:
+ variables. The ``Python_FIND_VIRTUALENV`` variable can be set to one of the
+ following:
* ``FIRST``: The virtual environment is used before any other standard
paths to look-up for the interpreter. This is the default.
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index ce0645847..6bd10b3ba 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -941,15 +941,15 @@ endif()
# Compute search signature
# This signature will be used to check validity of cached variables on new search
-set (_${_PYTHON_PREFIX}_SIGNATURE "${${_PYTHON_PREFIX}_ROOT_DIR}:${${_PYTHON_PREFIX}_FIND_STRATEGY}:${${_PYTHON_PREFIX}_FIND_VIRTUALENV}")
+set (_${_PYTHON_PREFIX}_SIGNATURE "${${_PYTHON_PREFIX}_ROOT_DIR}:${_${_PYTHON_PREFIX}_FIND_STRATEGY}:${${_PYTHON_PREFIX}_FIND_VIRTUALENV}")
if (NOT WIN32)
string (APPEND _${_PYTHON_PREFIX}_SIGNATURE ":${${_PYTHON_PREFIX}_USE_STATIC_LIBS}:")
endif()
if (CMAKE_HOST_APPLE)
- string (APPEND _${_PYTHON_PREFIX}_SIGNATURE ":${${_PYTHON_PREFIX}_FIND_FRAMEWORK}")
+ string (APPEND _${_PYTHON_PREFIX}_SIGNATURE ":${_${_PYTHON_PREFIX}_FIND_FRAMEWORK}")
endif()
if (CMAKE_HOST_WIN32)
- string (APPEND _${_PYTHON_PREFIX}_SIGNATURE ":${${_PYTHON_PREFIX}_FIND_REGISTRY}")
+ string (APPEND _${_PYTHON_PREFIX}_SIGNATURE ":${_${_PYTHON_PREFIX}_FIND_REGISTRY}")
endif()
@@ -1036,7 +1036,7 @@ if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS)
if (_${_PYTHON_PREFIX}_EXECUTABLE)
break()
endif()
- if (NOT _${_PYTHON_PREFIX}_FIND_VIRTUALENV STREQUAL "ONLY")
+ if (_${_PYTHON_PREFIX}_FIND_VIRTUALENV STREQUAL "ONLY")
break()
endif()
endif()
@@ -1299,7 +1299,7 @@ if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS)
list (GET _${_PYTHON_PREFIX}_INTERPRETER_PROPERTIES 1 ${_PYTHON_PREFIX}_VERSION_MAJOR)
list (GET _${_PYTHON_PREFIX}_INTERPRETER_PROPERTIES 2 ${_PYTHON_PREFIX}_VERSION_MINOR)
- list (GET _${_PYTHON_PREFIX}_INTERPRETER_PROPERTIES 3 ${_PYTHON_PREFIX}_VERSION_PATH)
+ list (GET _${_PYTHON_PREFIX}_INTERPRETER_PROPERTIES 3 ${_PYTHON_PREFIX}_VERSION_PATCH)
list (GET _${_PYTHON_PREFIX}_INTERPRETER_PROPERTIES 4 _${_PYTHON_PREFIX}_ARCH)
set (_${_PYTHON_PREFIX}_ARCH2 ${_${_PYTHON_PREFIX}_ARCH})
diff --git a/Modules/FindPython2.cmake b/Modules/FindPython2.cmake
index af8ad3913..3d0e6b9cf 100644
--- a/Modules/FindPython2.cmake
+++ b/Modules/FindPython2.cmake
@@ -140,8 +140,7 @@ Hints
``Python2_FIND_STRATEGY``
This variable defines how lookup will be done.
- The ``Python2_FIND_STRATEGY`` variable can be set to empty or one of the
- following:
+ The ``Python2_FIND_STRATEGY`` variable can be set to one of the following:
* ``VERSION``: Try to find the most recent version in all specified
locations.
@@ -154,8 +153,7 @@ Hints
``Python2_FIND_REGISTRY``
On Windows the ``Python2_FIND_REGISTRY`` variable determine the order
of preference between registry and environment variables.
- the ``Python2_FIND_REGISTRY`` variable can be set to empty or one of the
- following:
+ the ``Python2_FIND_REGISTRY`` variable can be set to one of the following:
* ``FIRST``: Try to use registry before environment variables.
This is the default.
@@ -165,8 +163,8 @@ Hints
``Python2_FIND_FRAMEWORK``
On macOS the ``Python2_FIND_FRAMEWORK`` variable determine the order of
preference between Apple-style and unix-style package components.
- This variable can be set to empty or take same values as
- :variable:`CMAKE_FIND_FRAMEWORK` variable.
+ This variable can take same values as :variable:`CMAKE_FIND_FRAMEWORK`
+ variable.
.. note::
@@ -180,8 +178,8 @@ Hints
``virtualenv`` or ``conda``. It is meaningful only when a virtual environment
is active (i.e. the ``activate`` script has been evaluated). In this case, it
takes precedence over ``Python2_FIND_REGISTRY`` and ``CMAKE_FIND_FRAMEWORK``
- variables. The ``Python2_FIND_VIRTUALENV`` variable can be set to empty or
- one of the following:
+ variables. The ``Python2_FIND_VIRTUALENV`` variable can be set to one of the
+ following:
* ``FIRST``: The virtual environment is used before any other standard
paths to look-up for the interpreter. This is the default.
diff --git a/Modules/FindPython3.cmake b/Modules/FindPython3.cmake
index 66f4f7581..c9a5d094c 100644
--- a/Modules/FindPython3.cmake
+++ b/Modules/FindPython3.cmake
@@ -188,8 +188,7 @@ Hints
``Python3_FIND_STRATEGY``
This variable defines how lookup will be done.
- The ``Python3_FIND_STRATEGY`` variable can be set to empty or one of the
- following:
+ The ``Python3_FIND_STRATEGY`` variable can be set to one of the following:
* ``VERSION``: Try to find the most recent version in all specified
locations.
@@ -202,8 +201,7 @@ Hints
``Python3_FIND_REGISTRY``
On Windows the ``Python3_FIND_REGISTRY`` variable determine the order
of preference between registry and environment variables.
- The ``Python3_FIND_REGISTRY`` variable can be set to empty or one of the
- following:
+ The ``Python3_FIND_REGISTRY`` variable can be set to one of the following:
* ``FIRST``: Try to use registry before environment variables.
This is the default.
@@ -213,8 +211,8 @@ Hints
``Python3_FIND_FRAMEWORK``
On macOS the ``Python3_FIND_FRAMEWORK`` variable determine the order of
preference between Apple-style and unix-style package components.
- This variable can be set to empty or take same values as
- :variable:`CMAKE_FIND_FRAMEWORK` variable.
+ This variable can take same values as :variable:`CMAKE_FIND_FRAMEWORK`
+ variable.
.. note::
@@ -228,8 +226,8 @@ Hints
``virtualenv`` or ``conda``. It is meaningful only when a virtual environment
is active (i.e. the ``activate`` script has been evaluated). In this case, it
takes precedence over ``Python3_FIND_REGISTRY`` and ``CMAKE_FIND_FRAMEWORK``
- variables. The ``Python3_FIND_VIRTUALENV`` variable can be set to empty or
- one of the following:
+ variables. The ``Python3_FIND_VIRTUALENV`` variable can be set to one of the
+ following:
* ``FIRST``: The virtual environment is used before any other standard
paths to look-up for the interpreter. This is the default.
diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake
index 729217c54..80e668e5a 100644
--- a/Modules/Platform/Darwin-Initialize.cmake
+++ b/Modules/Platform/Darwin-Initialize.cmake
@@ -136,7 +136,7 @@ endfunction()
# Handle multi-arch sysroots. Do this before CMAKE_OSX_SYSROOT is
# transformed into a path, so that we know the sysroot name.
function(_apple_resolve_multi_arch_sysroots)
- if(CMAKE_APPLE_ARCH_SYSROOTS)
+ if(DEFINED CMAKE_APPLE_ARCH_SYSROOTS)
return() # Already cached
endif()
@@ -202,7 +202,7 @@ function(_apple_resolve_multi_arch_sysroots)
list(APPEND _arch_sysroots ${_arch_sysroot})
else()
message(WARNING "No SDK found for architecture '${arch}'")
- list(APPEND _arch_sysroots "") # Placeholder
+ list(APPEND _arch_sysroots "${arch}-SDK-NOTFOUND")
endif()
endforeach()
diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake
index 87ddfcd75..a048698aa 100644
--- a/Modules/Platform/Windows-Clang.cmake
+++ b/Modules/Platform/Windows-Clang.cmake
@@ -134,14 +134,15 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
include(Platform/Windows-MSVC)
# Feed the preprocessed rc file to llvm-rc
- if(CMAKE_RC_COMPILER_INIT STREQUAL "llvm-rc")
- if(DEFINED CMAKE_C_COMPILER)
+ if(CMAKE_RC_COMPILER_INIT MATCHES "llvm-rc")
+ if(DEFINED CMAKE_C_COMPILER_ID)
set(CMAKE_RC_PREPROCESSOR CMAKE_C_COMPILER)
- elseif(DEFINED CMAKE_CXX_COMPILER)
+ elseif(DEFINED CMAKE_CXX_COMPILER_ID)
set(CMAKE_RC_PREPROCESSOR CMAKE_CXX_COMPILER)
endif()
if(DEFINED CMAKE_RC_PREPROCESSOR)
- set(CMAKE_RC_COMPILE_OBJECT "${CMAKE_COMMAND} -E cmake_llvm_rc <OBJECT>.pp <${CMAKE_RC_PREPROCESSOR}> <DEFINES> -DRC_INVOKED <INCLUDES> <FLAGS> -clang:-MD -clang:-MF -clang:<SOURCE>.d -E <SOURCE> -- <CMAKE_RC_COMPILER> <DEFINES> /fo <OBJECT> <OBJECT>.pp")
+ set(CMAKE_DEPFILE_FLAGS_RC "-clang:-MD -clang:-MF -clang:<DEPFILE>")
+ set(CMAKE_RC_COMPILE_OBJECT "${CMAKE_COMMAND} -E cmake_llvm_rc <SOURCE> <OBJECT>.pp <${CMAKE_RC_PREPROCESSOR}> <DEFINES> -DRC_INVOKED <INCLUDES> <FLAGS> -E <SOURCE> -- <CMAKE_RC_COMPILER> <DEFINES> -I <SOURCE_DIR> <INCLUDES> /fo <OBJECT> <OBJECT>.pp")
if(CMAKE_GENERATOR STREQUAL "Ninja")
set(CMAKE_NINJA_CMCLDEPS_RC 0)
set(CMAKE_NINJA_DEP_TYPE_RC gcc)
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index f85751bde..bf7aa8745 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 17)
-set(CMake_VERSION_PATCH 0)
+set(CMake_VERSION_PATCH 1)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
@@ -21,7 +21,7 @@ endif()
if(NOT CMake_VERSION_NO_GIT)
# If this source was exported by 'git archive', use its commit info.
- set(git_info [==[e3185e3d1b CMake 3.17.0]==])
+ set(git_info [==[bd580b7d56 CMake 3.17.1]==])
# Otherwise, try to identify the current development source version.
if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 363f53682..2a4662798 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -453,12 +453,12 @@ int cmCPackNSISGenerator::InitializeInternal()
}
if (versionRex.find(output)) {
double nsisVersion = atof(versionRex.match(1).c_str());
- double minNSISVersion = 2.09;
+ double minNSISVersion = 3.0;
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"NSIS Version: " << nsisVersion << std::endl);
if (nsisVersion < minNSISVersion) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
- "CPack requires NSIS Version 2.09 or greater. "
+ "CPack requires NSIS Version 3.0 or greater. "
"NSIS found on the system was: "
<< nsisVersion << std::endl);
return 0;
diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx
index cdf899c49..6097aa5bd 100644
--- a/Source/CTest/cmProcess.cxx
+++ b/Source/CTest/cmProcess.cxx
@@ -249,7 +249,7 @@ void cmProcess::OnRead(ssize_t nread, const uv_buf_t* buf)
this->PipeReader.reset();
if (this->ProcessHandleClosed) {
uv_timer_stop(this->Timer);
- this->Runner.FinalizeTest();
+ this->Finish();
}
}
@@ -291,7 +291,7 @@ void cmProcess::OnTimeout()
// Our on-exit handler already ran but did not finish the test
// because we were still reading output. We've just dropped
// our read handler, so we need to finish the test now.
- this->Runner.FinalizeTest();
+ this->Finish();
}
}
@@ -321,6 +321,16 @@ void cmProcess::OnExit(int64_t exit_status, int term_signal)
// Record exit information.
this->ExitValue = exit_status;
this->Signal = term_signal;
+
+ this->ProcessHandleClosed = true;
+ if (this->ReadHandleClosed) {
+ uv_timer_stop(this->Timer);
+ this->Finish();
+ }
+}
+
+void cmProcess::Finish()
+{
this->TotalTime = std::chrono::steady_clock::now() - this->StartTime;
// Because of a processor clock scew the runtime may become slightly
// negative. If someone changed the system clock while the process was
@@ -329,12 +339,7 @@ void cmProcess::OnExit(int64_t exit_status, int term_signal)
if (this->TotalTime <= cmDuration::zero()) {
this->TotalTime = cmDuration::zero();
}
-
- this->ProcessHandleClosed = true;
- if (this->ReadHandleClosed) {
- uv_timer_stop(this->Timer);
- this->Runner.FinalizeTest();
- }
+ this->Runner.FinalizeTest();
}
cmProcess::State cmProcess::GetProcessStatus()
diff --git a/Source/CTest/cmProcess.h b/Source/CTest/cmProcess.h
index 2c24f2df0..ea72a2650 100644
--- a/Source/CTest/cmProcess.h
+++ b/Source/CTest/cmProcess.h
@@ -101,6 +101,7 @@ private:
void OnAllocate(size_t suggested_size, uv_buf_t* buf);
void StartTimer();
+ void Finish();
class Buffer : public std::vector<char>
{
diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx
index 806e663e9..afd2b6b90 100644
--- a/Source/CursesDialog/cmCursesLongMessageForm.cxx
+++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx
@@ -35,6 +35,22 @@ cmCursesLongMessageForm::~cmCursesLongMessageForm()
}
}
+void cmCursesLongMessageForm::UpdateContent(std::string const& output,
+ std::string const& title)
+{
+ this->Title = title;
+
+ if (!output.empty() && this->Messages.size() < MAX_CONTENT_SIZE) {
+ this->Messages.append("\n" + output);
+ form_driver(this->Form, REQ_NEW_LINE);
+ this->DrawMessage(output.c_str());
+ }
+
+ this->UpdateStatusBar();
+ touchwin(stdscr);
+ refresh();
+}
+
void cmCursesLongMessageForm::UpdateStatusBar()
{
int x;
@@ -109,8 +125,6 @@ void cmCursesLongMessageForm::Render(int /*left*/, int /*top*/, int /*width*/,
this->Form = nullptr;
}
- const char* msg = this->Messages.c_str();
-
if (this->Fields[0]) {
free_field(this->Fields[0]);
this->Fields[0] = nullptr;
@@ -123,9 +137,18 @@ void cmCursesLongMessageForm::Render(int /*left*/, int /*top*/, int /*width*/,
this->Form = new_form(this->Fields);
post_form(this->Form);
- int i = 0;
form_driver(this->Form, REQ_BEG_FIELD);
- while (msg[i] != '\0' && i < 60000) {
+ this->DrawMessage(this->Messages.c_str());
+
+ this->UpdateStatusBar();
+ touchwin(stdscr);
+ refresh();
+}
+
+void cmCursesLongMessageForm::DrawMessage(const char* msg) const
+{
+ int i = 0;
+ while (msg[i] != '\0' && i < MAX_CONTENT_SIZE) {
if (msg[i] == '\n' && msg[i + 1] != '\0') {
form_driver(this->Form, REQ_NEW_LINE);
} else {
@@ -138,10 +161,6 @@ void cmCursesLongMessageForm::Render(int /*left*/, int /*top*/, int /*width*/,
} else {
form_driver(this->Form, REQ_BEG_FIELD);
}
-
- this->UpdateStatusBar();
- touchwin(stdscr);
- refresh();
}
void cmCursesLongMessageForm::HandleInput()
diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h
index 88efe6217..da9fea2b1 100644
--- a/Source/CursesDialog/cmCursesLongMessageForm.h
+++ b/Source/CursesDialog/cmCursesLongMessageForm.h
@@ -27,6 +27,8 @@ public:
cmCursesLongMessageForm(cmCursesLongMessageForm const&) = delete;
cmCursesLongMessageForm& operator=(cmCursesLongMessageForm const&) = delete;
+ void UpdateContent(std::string const& output, std::string const& title);
+
// Description:
// Handle user input.
void HandleInput() override;
@@ -47,6 +49,10 @@ public:
void UpdateStatusBar() override;
protected:
+ static constexpr int MAX_CONTENT_SIZE = 60000;
+
+ void DrawMessage(const char* msg) const;
+
std::string Messages;
std::string Title;
ScrollBehavior Scrolling;
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index 2c9283515..65376d1a2 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -453,11 +453,11 @@ void cmCursesMainForm::UpdateProgress(const std::string& msg, float prog)
this->LastProgress.append(progressBarCompleted, '#');
this->LastProgress.append(progressBarWidth - progressBarCompleted, ' ');
this->LastProgress += "] " + msg + "...";
+ this->DisplayOutputs(std::string());
} else {
this->Outputs.emplace_back(msg);
+ this->DisplayOutputs(msg);
}
-
- this->DisplayOutputs();
}
int cmCursesMainForm::Configure(int noconfigure)
@@ -589,7 +589,7 @@ void cmCursesMainForm::AddError(const std::string& message,
{
this->Outputs.emplace_back(message);
this->HasNonStatusOutputs = true;
- this->DisplayOutputs();
+ this->DisplayOutputs(message);
}
void cmCursesMainForm::RemoveEntry(const char* value)
@@ -995,18 +995,22 @@ void cmCursesMainForm::ResetOutputs()
this->LastProgress.clear();
}
-void cmCursesMainForm::DisplayOutputs()
+void cmCursesMainForm::DisplayOutputs(std::string const& newOutput)
{
int xi;
int yi;
getmaxyx(stdscr, yi, xi);
- auto newLogForm = new cmCursesLongMessageForm(
- this->Outputs, this->LastProgress.c_str(),
- cmCursesLongMessageForm::ScrollBehavior::ScrollDown);
- CurrentForm = newLogForm;
- this->LogForm.reset(newLogForm);
- this->LogForm->Render(1, 1, xi, yi);
+ if (CurrentForm != this->LogForm.get()) {
+ auto newLogForm = new cmCursesLongMessageForm(
+ this->Outputs, this->LastProgress.c_str(),
+ cmCursesLongMessageForm::ScrollBehavior::ScrollDown);
+ CurrentForm = newLogForm;
+ this->LogForm.reset(newLogForm);
+ this->LogForm->Render(1, 1, xi, yi);
+ } else {
+ this->LogForm->UpdateContent(newOutput, this->LastProgress);
+ }
}
const char* cmCursesMainForm::s_ConstHelpMessage =
diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h
index b7c204d64..2e06b90a1 100644
--- a/Source/CursesDialog/cmCursesMainForm.h
+++ b/Source/CursesDialog/cmCursesMainForm.h
@@ -129,7 +129,7 @@ protected:
void ResetOutputs();
// Display the current progress and output
- void DisplayOutputs();
+ void DisplayOutputs(std::string const& newOutput);
// Copies of cache entries stored in the user interface
std::vector<cmCursesCacheEntryComposite> Entries;
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index 3b5dc042f..a9089e52f 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -486,7 +486,7 @@ void QCMake::setWarnUnusedMode(bool value)
void QCMake::checkOpenPossible()
{
- auto data = this->BinaryDirectory.toLocal8Bit().data();
+ std::string data = this->BinaryDirectory.toLocal8Bit().data();
auto possible = this->CMakeInstance->Open(data, true);
emit openPossible(possible);
}
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index f4d102ee4..331cf785f 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -1065,7 +1065,7 @@ std::string cmGlobalNinjaGenerator::OrderDependsTargetForTarget(
cmGeneratorTarget const* target, const std::string& config)
{
return "cmake_object_order_depends_target_" + target->GetName() + "_" +
- config;
+ cmSystemTools::UpperCase(config);
}
void cmGlobalNinjaGenerator::AppendTargetOutputs(
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index cf6802db7..2c923dd81 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -131,6 +131,28 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile)
this->LinkerSysroot = this->Makefile->GetSafeDefinition("CMAKE_SYSROOT");
}
+ if (std::string const* appleArchSysroots =
+ this->Makefile->GetDef("CMAKE_APPLE_ARCH_SYSROOTS")) {
+ std::string const& appleArchs =
+ this->Makefile->GetSafeDefinition("CMAKE_OSX_ARCHITECTURES");
+ std::vector<std::string> archs;
+ std::vector<std::string> sysroots;
+ cmExpandList(appleArchs, archs);
+ cmExpandList(*appleArchSysroots, sysroots, true);
+ if (archs.size() == sysroots.size()) {
+ for (size_t i = 0; i < archs.size(); ++i) {
+ this->AppleArchSysroots[archs[i]] = sysroots[i];
+ }
+ } else {
+ std::string const e =
+ cmStrCat("CMAKE_APPLE_ARCH_SYSROOTS:\n ", *appleArchSysroots,
+ "\n"
+ "is not the same length as CMAKE_OSX_ARCHITECTURES:\n ",
+ appleArchs);
+ this->IssueMessage(MessageType::FATAL_ERROR, e);
+ }
+ }
+
for (std::string const& lang : enabledLanguages) {
if (lang == "NONE") {
continue;
@@ -1792,20 +1814,15 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
std::string("CMAKE_") + lang + "_SYSROOT_FLAG";
const char* sysrootFlag = this->Makefile->GetDefinition(sysrootFlagVar);
if (sysrootFlag && *sysrootFlag) {
- std::vector<std::string> arch_sysroots;
- if (const char* arch_sysroots_str =
- this->Makefile->GetDefinition("CMAKE_APPLE_ARCH_SYSROOTS")) {
- cmExpandList(std::string(arch_sysroots_str), arch_sysroots, true);
- }
- if (!arch_sysroots.empty()) {
- assert(arch_sysroots.size() == archs.size());
- for (size_t i = 0; i < archs.size(); ++i) {
- if (arch_sysroots[i].empty()) {
+ if (!this->AppleArchSysroots.empty()) {
+ for (std::string const& arch : archs) {
+ std::string const& archSysroot = this->AppleArchSysroots[arch];
+ if (cmIsOff(archSysroot)) {
continue;
}
- flags += " -Xarch_" + archs[i] + " ";
+ flags += " -Xarch_" + arch + " ";
// Combine sysroot flag and path to work with -Xarch
- std::string arch_sysroot = sysrootFlag + arch_sysroots[i];
+ std::string arch_sysroot = sysrootFlag + archSysroot;
flags += this->ConvertToOutputFormat(arch_sysroot, SHELL);
}
} else if (sysroot && *sysroot) {
@@ -2429,11 +2446,9 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
}
for (std::string const& config : configsList) {
- const std::string buildType = cmSystemTools::UpperCase(config);
-
// FIXME: Refactor collection of sources to not evaluate object libraries.
std::vector<cmSourceFile*> sources;
- target->GetSourceFiles(sources, buildType);
+ target->GetSourceFiles(sources, config);
for (const std::string& lang : { "C", "CXX", "OBJC", "OBJCXX" }) {
auto langSources = std::count_if(
@@ -2602,15 +2617,13 @@ void cmLocalGenerator::AddUnityBuild(cmGeneratorTarget* target)
config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
}
- const std::string buildType = cmSystemTools::UpperCase(config);
-
std::string filename_base =
cmStrCat(this->GetCurrentBinaryDirectory(), "/CMakeFiles/",
target->GetName(), ".dir/Unity/");
// FIXME: Refactor collection of sources to not evaluate object libraries.
std::vector<cmSourceFile*> sources;
- target->GetSourceFiles(sources, buildType);
+ target->GetSourceFiles(sources, config);
auto batchSizeString = target->GetProperty("UNITY_BUILD_BATCH_SIZE");
const size_t unityBatchSize =
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 88194b7a2..5377be956 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -513,6 +513,7 @@ protected:
std::map<std::string, std::string> VariableMappings;
std::string CompilerSysroot;
std::string LinkerSysroot;
+ std::unordered_map<std::string, std::string> AppleArchSysroots;
bool EmitUniversalBinaryFlags;
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 63c6680b1..24a635183 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -728,6 +728,10 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsTop(
;
/* clang-format on */
} else {
+ makefileStream << "# Command-line flag to silence nested $(MAKE).\n"
+ "$(VERBOSE)MAKESILENT = -s\n"
+ "\n";
+
// Write special target to silence make output. This must be after
// the default target in case VERBOSE is set (which changes the
// name). The setting of CMAKE_VERBOSE_MAKEFILE to ON will cause a
@@ -1925,7 +1929,7 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall(
{
// Call make on the given file.
std::string cmd = cmStrCat(
- "$(MAKE) -f ",
+ "$(MAKE) $(MAKESILENT) -f ",
this->ConvertToOutputFormat(makefile, cmOutputConverter::SHELL), ' ');
cmGlobalUnixMakefileGenerator3* gg =
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 7eeb97f25..2b8ea24fb 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -1697,6 +1697,11 @@ int cmcmd::RunPreprocessor(const std::vector<std::string>& command,
}
auto status = process.GetStatus();
if (!status[0] || status[0]->ExitStatus != 0) {
+ auto errorStream = process.ErrorStream();
+ if (errorStream) {
+ std::cerr << errorStream->rdbuf();
+ }
+
return 1;
}
@@ -1708,23 +1713,33 @@ int cmcmd::RunLLVMRC(std::vector<std::string> const& args)
// The arguments are
// args[0] == <cmake-executable>
// args[1] == cmake_llvm_rc
- // args[2] == intermediate_file
- // args[3..n] == preprocess+args
+ // args[2] == source_file_path
+ // args[3] == intermediate_file
+ // args[4..n] == preprocess+args
// args[n+1] == --
// args[n+2...] == llvm-rc+args
if (args.size() < 3) {
std::cerr << "Invalid cmake_llvm_rc arguments";
return 1;
}
- const std::string& intermediate_file = args[2];
+ const std::string& intermediate_file = args[3];
+ const std::string& source_file = args[2];
std::vector<std::string> preprocess;
std::vector<std::string> resource_compile;
std::vector<std::string>* pArgTgt = &preprocess;
- for (std::string const& arg : cmMakeRange(args).advance(3)) {
+ for (std::string const& arg : cmMakeRange(args).advance(4)) {
if (arg == "--") {
pArgTgt = &resource_compile;
} else {
- pArgTgt->push_back(arg);
+ if (arg.find("SOURCE_DIR") != std::string::npos) {
+ std::string sourceDirArg = arg;
+ cmSystemTools::ReplaceString(
+ sourceDirArg, "SOURCE_DIR",
+ cmSystemTools::GetFilenamePath(source_file));
+ pArgTgt->push_back(sourceDirArg);
+ } else {
+ pArgTgt->push_back(arg);
+ }
}
}
if (preprocess.empty()) {
@@ -1765,6 +1780,10 @@ int cmcmd::RunLLVMRC(std::vector<std::string> const& args)
}
auto status = process.GetStatus();
if (!status[0] || status[0]->ExitStatus != 0) {
+ auto errorStream = process.ErrorStream();
+ if (errorStream) {
+ std::cerr << errorStream->rdbuf();
+ }
return 1;
}
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index 450e7e5e0..c8850eaf2 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -100,6 +100,15 @@ ExternalProject_Add(${proj}
INSTALL_COMMAND ""
)
+set(proj NoExtractBool)
+ExternalProject_Add(${proj}
+ URL ${CMAKE_CURRENT_SOURCE_DIR}/gitrepo.tgz
+ DOWNLOAD_NO_EXTRACT 0
+ LOG_DOWNLOAD 1
+ BUILD_COMMAND ""
+ CONFIGURE_COMMAND ""
+ INSTALL_COMMAND ""
+)
# CVS-based tests:
#
diff --git a/Tests/RunCMake/CTestTimeout/Basic-stdout.txt b/Tests/RunCMake/CTestTimeout/Basic-stdout.txt
index 30ed1782f..db59dbf0a 100644
--- a/Tests/RunCMake/CTestTimeout/Basic-stdout.txt
+++ b/Tests/RunCMake/CTestTimeout/Basic-stdout.txt
@@ -1,6 +1,6 @@
Test project [^
]*/Tests/RunCMake/CTestTimeout/Basic-build
Start 1: TestTimeout
-1/1 Test #1: TestTimeout ......................\*\*\*Timeout +[0-9.]+ sec
+1/1 Test #1: TestTimeout ......................\*\*\*Timeout +[1-9][0-9.]* sec
+
0% tests passed, 1 tests failed out of 1
diff --git a/Tests/RunCMake/CTestTimeout/Fork-stdout.txt b/Tests/RunCMake/CTestTimeout/Fork-stdout.txt
index 284e4b108..2938d8ee3 100644
--- a/Tests/RunCMake/CTestTimeout/Fork-stdout.txt
+++ b/Tests/RunCMake/CTestTimeout/Fork-stdout.txt
@@ -1,6 +1,6 @@
Test project [^
]*/Tests/RunCMake/CTestTimeout/Fork-build
Start 1: TestTimeout
-1/1 Test #1: TestTimeout ......................\*\*\*Timeout +[0-9.]+ sec
+1/1 Test #1: TestTimeout ......................\*\*\*Timeout +[1-9][0-9.]* sec
+
0% tests passed, 1 tests failed out of 1
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 087ef21f0..893072134 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -673,27 +673,26 @@ function(run_llvm_rc)
set(RunCMake_TEST_NO_CLEAN 1)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
run_cmake_command(llvm_rc_no_args ${CMAKE_COMMAND} -E cmake_llvm_rc)
- run_cmake_command(llvm_rc_no_-- ${CMAKE_COMMAND} -E cmake_llvm_rc test.tmp ${CMAKE_COMMAND} -E echo "This is a test")
- run_cmake_command(llvm_rc_empty_preprocessor ${CMAKE_COMMAND} -E cmake_llvm_rc test.tmp -- ${CMAKE_COMMAND} -E echo "This is a test")
- run_cmake_command(llvm_rc_failing_first_command ${CMAKE_COMMAND} -E cmake_llvm_rc test.tmp ${CMAKE_COMMAND} -E false -- ${CMAKE_COMMAND} -E echo "This is a test")
- run_cmake_command(llvm_rc_failing_second_command ${CMAKE_COMMAND} -E cmake_llvm_rc test.tmp ${CMAKE_COMMAND} -E echo "This is a test" -- ${CMAKE_COMMAND} -E false )
+ run_cmake_command(llvm_rc_no_-- ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test")
+ run_cmake_command(llvm_rc_empty_preprocessor ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp -- ${CMAKE_COMMAND} -E echo "This is a test")
+ run_cmake_command(llvm_rc_failing_first_command ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -P FailedProgram.cmake -- ${CMAKE_COMMAND} -E echo "This is a test")
+ run_cmake_command(llvm_rc_failing_second_command ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test" -- ${CMAKE_COMMAND} -P FailedProgram.cmake )
if(EXISTS ${RunCMake_TEST_BINARY_DIR}/test.tmp)
message(SEND_ERROR "${test} - FAILED:\n"
"test.tmp was not deleted")
endif()
- run_cmake_command(llvm_rc_full_run ${CMAKE_COMMAND} -E cmake_llvm_rc test.tmp ${CMAKE_COMMAND} -E echo "This is a test" -- ${CMAKE_COMMAND} -E copy test.tmp llvmrc.result )
- if(EXISTS ${RunCMake_TEST_BINARY_DIR}/test.tmp)
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir")
+ run_cmake_command(llvm_rc_full_run ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test" -- ${CMAKE_COMMAND} -E copy test.tmp SOURCE_DIR/llvmrc.result )
+ if(EXISTS ${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir/test.tmp)
message(SEND_ERROR "${test} - FAILED:\n"
"test.tmp was not deleted")
endif()
- file(READ ${RunCMake_TEST_BINARY_DIR}/llvmrc.result LLVMRC_RESULT)
+ file(READ ${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir/llvmrc.result LLVMRC_RESULT)
if(NOT "${LLVMRC_RESULT}" STREQUAL "This is a test\n")
message(SEND_ERROR "${test} - FAILED:\n"
"llvmrc.result was not created")
endif()
- # file(REMOVE ${RunCMake_TEST_BINARY_DIR}/llvmrc.result)
unset(LLVMRC_RESULT)
endfunction()
run_llvm_rc()
diff --git a/Tests/RunCMake/CommandLine/llvm_rc_failing_first_command-stderr.txt b/Tests/RunCMake/CommandLine/llvm_rc_failing_first_command-stderr.txt
new file mode 100644
index 000000000..765b70881
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/llvm_rc_failing_first_command-stderr.txt
@@ -0,0 +1 @@
+CMake Error
diff --git a/Tests/RunCMake/CommandLine/llvm_rc_failing_second_command-stderr.txt b/Tests/RunCMake/CommandLine/llvm_rc_failing_second_command-stderr.txt
new file mode 100644
index 000000000..765b70881
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/llvm_rc_failing_second_command-stderr.txt
@@ -0,0 +1 @@
+CMake Error
diff --git a/Tests/RunCMake/target_link_libraries/ConfigCase-result.txt b/Tests/RunCMake/target_link_libraries/ConfigCase-result.txt
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/ConfigCase-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/target_link_libraries/ConfigCase-stderr.txt b/Tests/RunCMake/target_link_libraries/ConfigCase-stderr.txt
new file mode 100644
index 000000000..953c9729e
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/ConfigCase-stderr.txt
@@ -0,0 +1,13 @@
+^CMake Error at ConfigCase.cmake:[0-9]+ \(add_library\):
+ Target "impl" links to target "config::impl-Debug" but the target was not
+ found. Perhaps a find_package\(\) call is missing for an IMPORTED target, or
+ an ALIAS target is missing\?
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
++
+CMake Error at ConfigCase.cmake:[0-9]+ \(add_library\):
+ Target "impl" links to target "config::iface-Debug" but the target was not
+ found. Perhaps a find_package\(\) call is missing for an IMPORTED target, or
+ an ALIAS target is missing\?
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/target_link_libraries/ConfigCase.cmake b/Tests/RunCMake/target_link_libraries/ConfigCase.cmake
new file mode 100644
index 000000000..fc394781b
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/ConfigCase.cmake
@@ -0,0 +1,6 @@
+cmake_policy(VERSION 3.15)
+enable_language(C)
+add_library(iface INTERFACE)
+target_link_libraries(iface INTERFACE "config::iface-$<CONFIG>")
+add_library(impl empty.c)
+target_link_libraries(impl PRIVATE "config::impl-$<CONFIG>" iface)
diff --git a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
index 0152d4c67..8eed98619 100644
--- a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
@@ -1,5 +1,13 @@
include(RunCMake)
+if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS -DCMAKE_CONFIGURATION_TYPES=Debug)
+else()
+ set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
+endif()
+run_cmake(ConfigCase)
+unset(RunCMake_TEST_OPTIONS)
+
run_cmake(CMP0023-WARN)
run_cmake(CMP0023-NEW)
run_cmake(CMP0023-WARN-2)
diff --git a/Utilities/Release/linux/x86_64/Dockerfile b/Utilities/Release/linux/x86_64/Dockerfile
index 1ba753c76..41391d2d0 100644
--- a/Utilities/Release/linux/x86_64/Dockerfile
+++ b/Utilities/Release/linux/x86_64/Dockerfile
@@ -5,8 +5,8 @@
# Build using the CMake source directory as the build context.
# The resulting image will have an '/out' directory containing the package.
-ARG FROM_IMAGE_NAME=kitware/cmake:build-linux-x86_64-deps-2019-08-09
-ARG FROM_IMAGE_DIGEST=@sha256:630c320b26a67fc584e0bc98314f1fb0cb0abc764348bb2613ef07437f7101f9
+ARG FROM_IMAGE_NAME=kitware/cmake:build-linux-x86_64-deps-2020-04-02
+ARG FROM_IMAGE_DIGEST=@sha256:77e9ab183f34680990db9da5945473e288f0d6556bce79ecc1589670d656e157
ARG FROM_IMAGE=$FROM_IMAGE_NAME$FROM_IMAGE_DIGEST
FROM $FROM_IMAGE
diff --git a/Utilities/Release/linux/x86_64/deps/Dockerfile b/Utilities/Release/linux/x86_64/deps/Dockerfile
index db5551c61..7864aaca0 100644
--- a/Utilities/Release/linux/x86_64/deps/Dockerfile
+++ b/Utilities/Release/linux/x86_64/deps/Dockerfile
@@ -129,10 +129,10 @@ COPY openssl-source.patch /opt/openssl/src/
RUN : \
&& mkdir -p /opt/openssl/src \
&& cd /opt/openssl/src \
- && curl -O https://www.openssl.org/source/openssl-1.1.1c.tar.gz \
- && sha512sum openssl-1.1.1c.tar.gz | grep -q 8e2c5cc11c120efbb7d7850980cb6eaa782d29b4996b3f3378d37613c1679f852d7cc08a90d62e78fcec3439f06bdbee70064579a8c2adaffd91532a97f646ff \
- && tar xzf openssl-1.1.1c.tar.gz \
- && cd openssl-1.1.1c \
+ && curl -O https://www.openssl.org/source/openssl-1.1.1f.tar.gz \
+ && sha512sum openssl-1.1.1f.tar.gz | grep -q b00bd9b5ad5298fbceeec6bb19c1ab0c106ca5cfb31178497c58bf7e0e0cf30fcc19c20f84e23af31cc126bf2447d3e4f8461db97bafa7bd78f69561932f000c \
+ && tar xzf openssl-1.1.1f.tar.gz \
+ && cd openssl-1.1.1f \
&& patch -p1 -i ../openssl-source.patch \
&& source /opt/rh/devtoolset-6/enable \
&& ./Configure --prefix=/opt/openssl linux-elf no-asm no-shared -D_POSIX_C_SOURCE=199506L -D_POSIX_SOURCE=1 -D_SVID_SOURCE=1 -D_BSD_SOURCE=1 \