Imported Upstream version 3.17.1 upstream/3.17.1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Oct 2021 00:20:00 +0000 (09:20 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Oct 2021 00:20:00 +0000 (09:20 +0900)
55 files changed:
CMakeLists.txt
Help/cpack_gen/nsis.rst
Help/generator/Ninja Multi-Config.rst
Help/manual/cmake.1.rst
Help/prop_tgt/MACHO_COMPATIBILITY_VERSION.rst
Help/prop_tgt/MACHO_CURRENT_VERSION.rst
Help/prop_tgt/SOVERSION.rst
Help/prop_tgt/VERSION.rst
Help/prop_tgt/XCODE_GENERATE_SCHEME.rst
Help/prop_tgt/XCODE_SCHEME_WORKING_DIRECTORY.rst
Help/release/3.15.rst
Help/release/3.17.rst
Help/variable/CMAKE_CROSS_CONFIGS.rst
Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst
Help/variable/CMAKE_DEFAULT_CONFIGS.rst
Help/variable/CMAKE_FIND_DEBUG_MODE.rst
Help/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH.rst
Help/variable/CMAKE_XCODE_SCHEME_WORKING_DIRECTORY.rst
Modules/CMakeDetermineCompilerId.cmake
Modules/CMakeRCInformation.cmake
Modules/CheckIPOSupported.cmake
Modules/Compiler/XL-CXX.cmake
Modules/ExternalProject.cmake
Modules/FindPython.cmake
Modules/FindPython/Support.cmake
Modules/FindPython2.cmake
Modules/FindPython3.cmake
Modules/Platform/Darwin-Initialize.cmake
Modules/Platform/Windows-Clang.cmake
Source/CMakeVersion.cmake
Source/CPack/cmCPackNSISGenerator.cxx
Source/CTest/cmProcess.cxx
Source/CTest/cmProcess.h
Source/CursesDialog/cmCursesLongMessageForm.cxx
Source/CursesDialog/cmCursesLongMessageForm.h
Source/CursesDialog/cmCursesMainForm.cxx
Source/CursesDialog/cmCursesMainForm.h
Source/QtDialog/QCMake.cxx
Source/cmGlobalNinjaGenerator.cxx
Source/cmLocalGenerator.cxx
Source/cmLocalGenerator.h
Source/cmLocalUnixMakefileGenerator3.cxx
Source/cmcmd.cxx
Tests/ExternalProject/CMakeLists.txt
Tests/RunCMake/CTestTimeout/Basic-stdout.txt
Tests/RunCMake/CTestTimeout/Fork-stdout.txt
Tests/RunCMake/CommandLine/RunCMakeTest.cmake
Tests/RunCMake/CommandLine/llvm_rc_failing_first_command-stderr.txt [new file with mode: 0644]
Tests/RunCMake/CommandLine/llvm_rc_failing_second_command-stderr.txt [new file with mode: 0644]
Tests/RunCMake/target_link_libraries/ConfigCase-result.txt [new file with mode: 0644]
Tests/RunCMake/target_link_libraries/ConfigCase-stderr.txt [new file with mode: 0644]
Tests/RunCMake/target_link_libraries/ConfigCase.cmake [new file with mode: 0644]
Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
Utilities/Release/linux/x86_64/Dockerfile
Utilities/Release/linux/x86_64/deps/Dockerfile

index 18b8d7d..fb7b9b7 100644 (file)
@@ -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 "*.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
     )
 
     REGEX "Help/(dev|guide)($|/)" EXCLUDE
     )
 
index a310e9f..d1e495f 100644 (file)
@@ -1,7 +1,9 @@
 CPack NSIS Generator
 --------------------
 
 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
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Variables specific to CPack NSIS generator
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
index 1f68535..f480eb8 100644 (file)
@@ -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`
 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.
 
 :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`
 
 :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``
 
 :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:
 
 
 Consider the following example:
 
index 28a081f..d343874 100644 (file)
@@ -242,10 +242,12 @@ Options
  :command:`message(SEND_ERROR)` calls.
 
 ``--debug-find``
  :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.
 
  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.
 
 ``--trace``
  Put cmake in trace mode.
index f3fedba..26d5cc8 100644 (file)
@@ -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)
 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).
index 4a1d3f0..9afb356 100644 (file)
@@ -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)
 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).
index d6f8a94..b377f22 100644 (file)
@@ -21,9 +21,17 @@ Mach-O Versions
 ^^^^^^^^^^^^^^^
 
 For shared libraries and executables on Mach-O systems (e.g. macOS, iOS),
 ^^^^^^^^^^^^^^^
 
 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.
index f592f4a..95db483 100644 (file)
@@ -23,9 +23,17 @@ Mach-O Versions
 ^^^^^^^^^^^^^^^
 
 For shared libraries and executables on Mach-O systems (e.g. macOS, iOS),
 ^^^^^^^^^^^^^^^
 
 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.
index 0e182cf..c32b4de 100644 (file)
@@ -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_DEBUG_DOCUMENT_VERSIONING`
 - :prop_tgt:`XCODE_SCHEME_ENVIRONMENT`
 - :prop_tgt:`XCODE_SCHEME_EXECUTABLE`
+- :prop_tgt:`XCODE_SCHEME_WORKING_DIRECTORY`
index 7ffa74b..f538f1d 100644 (file)
@@ -1,8 +1,8 @@
 XCODE_SCHEME_WORKING_DIRECTORY
 ------------------------------
 
 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
 generator expressions those are evaluated.
 
 This property is initialized by the value of the variable
index 957e6e9..e68e7d3 100644 (file)
@@ -332,6 +332,15 @@ Deprecated and Removed Features
 Other Changes
 =============
 
 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.
 
 * 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.
 
index c2cfdf0..7c5b44d 100644 (file)
@@ -282,6 +282,8 @@ Deprecated and Removed Features
   option and cannot be fixed without breaking compatibility, and so have
   been superseded.
 
   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
 =============
 
 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.
 
 * 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.
index c850af2..94157f3 100644 (file)
@@ -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
 
 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`.
index 62ee0d2..aa4f82d 100644 (file)
@@ -2,5 +2,11 @@ CMAKE_DEFAULT_BUILD_TYPE
 ------------------------
 
 Specifies the configuration to use by default in a ``build.ninja`` file in the
 ------------------------
 
 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`.
index 86d8a5a..84c642a 100644 (file)
@@ -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
 
 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.
index 33ffdd6..f5fd8ce 100644 (file)
@@ -3,6 +3,7 @@ CMAKE_FIND_DEBUG_MODE
 
 Print extra find call information for the following commands to standard
 error:
 
 Print extra find call information for the following commands to standard
 error:
+
 * :command:`find_program`
 * :command:`find_library`
 * :command:`find_file`
 * :command:`find_program`
 * :command:`find_library`
 * :command:`find_file`
index a99c108..34524d1 100644 (file)
@@ -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.
 
 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.
 :prop_tgt:`INSTALL_RPATH_USE_LINK_PATH` for all targets.
index cc690f7..5bb7907 100644 (file)
@@ -1,8 +1,8 @@
 CMAKE_XCODE_SCHEME_WORKING_DIRECTORY
 ------------------------------------
 
 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`
 
 This variable initializes the
 :prop_tgt:`XCODE_SCHEME_WORKING_DIRECTORY`
index d125791..d3ed45b 100644 (file)
@@ -128,7 +128,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
     set(CMAKE_EXECUTABLE_FORMAT "Unknown" CACHE INTERNAL "Executable file format")
   endif()
 
     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()
     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 "")
     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")
       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()
     elseif(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*")
       set(id_cl clang.exe)
     else()
index 7c3a5ab..b634796 100644 (file)
@@ -39,7 +39,7 @@ set(CMAKE_RC_FLAG_REGEX "^[-/](D|I)")
 
 # now define the following rule variables
 # CMAKE_RC_COMPILE_OBJECT
 
 # 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
 # compile a Resource file into an object file
 if(NOT CMAKE_RC_COMPILE_OBJECT)
   set(CMAKE_RC_COMPILE_OBJECT
index 0d6ad20..90a9f61 100644 (file)
@@ -113,7 +113,7 @@ macro(_ipo_run_language_check language)
   endforeach()
 
   try_compile(
   endforeach()
 
   try_compile(
-      result
+      _IPO_LANGUAGE_CHECK_RESULT
       "${bindir}"
       "${srcdir}"
       "${TRY_COMPILE_PROJECT_NAME}"
       "${bindir}"
       "${srcdir}"
       "${TRY_COMPILE_PROJECT_NAME}"
@@ -122,8 +122,10 @@ macro(_ipo_run_language_check language)
       "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON"
       OUTPUT_VARIABLE output
   )
       "-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")
     file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
       "${language} compiler IPO check failed with the following output:\n"
       "${output}\n")
index 3037851..41e3e11 100644 (file)
@@ -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)
   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)
   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)
     set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-qlanglvl=extended1y")
     set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-qlanglvl=extended1y")
     set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
index 5bac0d8..a9448e5 100644 (file)
@@ -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()
       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")
       if("${url}" MATCHES "^[a-z]+://")
         # TODO: Should download and extraction be different steps?
         if("x${fname}" STREQUAL "x")
index 9dfa222..32ef120 100644 (file)
@@ -191,8 +191,7 @@ Hints
 
 ``Python_FIND_STRATEGY``
   This variable defines how lookup will be done.
 
 ``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.
 
   * ``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.
 ``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.
 
   * ``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.
 ``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::
 
 
   .. 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``
   ``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.
 
   * ``FIRST``: The virtual environment is used before any other standard
     paths to look-up for the interpreter. This is the default.
index ce06458..6bd10b3 100644 (file)
@@ -941,15 +941,15 @@ endif()
 
 # Compute search signature
 # This signature will be used to check validity of cached variables on new search
 
 # 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)
 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)
 endif()
 if (CMAKE_HOST_WIN32)
-  string (APPEND _${_PYTHON_PREFIX}_SIGNATURE ":${${_PYTHON_PREFIX}_FIND_REGISTRY}")
+  string (APPEND _${_PYTHON_PREFIX}_SIGNATURE ":${_${_PYTHON_PREFIX}_FIND_REGISTRY}")
 endif()
 
 
 endif()
 
 
@@ -1036,7 +1036,7 @@ if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS)
           if (_${_PYTHON_PREFIX}_EXECUTABLE)
             break()
           endif()
           if (_${_PYTHON_PREFIX}_EXECUTABLE)
             break()
           endif()
-          if (NOT _${_PYTHON_PREFIX}_FIND_VIRTUALENV STREQUAL "ONLY")
+          if (_${_PYTHON_PREFIX}_FIND_VIRTUALENV STREQUAL "ONLY")
             break()
           endif()
         endif()
             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 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})
 
       list (GET _${_PYTHON_PREFIX}_INTERPRETER_PROPERTIES 4 _${_PYTHON_PREFIX}_ARCH)
       set (_${_PYTHON_PREFIX}_ARCH2 ${_${_PYTHON_PREFIX}_ARCH})
index af8ad39..3d0e6b9 100644 (file)
@@ -140,8 +140,7 @@ Hints
 
 ``Python2_FIND_STRATEGY``
   This variable defines how lookup will be done.
 
 ``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.
 
   * ``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.
 ``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.
 
   * ``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.
 ``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::
 
 
   .. 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``
   ``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.
 
   * ``FIRST``: The virtual environment is used before any other standard
     paths to look-up for the interpreter. This is the default.
index 66f4f75..c9a5d09 100644 (file)
@@ -188,8 +188,7 @@ Hints
 
 ``Python3_FIND_STRATEGY``
   This variable defines how lookup will be done.
 
 ``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.
 
   * ``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.
 ``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.
 
   * ``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.
 ``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::
 
 
   .. 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``
   ``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.
 
   * ``FIRST``: The virtual environment is used before any other standard
     paths to look-up for the interpreter. This is the default.
index 729217c..80e668e 100644 (file)
@@ -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)
 # 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()
 
     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 ${_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()
 
     endif()
   endforeach()
 
index 87ddfcd..a048698 100644 (file)
@@ -134,14 +134,15 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
     include(Platform/Windows-MSVC)
 
     # Feed the preprocessed rc file to llvm-rc
     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)
         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_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)
         if(CMAKE_GENERATOR STREQUAL "Ninja")
           set(CMAKE_NINJA_CMCLDEPS_RC 0)
           set(CMAKE_NINJA_DEP_TYPE_RC gcc)
index f85751b..bf7aa87 100644 (file)
@@ -1,7 +1,7 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 17)
 # 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)
 
 #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.
 
 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]* "
 
   # 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]* "
index 363f536..2a46627 100644 (file)
@@ -453,12 +453,12 @@ int cmCPackNSISGenerator::InitializeInternal()
   }
   if (versionRex.find(output)) {
     double nsisVersion = atof(versionRex.match(1).c_str());
   }
   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,
     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;
                     "NSIS found on the system was: "
                       << nsisVersion << std::endl);
       return 0;
index cdf899c..6097aa5 100644 (file)
@@ -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->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.
     // 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;
   // 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
   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();
   }
   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()
 }
 
 cmProcess::State cmProcess::GetProcessStatus()
index 2c24f2d..ea72a26 100644 (file)
@@ -101,6 +101,7 @@ private:
   void OnAllocate(size_t suggested_size, uv_buf_t* buf);
 
   void StartTimer();
   void OnAllocate(size_t suggested_size, uv_buf_t* buf);
 
   void StartTimer();
+  void Finish();
 
   class Buffer : public std::vector<char>
   {
 
   class Buffer : public std::vector<char>
   {
index 806e663..afd2b6b 100644 (file)
@@ -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;
 void cmCursesLongMessageForm::UpdateStatusBar()
 {
   int x;
@@ -109,8 +125,6 @@ void cmCursesLongMessageForm::Render(int /*left*/, int /*top*/, int /*width*/,
     this->Form = nullptr;
   }
 
     this->Form = nullptr;
   }
 
-  const char* msg = this->Messages.c_str();
-
   if (this->Fields[0]) {
     free_field(this->Fields[0]);
     this->Fields[0] = nullptr;
   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);
 
   this->Form = new_form(this->Fields);
   post_form(this->Form);
 
-  int i = 0;
   form_driver(this->Form, REQ_BEG_FIELD);
   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 {
     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);
   }
   } else {
     form_driver(this->Form, REQ_BEG_FIELD);
   }
-
-  this->UpdateStatusBar();
-  touchwin(stdscr);
-  refresh();
 }
 
 void cmCursesLongMessageForm::HandleInput()
 }
 
 void cmCursesLongMessageForm::HandleInput()
index 88efe62..da9fea2 100644 (file)
@@ -27,6 +27,8 @@ public:
   cmCursesLongMessageForm(cmCursesLongMessageForm const&) = delete;
   cmCursesLongMessageForm& operator=(cmCursesLongMessageForm const&) = delete;
 
   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;
   // Description:
   // Handle user input.
   void HandleInput() override;
@@ -47,6 +49,10 @@ public:
   void UpdateStatusBar() override;
 
 protected:
   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;
   std::string Messages;
   std::string Title;
   ScrollBehavior Scrolling;
index 2c92835..65376d1 100644 (file)
@@ -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->LastProgress.append(progressBarCompleted, '#');
     this->LastProgress.append(progressBarWidth - progressBarCompleted, ' ');
     this->LastProgress += "] " + msg + "...";
+    this->DisplayOutputs(std::string());
   } else {
     this->Outputs.emplace_back(msg);
   } else {
     this->Outputs.emplace_back(msg);
+    this->DisplayOutputs(msg);
   }
   }
-
-  this->DisplayOutputs();
 }
 
 int cmCursesMainForm::Configure(int noconfigure)
 }
 
 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->Outputs.emplace_back(message);
   this->HasNonStatusOutputs = true;
-  this->DisplayOutputs();
+  this->DisplayOutputs(message);
 }
 
 void cmCursesMainForm::RemoveEntry(const char* value)
 }
 
 void cmCursesMainForm::RemoveEntry(const char* value)
@@ -995,18 +995,22 @@ void cmCursesMainForm::ResetOutputs()
   this->LastProgress.clear();
 }
 
   this->LastProgress.clear();
 }
 
-void cmCursesMainForm::DisplayOutputs()
+void cmCursesMainForm::DisplayOutputs(std::string const& newOutput)
 {
   int xi;
   int yi;
   getmaxyx(stdscr, yi, xi);
 
 {
   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 =
 }
 
 const char* cmCursesMainForm::s_ConstHelpMessage =
index b7c204d..2e06b90 100644 (file)
@@ -129,7 +129,7 @@ protected:
   void ResetOutputs();
 
   // Display the current progress and output
   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;
 
   // Copies of cache entries stored in the user interface
   std::vector<cmCursesCacheEntryComposite> Entries;
index 3b5dc04..a9089e5 100644 (file)
@@ -486,7 +486,7 @@ void QCMake::setWarnUnusedMode(bool value)
 
 void QCMake::checkOpenPossible()
 {
 
 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);
 }
   auto possible = this->CMakeInstance->Open(data, true);
   emit openPossible(possible);
 }
index f4d102e..331cf78 100644 (file)
@@ -1065,7 +1065,7 @@ std::string cmGlobalNinjaGenerator::OrderDependsTargetForTarget(
   cmGeneratorTarget const* target, const std::string& config)
 {
   return "cmake_object_order_depends_target_" + target->GetName() + "_" +
   cmGeneratorTarget const* target, const std::string& config)
 {
   return "cmake_object_order_depends_target_" + target->GetName() + "_" +
-    config;
+    cmSystemTools::UpperCase(config);
 }
 
 void cmGlobalNinjaGenerator::AppendTargetOutputs(
 }
 
 void cmGlobalNinjaGenerator::AppendTargetOutputs(
index cf6802d..2c923dd 100644 (file)
@@ -131,6 +131,28 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile)
     this->LinkerSysroot = this->Makefile->GetSafeDefinition("CMAKE_SYSROOT");
   }
 
     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;
   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::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;
           }
             continue;
           }
-          flags += " -Xarch_" + archs[i] + " ";
+          flags += " -Xarch_" + arch + " ";
           // Combine sysroot flag and path to work with -Xarch
           // 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) {
           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) {
   }
 
   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;
     // 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(
 
     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");
   }
 
     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;
   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 =
 
   auto batchSizeString = target->GetProperty("UNITY_BUILD_BATCH_SIZE");
   const size_t unityBatchSize =
index 88194b7..5377be9 100644 (file)
@@ -513,6 +513,7 @@ protected:
   std::map<std::string, std::string> VariableMappings;
   std::string CompilerSysroot;
   std::string LinkerSysroot;
   std::map<std::string, std::string> VariableMappings;
   std::string CompilerSysroot;
   std::string LinkerSysroot;
+  std::unordered_map<std::string, std::string> AppleArchSysroots;
 
   bool EmitUniversalBinaryFlags;
 
 
   bool EmitUniversalBinaryFlags;
 
index 63c6680..24a6351 100644 (file)
@@ -728,6 +728,10 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsTop(
       ;
     /* clang-format on */
   } else {
       ;
     /* 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
     // 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(
 {
   // Call make on the given file.
   std::string cmd = cmStrCat(
-    "$(MAKE) -f ",
+    "$(MAKE) $(MAKESILENT) -f ",
     this->ConvertToOutputFormat(makefile, cmOutputConverter::SHELL), ' ');
 
   cmGlobalUnixMakefileGenerator3* gg =
     this->ConvertToOutputFormat(makefile, cmOutputConverter::SHELL), ' ');
 
   cmGlobalUnixMakefileGenerator3* gg =
index 7eeb97f..2b8ea24 100644 (file)
@@ -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 status = process.GetStatus();
   if (!status[0] || status[0]->ExitStatus != 0) {
+    auto errorStream = process.ErrorStream();
+    if (errorStream) {
+      std::cerr << errorStream->rdbuf();
+    }
+
     return 1;
   }
 
     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
   // 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;
   }
   //   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;
   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 {
     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()) {
     }
   }
   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 status = process.GetStatus();
   if (!status[0] || status[0]->ExitStatus != 0) {
+    auto errorStream = process.ErrorStream();
+    if (errorStream) {
+      std::cerr << errorStream->rdbuf();
+    }
     return 1;
   }
 
     return 1;
   }
 
index 450e7e5..c8850ea 100644 (file)
@@ -100,6 +100,15 @@ ExternalProject_Add(${proj}
   INSTALL_COMMAND ""
 )
 
   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:
 #
 
 # CVS-based tests:
 #
index 30ed178..db59dbf 100644 (file)
@@ -1,6 +1,6 @@
 Test project [^
 ]*/Tests/RunCMake/CTestTimeout/Basic-build
     Start 1: TestTimeout
 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
 +
 0% tests passed, 1 tests failed out of 1
index 284e4b1..2938d8e 100644 (file)
@@ -1,6 +1,6 @@
 Test project [^
 ]*/Tests/RunCMake/CTestTimeout/Fork-build
     Start 1: TestTimeout
 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
 +
 0% tests passed, 1 tests failed out of 1
index 087ef21..8930721 100644 (file)
@@ -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}")
   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_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()
   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()
       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()
   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()
   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 (file)
index 0000000..765b708
--- /dev/null
@@ -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 (file)
index 0000000..765b708
--- /dev/null
@@ -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 (file)
index 0000000..d00491f
--- /dev/null
@@ -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 (file)
index 0000000..953c972
--- /dev/null
@@ -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 (file)
index 0000000..fc39478
--- /dev/null
@@ -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)
index 0152d4c..8eed986 100644 (file)
@@ -1,5 +1,13 @@
 include(RunCMake)
 
 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)
 run_cmake(CMP0023-WARN)
 run_cmake(CMP0023-NEW)
 run_cmake(CMP0023-WARN-2)
index 1ba753c..41391d2 100644 (file)
@@ -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.
 
 # 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
 
 ARG FROM_IMAGE=$FROM_IMAGE_NAME$FROM_IMAGE_DIGEST
 FROM $FROM_IMAGE
 
index db5551c..7864aac 100644 (file)
@@ -129,10 +129,10 @@ COPY openssl-source.patch /opt/openssl/src/
 RUN : \
  && mkdir -p /opt/openssl/src \
  && cd /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 \
  && 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 \