Merge topic 'cmake-presets-help-flag' into release-3.19

c619be2784 ccmake: Don't list --preset in --help

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5428
diff --git a/.gitlab/ci/cmake.ps1 b/.gitlab/ci/cmake.ps1
index 3b42cae..e73aab7 100755
--- a/.gitlab/ci/cmake.ps1
+++ b/.gitlab/ci/cmake.ps1
@@ -1,7 +1,7 @@
 $erroractionpreference = "stop"
 
-$version = "3.17.2"
-$sha256sum = "CF82B1EB20B6FBE583487656FCD496490FFCCDFBCBBA0F26E19F1C9C63B0B041"
+$version = "3.18.4"
+$sha256sum = "A932BC0C8EE79F1003204466C525B38A840424D4AE29F9E5FB88959116F2407D"
 $filename = "cmake-$version-win64-x64"
 $tarball = "$filename.zip"
 
diff --git a/.gitlab/ci/cmake.sh b/.gitlab/ci/cmake.sh
index 658a62a..b4c6ddf 100755
--- a/.gitlab/ci/cmake.sh
+++ b/.gitlab/ci/cmake.sh
@@ -2,17 +2,17 @@
 
 set -e
 
-readonly version="3.17.2"
+readonly version="3.18.4"
 
 case "$( uname -s )" in
     Linux)
         shatool="sha256sum"
-        sha256sum="dc57f3cc448ca67fc8776b4ad4c22b087b9c6a8e459938b9622b8c7f4ef6b21e"
+        sha256sum="149e0cee002e59e0bb84543cf3cb099f108c08390392605e944daeb6594cbc29"
         platform="Linux"
         ;;
     Darwin)
         shatool="shasum -a 256"
-        sha256sum="139500e20b080444fcafe57f24f57248c691c5187cce6695bee2b9aad6792c7d"
+        sha256sum="9d27049660474cf134ab46fa0e0db771b263313fcb8ba82ee8b2d1a1a62f8f20"
         platform="Darwin"
         ;;
     *)
diff --git a/.gitlab/ci/download_qt.cmake b/.gitlab/ci/download_qt.cmake
index 31ce6c3..c7e3717 100644
--- a/.gitlab/ci/download_qt.cmake
+++ b/.gitlab/ci/download_qt.cmake
@@ -3,7 +3,7 @@
 # Input variables.
 set(qt_version_major "5")
 set(qt_version_minor "15")
-set(qt_version_patch "0")
+set(qt_version_patch "1")
 # This URL is only visible inside of Kitware's network. Please use your own Qt
 # Account to obtain these files.
 if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "package")
@@ -20,7 +20,7 @@
 elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2017" OR
         "$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2019")
   set(qt_platform "windows_x86")
-  set(msvc_year "2017")
+  set(msvc_year "2019")
   set(qt_abi "win64_msvc${msvc_year}_64")
 elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "macos")
   set(qt_platform "mac_x64")
@@ -37,14 +37,7 @@
 # Files needed to download.
 set(qt_files)
 if (qt_platform STREQUAL "windows_x86")
-  if (msvc_year STREQUAL "2017")
-    set(qt_build_stamp "202002260536")
-  elseif (msvc_year STREQUAL "2015")
-    set(qt_build_stamp "202005150700")
-  else ()
-    message(FATAL_ERROR
-      "Build stamp for MSVC ${msvc_year} is unknown")
-  endif ()
+  set(qt_build_stamp "202009071110")
 
   set(qt_file_name_prefix "${qt_version}-0-${qt_build_stamp}")
 
@@ -60,7 +53,7 @@
       "qt-5.6.2-macosx10.7-x86_64.tar.xz")
     set(qt_subdir "qt-5.6.2-macosx10.7-x86_64")
   else ()
-    set(qt_build_stamp "202005140805")
+    set(qt_build_stamp "202009071110")
     set(qt_file_name_prefix "${qt_version}-0-${qt_build_stamp}")
 
     foreach (qt_component IN ITEMS qtbase)
diff --git a/.gitlab/ci/download_qt_hashes.cmake b/.gitlab/ci/download_qt_hashes.cmake
index 28837dc..02a6fdd 100644
--- a/.gitlab/ci/download_qt_hashes.cmake
+++ b/.gitlab/ci/download_qt_hashes.cmake
@@ -2,12 +2,12 @@
 #
 #   sha256sum $files | awk '{ print "set(\"" $2 "_hash\" " $1 ")" }' >> $thisfile
 
-set("5.15.0-0-202002260536qtbase-Windows-Windows_10-MSVC2017-Windows-Windows_10-X86_64.7z_hash" c041596be8f7a16c7be9ea6757c14766ff3200ab6d56f7db8f865dbfe039fe20)
-set("5.15.0-0-202002260536qtwinextras-Windows-Windows_10-MSVC2017-Windows-Windows_10-X86_64.7z_hash" 10796128fac54f146767e33f6872975ba238858547de7a9650ec4cd9581fe71a)
+set("5.15.1-0-202009071110qtbase-Windows-Windows_10-MSVC2019-Windows-Windows_10-X86_64.7z_hash" a5635124a135f383d9fb92bf628b018cff9f781addfd388926a367cda5b7cd38)
+set("5.15.1-0-202009071110qtwinextras-Windows-Windows_10-MSVC2019-Windows-Windows_10-X86_64.7z_hash" 908947855b5d7a854886746365ac29e9296b5d64d4e18089641a6988167807d3)
 
-set("5.15.0-0-202005150700qtbase-Windows-Windows_10-MSVC2015-Windows-Windows_10-X86_64.7z_hash" 0c2653c5eca256f59c0b48b537cd633b05560e4241c0226856d2ae22ab066df4)
-set("5.15.0-0-202005150700qtwinextras-Windows-Windows_10-MSVC2015-Windows-Windows_10-X86_64.7z_hash" 4bca3a8d8c7611e211a82d86b3396f8a622abe7859d5052452414642ec191844)
+set("5.15.1-0-202009071110qtbase-Windows-Windows_10-MSVC2015-Windows-Windows_10-X86_64.7z_hash" 5d0d2e71e3b00cf88ac4c616b4b314a7e73871f325512821f53c464cdfee961f)
+set("5.15.1-0-202009071110qtwinextras-Windows-Windows_10-MSVC2015-Windows-Windows_10-X86_64.7z_hash" 803e0234169464babb5305dedc21382e90c3266c6f9414ff0cff04be578681e1)
 
-set("5.15.0-0-202005140805qtbase-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64.7z_hash" 04d867c81d2431f288c42c9752642759460b9468477de349368dcc8de0c8ddc4)
+set("5.15.1-0-202009071110qtbase-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64.7z_hash" df2813ce7c6cb4287abd7956cd1cb9d08312e4ac1208b6cb57af4df11b8ebba1)
 
 set("qt-5.6.2-macosx10.7-x86_64.tar.xz_hash" 2b60373ea60037ce356d4c9f5a8c1df9854127a2c55118252e1a2f5a5f4e0010)
diff --git a/Help/command/cmake_path.rst b/Help/command/cmake_path.rst
index 555926b..cb84dd1 100644
--- a/Help/command/cmake_path.rst
+++ b/Help/command/cmake_path.rst
@@ -65,15 +65,15 @@
   the target system. So this is not generally applicable to the target system
   in cross-compiling environment.
 
-For all commands, ``<path>`` placeholder expect a variable name. An error will
-be raised if the variable does not exist, except for `APPEND`_ and
+For all commands, ``<path-var>`` placeholder expect a variable name. An error
+will be raised if the variable does not exist, except for `APPEND`_ and
 `CMAKE_PATH`_ sub-commands. ``<input>`` placeholder expect a string literal.
-``[<input>...]`` placeholder expect zero or more arguments. ``<output>``
+``[<input>...]`` placeholder expect zero or more arguments. ``<out-var>``
 placeholder expect a variable name.
 
 .. note::
 
-  ``cmake_path`` command does not support list of paths. The ``<path>``
+  ``cmake_path`` command does not support list of paths. The ``<path-var>``
   placeholder must store only one path name.
 
 To initialize a path variable, three possibilities can be used:
@@ -96,7 +96,7 @@
 
 `Modification`_ and `Generation`_ sub-commands store the result in-place or in
 the variable specified by  ``OUTPUT_VARIABLE`` option. All other sub-commands,
-except `CMAKE_PATH`_, store the result in the required ``<output>`` variable.
+except `CMAKE_PATH`_, store the result in the required ``<out-var>`` variable.
 
 Sub-commands supporting ``NORMALIZE`` option will :ref:`normalize <NORMAL_PATH>`
 the path.
@@ -107,58 +107,58 @@
 .. parsed-literal::
 
   `Decomposition`_
-    cmake_path(`GET`_ <path> :ref:`ROOT_NAME <GET_ROOT_NAME>` <output>)
-    cmake_path(`GET`_ <path> :ref:`ROOT_DIRECTORY <GET_ROOT_DIRECTORY>` <output>)
-    cmake_path(`GET`_ <path> :ref:`ROOT_PATH <GET_ROOT_PATH>` <output>)
-    cmake_path(`GET`_ <path> :ref:`FILENAME <GET_FILENAME>` <output>)
-    cmake_path(`GET`_ <path> :ref:`EXTENSION <GET_EXTENSION>` [LAST_ONLY] <output>)
-    cmake_path(`GET`_ <path> :ref:`STEM <GET_STEM>` [LAST_ONLY] <output>)
-    cmake_path(`GET`_ <path> :ref:`RELATIVE_PATH <GET_RELATIVE_PATH>` <output>)
-    cmake_path(`GET`_ <path> :ref:`PARENT_PATH <GET_PARENT_PATH>` <output>)
+    cmake_path(`GET`_ <path-var> :ref:`ROOT_NAME <GET_ROOT_NAME>` <out-var>)
+    cmake_path(`GET`_ <path-var> :ref:`ROOT_DIRECTORY <GET_ROOT_DIRECTORY>` <out-var>)
+    cmake_path(`GET`_ <path-var> :ref:`ROOT_PATH <GET_ROOT_PATH>` <out-var>)
+    cmake_path(`GET`_ <path-var> :ref:`FILENAME <GET_FILENAME>` <out-var>)
+    cmake_path(`GET`_ <path-var> :ref:`EXTENSION <GET_EXTENSION>` [LAST_ONLY] <out-var>)
+    cmake_path(`GET`_ <path-var> :ref:`STEM <GET_STEM>` [LAST_ONLY] <out-var>)
+    cmake_path(`GET`_ <path-var> :ref:`RELATIVE_PATH <GET_RELATIVE_PATH>` <out-var>)
+    cmake_path(`GET`_ <path-var> :ref:`PARENT_PATH <GET_PARENT_PATH>` <out-var>)
 
   `Modification`_
-    cmake_path(`APPEND`_ <path> [<input>...] [OUTPUT_VARIABLE <output>])
-    cmake_path(`CONCAT`_ <path> [<input>...] [OUTPUT_VARIABLE <output>])
-    cmake_path(`REMOVE_FILENAME`_ <path> [OUTPUT_VARIABLE <output>])
-    cmake_path(`REPLACE_FILENAME`_ <path> <input> [OUTPUT_VARIABLE <output>])
-    cmake_path(`REMOVE_EXTENSION`_ <path> [LAST_ONLY]
-                                       [OUTPUT_VARIABLE <output>])
-    cmake_path(`REPLACE_EXTENSION`_ <path> [LAST_ONLY] <input>
-                                        [OUTPUT_VARIABLE <output>])
+    cmake_path(`APPEND`_ <path-var> [<input>...] [OUTPUT_VARIABLE <out-var>])
+    cmake_path(`CONCAT`_ <path-var> [<input>...] [OUTPUT_VARIABLE <out-var>])
+    cmake_path(`REMOVE_FILENAME`_ <path-var> [OUTPUT_VARIABLE <out-var>])
+    cmake_path(`REPLACE_FILENAME`_ <path-var> <input> [OUTPUT_VARIABLE <out-var>])
+    cmake_path(`REMOVE_EXTENSION`_ <path-var> [LAST_ONLY]
+                                              [OUTPUT_VARIABLE <out-var>])
+    cmake_path(`REPLACE_EXTENSION`_ <path-var> [LAST_ONLY] <input>
+                                               [OUTPUT_VARIABLE <out-var>])
 
   `Generation`_
-    cmake_path(`NORMAL_PATH`_ <path> [OUTPUT_VARIABLE <output>])
-    cmake_path(`RELATIVE_PATH`_ <path> [BASE_DIRECTORY <path>]
-                                    [OUTPUT_VARIABLE <output>])
-    cmake_path(`PROXIMATE_PATH`_ <path> [BASE_DIRECTORY <path>]
-                                     [OUTPUT_VARIABLE <output>])
-    cmake_path(`ABSOLUTE_PATH`_ <path> [BASE_DIRECTORY <path>] [NORMALIZE]
-                                    [OUTPUT_VARIABLE <output>])
+    cmake_path(`NORMAL_PATH`_ <path-var> [OUTPUT_VARIABLE <out-var>])
+    cmake_path(`RELATIVE_PATH`_ <path-var> [BASE_DIRECTORY <input>]
+                                           [OUTPUT_VARIABLE <out-var>])
+    cmake_path(`PROXIMATE_PATH`_ <path-var> [BASE_DIRECTORY <input>]
+                                            [OUTPUT_VARIABLE <out-var>])
+    cmake_path(`ABSOLUTE_PATH`_ <path-var> [BASE_DIRECTORY <input>] [NORMALIZE]
+                                           [OUTPUT_VARIABLE <out-var>])
 
   `Conversion`_
-    cmake_path(`CMAKE_PATH`_ <path> [NORMALIZE] <input>)
-    cmake_path(`NATIVE_PATH`_ <path> [NORMALIZE] <output>)
-    cmake_path(`CONVERT`_ <input> `TO_CMAKE_PATH_LIST`_ <output>)
-    cmake_path(`CONVERT`_ <input> `TO_NATIVE_PATH_LIST`_ <output>)
+    cmake_path(`CMAKE_PATH`_ <path-var> [NORMALIZE] <input>)
+    cmake_path(`NATIVE_PATH`_ <path-var> [NORMALIZE] <out-var>)
+    cmake_path(`CONVERT`_ <input> `TO_CMAKE_PATH_LIST`_ <out-var>)
+    cmake_path(`CONVERT`_ <input> `TO_NATIVE_PATH_LIST`_ <out-var>)
 
   `Comparison`_
-    cmake_path(`COMPARE`_ <path> <OP> <input> <output>)
+    cmake_path(`COMPARE`_ <path-var> <OP> <input> <out-var>)
 
   `Query`_
-    cmake_path(`HAS_ROOT_NAME`_ <path> <output>)
-    cmake_path(`HAS_ROOT_DIRECTORY`_ <path> <output>)
-    cmake_path(`HAS_ROOT_PATH`_ <path> <output>)
-    cmake_path(`HAS_FILENAME`_ <path> <output>)
-    cmake_path(`HAS_EXTENSION`_ <path> <output>)
-    cmake_path(`HAS_STEM`_ <path> <output>)
-    cmake_path(`HAS_RELATIVE_PATH`_ <path> <output>)
-    cmake_path(`HAS_PARENT_PATH`_ <path> <output>)
-    cmake_path(`IS_ABSOLUTE`_ <path> <output>)
-    cmake_path(`IS_RELATIVE`_ <path> <output>)
-    cmake_path(`IS_PREFIX`_ <path> <input> [NORMALIZE] <output>)
+    cmake_path(`HAS_ROOT_NAME`_ <path-var> <out-var>)
+    cmake_path(`HAS_ROOT_DIRECTORY`_ <path-var> <out-var>)
+    cmake_path(`HAS_ROOT_PATH`_ <path-var> <out-var>)
+    cmake_path(`HAS_FILENAME`_ <path-var> <out-var>)
+    cmake_path(`HAS_EXTENSION`_ <path-var> <out-var>)
+    cmake_path(`HAS_STEM`_ <path-var> <out-var>)
+    cmake_path(`HAS_RELATIVE_PATH`_ <path-var> <out-var>)
+    cmake_path(`HAS_PARENT_PATH`_ <path-var> <out-var>)
+    cmake_path(`IS_ABSOLUTE`_ <path-var> <out-var>)
+    cmake_path(`IS_RELATIVE`_ <path-var> <out-var>)
+    cmake_path(`IS_PREFIX`_ <path-var> <input> [NORMALIZE] <out-var>)
 
   `Hashing`_
-    cmake_path(`HASH`_ <path> [NORMALIZE] <output>)
+    cmake_path(`HASH`_ <path-var> [NORMALIZE] <out-var>)
 
 Decomposition
 ^^^^^^^^^^^^^
@@ -168,7 +168,7 @@
 
 .. code-block:: cmake
 
-  cmake_path(GET <path> ROOT_NAME <output>)
+  cmake_path(GET <path-var> ROOT_NAME <out-var>)
 
 Returns the root name of the path. If the path does not include a root name,
 returns an empty path.
@@ -194,7 +194,7 @@
 
 .. code-block:: cmake
 
-  cmake_path(GET <path> ROOT_DIRECTORY <output>)
+  cmake_path(GET <path-var> ROOT_DIRECTORY <out-var>)
 
 Returns the root directory of the path. If the path does not include a root
 directory, returns an empty path.
@@ -215,7 +215,7 @@
 
 .. code-block:: cmake
 
-  cmake_path(GET <path> ROOT_PATH <output>)
+  cmake_path(GET <path-var> ROOT_PATH <out-var>)
 
 Returns the root path of the path. If the path does not include a root path,
 returns an empty path.
@@ -238,7 +238,7 @@
 
 .. code-block:: cmake
 
-  cmake_path(GET <path> FILENAME <output>)
+  cmake_path(GET <path-var> FILENAME <out-var>)
 
 Returns the :ref:`filename <FILENAME_DEF>` component of the path. If the path
 ends with a ``directory-separator``, there is no filename, so returns an empty
@@ -265,7 +265,7 @@
 
 .. code-block:: cmake
 
-  cmake_path(GET <path> EXTENSION [LAST_ONLY] <output>)
+  cmake_path(GET <path-var> EXTENSION [LAST_ONLY] <out-var>)
 
 Returns the :ref:`extension <EXTENSION_DEF>` of the filename component.
 
@@ -301,7 +301,7 @@
 
 .. code-block:: cmake
 
-  cmake_path(GET <path> STEM [LAST_ONLY] <output>)
+  cmake_path(GET <path-var> STEM [LAST_ONLY] <out-var>)
 
 Returns the :ref:`filename <FILENAME_DEF>` component of the path stripped of
 its :ref:`extension <EXTENSION_DEF>`.
@@ -334,11 +334,11 @@
 
 .. code-block:: cmake
 
-  cmake_path(GET <path> RELATIVE_PATH <output>)
+  cmake_path(GET <path-var> RELATIVE_PATH <out-var>)
 
 Returns path relative to ``root-path``, that is, a pathname composed of
-every component of ``<path>`` after ``root-path``. If ``<path>`` is an empty
-path, returns an empty path.
+every component of ``<path-var>`` after ``root-path``. If ``<path-var>`` is
+an empty path, returns an empty path.
 
 For Example:
 
@@ -361,12 +361,12 @@
 
 .. code-block:: cmake
 
-  cmake_path(GET <path> PARENT_PATH <output>)
+  cmake_path(GET <path-var> PARENT_PATH <out-var>)
 
 Returns the path to the parent directory.
 
 If `HAS_RELATIVE_PATH`_ sub-command returns false, the result is a copy of
-``<path>``. Otherwise, the result is ``<path>`` with one fewer element.
+``<path-var>``. Otherwise, the result is ``<path-var>`` with one fewer element.
 
 For Example:
 
@@ -392,15 +392,17 @@
 
 .. code-block:: cmake
 
-    cmake_path(APPEND <path> [<input>...] [OUTPUT_VARIABLE <output>])
+    cmake_path(APPEND <path-var> [<input>...] [OUTPUT_VARIABLE <out-var>])
 
-Append all the ``<input>`` arguments to the ``<path>`` using ``/`` as
+Append all the ``<input>`` arguments to the ``<path-var>`` using ``/`` as
 ``directory-separator``.
 
 For each ``<input>`` argument, the following algorithm (pseudo-code) applies:
 
   .. code-block:: cmake
 
+    # <path> is the contents of <path-var>
+
     IF (<input>.is_absolute() OR
          (<input>.has_root_name() AND
           NOT <input>.root_name() STREQUAL <path>.root_name()))
@@ -411,7 +413,7 @@
     IF (<input>.has_root_directory())
       remove any root-directory and the entire relative path from <path>
     ELSEIF (<path>.has_filename() OR
-             (NOT <path>.has_root_directory() OR <path>.is_absolute()))
+             (NOT <path-var>.has_root_directory() OR <path>.is_absolute()))
       appends directory-separator to <path>
     ENDIF()
 
@@ -421,22 +423,22 @@
 
 .. code-block:: cmake
 
-    cmake_path(CONCAT <path> [<input>...] [OUTPUT_VARIABLE <output>])
+    cmake_path(CONCAT <path-var> [<input>...] [OUTPUT_VARIABLE <out-var>])
 
-Concatenates all the ``<input>`` arguments to the ``<path>`` without
+Concatenates all the ``<input>`` arguments to the ``<path-var>`` without
 ``directory-separator``.
 
 .. _REMOVE_FILENAME:
 
 .. code-block:: cmake
 
-    cmake_path(REMOVE_FILENAME <path> [OUTPUT_VARIABLE <output>])
+    cmake_path(REMOVE_FILENAME <path-var> [OUTPUT_VARIABLE <out-var>])
 
 Removes the :ref:`filename <FILENAME_DEF>` component (as returned by
-:ref:`GET ... FILENAME <GET_FILENAME>`) from ``<path>``.
+:ref:`GET ... FILENAME <GET_FILENAME>`) from ``<path-var>``.
 
 After this function returns, if change is done in-place, `HAS_FILENAME`_
-returns false for ``<path>``.
+returns false for ``<path-var>``.
 
 For Example:
 
@@ -458,13 +460,13 @@
 
 .. code-block:: cmake
 
-    cmake_path(REPLACE_FILENAME <path> <input> [OUTPUT_VARIABLE <output>])
+    cmake_path(REPLACE_FILENAME <path-var> <input> [OUTPUT_VARIABLE <out-var>])
 
-Replaces the :ref:`filename <FILENAME_DEF>` component from ``<path>`` with
+Replaces the :ref:`filename <FILENAME_DEF>` component from ``<path-var>`` with
 ``<input>``.
 
-If ``<path>`` has no filename component (`HAS_FILENAME`_ returns false), the
-path is unchanged.
+If ``<path-var>`` has no filename component (`HAS_FILENAME`_ returns false),
+the path is unchanged.
 
 Equivalent to the following:
 
@@ -480,23 +482,24 @@
 
 .. code-block:: cmake
 
-    cmake_path(REMOVE_EXTENSION <path> [LAST_ONLY] [OUTPUT_VARIABLE <output>])
+    cmake_path(REMOVE_EXTENSION <path-var> [LAST_ONLY]
+                                           [OUTPUT_VARIABLE <out-var>])
 
-Removes the :ref:`extension <EXTENSION_DEF>`, if any, from ``<path>``.
+Removes the :ref:`extension <EXTENSION_DEF>`, if any, from ``<path-var>``.
 
 .. _REPLACE_EXTENSION:
 
 .. code-block:: cmake
 
-    cmake_path(REPLACE_EXTENSION <path> [LAST_ONLY] <input>
-                                 [OUTPUT_VARIABLE <output>])
+    cmake_path(REPLACE_EXTENSION <path-var> [LAST_ONLY] <input>
+                                 [OUTPUT_VARIABLE <out-var>])
 
 Replaces the :ref:`extension <EXTENSION_DEF>` with ``<input>``.
 
-  1. If ``<path>`` has an :ref:`extension <EXTENSION_DEF>`
+  1. If ``<path-var>`` has an :ref:`extension <EXTENSION_DEF>`
      (`HAS_EXTENSION`_ is true), it is removed.
-  2. A ``dot`` character is appended to ``<path>``, if ``<input>`` is not empty
-     or does not begin with a ``dot`` character.
+  2. A ``dot`` character is appended to ``<path-var>``, if ``<input>`` is not
+     empty or does not begin with a ``dot`` character.
   3. ``<input>`` is appended as if `CONCAT`_ was used.
 
 
@@ -517,9 +520,9 @@
 
 .. code-block:: cmake
 
-    cmake_path(NORMAL_PATH <path> [OUTPUT_VARIABLE <output>])
+    cmake_path(NORMAL_PATH <path-var> [OUTPUT_VARIABLE <out-var>])
 
-Normalize ``<path>``.
+Normalize ``<path-var>``.
 
 A path can be normalized by following this algorithm:
 
@@ -544,10 +547,10 @@
 
 .. code-block:: cmake
 
-    cmake_path(RELATIVE_PATH <path> [BASE_DIRECTORY <path>]
-                             [OUTPUT_VARIABLE <output>])
+    cmake_path(RELATIVE_PATH <path-var> [BASE_DIRECTORY <input>]
+                                        [OUTPUT_VARIABLE <out-var>])
 
-Returns ``<path>`` made relative to ``BASE_DIRECTORY`` argument. If
+Returns ``<path-var>`` made relative to ``BASE_DIRECTORY`` argument. If
 ``BASE_DIRECTORY`` is not specified, the default base directory will be
 :variable:`CMAKE_CURRENT_SOURCE_DIR`.
 
@@ -558,11 +561,11 @@
 
 .. code-block:: cmake
 
-    cmake_path(PROXIMATE_PATH <path> [BASE_DIRECTORY <path>]
-                              [OUTPUT_VARIABLE <output>])
+    cmake_path(PROXIMATE_PATH <path-var> [BASE_DIRECTORY <input>]
+                                         [OUTPUT_VARIABLE <out-var>])
 
 If the value of `RELATIVE_PATH`_ is not an empty path, return
-it. Otherwise return ``<path>``.
+it. Otherwise return ``<path-var>``.
 
 If ``BASE_DIRECTORY`` is not specified, the default base directory will be
 :variable:`CMAKE_CURRENT_SOURCE_DIR`.
@@ -571,10 +574,10 @@
 
 .. code-block:: cmake
 
-    cmake_path(ABSOLUTE_PATH <path> [BASE_DIRECTORY <path>] [NORMALIZE]
-                             [OUTPUT_VARIABLE <output>])
+    cmake_path(ABSOLUTE_PATH <path-var> [BASE_DIRECTORY <input>] [NORMALIZE]
+                                        [OUTPUT_VARIABLE <out-var>])
 
-If ``<path>`` is a relative path (`IS_RELATIVE`_ is true), it is evaluated
+If ``<path-var>`` is a relative path (`IS_RELATIVE`_ is true), it is evaluated
 relative to the given base directory specified by ``BASE_DIRECTORY`` option.
 
 If ``BASE_DIRECTORY`` is not specifired, the default base directory will be
@@ -595,7 +598,7 @@
 
 .. code-block:: cmake
 
-    cmake_path(CMAKE_PATH <path> [NORMALIZE] <input>)
+    cmake_path(CMAKE_PATH <path-var> [NORMALIZE] <input>)
 
 Converts a native ``<input>`` path into cmake-style path with forward-slashes
 (``/``). On Windows, the long filename marker is taken into account.
@@ -624,9 +627,9 @@
 
 .. code-block:: cmake
 
-    cmake_path(NATIVE_PATH <path> [NORMALIZE] <output>)
+    cmake_path(NATIVE_PATH <path-var> [NORMALIZE] <out-var>)
 
-Converts a cmake-style ``<path>`` into a native
+Converts a cmake-style ``<path-var>`` into a native
 path with platform-specific slashes (``\`` on Windows and ``/`` elsewhere).
 
 When ``NORMALIZE`` option is specified, the path is :ref:`normalized
@@ -638,13 +641,13 @@
 
 .. code-block:: cmake
 
-   cmake_path(CONVERT <input> TO_CMAKE_PATH_LIST <output> [NORMALIZE])
+   cmake_path(CONVERT <input> TO_CMAKE_PATH_LIST <out-var> [NORMALIZE])
 
 Converts a native ``<input>`` path into cmake-style path with forward-slashes
 (``/``).  On Windows, the long filename marker is taken into account. The input can
 be a single path or a system search path like ``$ENV{PATH}``.  A search path
 will be converted to a cmake-style list separated by ``;`` characters. The
-result of the conversion is stored in the ``<output>`` variable.
+result of the conversion is stored in the ``<out-var>`` variable.
 
 When ``NORMALIZE`` option is specified, the path is :ref:`normalized
 <NORMAL_PATH>` before the conversion.
@@ -654,12 +657,12 @@
 
 .. code-block:: cmake
 
-  cmake_path(CONVERT <input> TO_NATIVE_PATH_LIST <output> [NORMALIZE])
+  cmake_path(CONVERT <input> TO_NATIVE_PATH_LIST <out-var> [NORMALIZE])
 
 Converts a cmake-style ``<input>`` path into a native path with
 platform-specific slashes (``\`` on Windows and ``/`` elsewhere). The input can
 be a single path or a cmake-style list. A list will be converted into a native
-search path. The result of the conversion is stored in the ``<output>``
+search path. The result of the conversion is stored in the ``<out-var>``
 variable.
 
 When ``NORMALIZE`` option is specified, the path is :ref:`normalized
@@ -688,8 +691,8 @@
 
 .. code-block:: cmake
 
-    cmake_path(COMPARE <path> EQUAL <input> <output>)
-    cmake_path(COMPARE <path> NOT_EQUAL <input> <output>)
+    cmake_path(COMPARE <path-var> EQUAL <input> <out-var>)
+    cmake_path(COMPARE <path-var> NOT_EQUAL <input> <out-var>)
 
 Compares the lexical representations of the path and another path.
 
@@ -697,6 +700,8 @@
 
   .. code-block:: cmake
 
+    # <path> is the contents of <path-var>
+
     IF (NOT <path>.root_name() STREQUAL <input>.root_name())
       returns FALSE
     ELSEIF (<path>.has_root_directory() XOR <input>.has_root_directory())
@@ -714,43 +719,43 @@
 
 .. code-block:: cmake
 
-    cmake_path(HAS_ROOT_NAME <path> <output>)
+    cmake_path(HAS_ROOT_NAME <path-var> <out-var>)
 
-Checks if ``<path>`` has ``root-name``.
+Checks if ``<path-var>`` has ``root-name``.
 
 .. _HAS_ROOT_DIRECTORY:
 
 .. code-block:: cmake
 
-    cmake_path(HAS_ROOT_DIRECTORY <path> <output>)
+    cmake_path(HAS_ROOT_DIRECTORY <path-var> <out-var>)
 
-Checks if ``<path>`` has ``root-directory``.
+Checks if ``<path-var>`` has ``root-directory``.
 
 .. _HAS_ROOT_PATH:
 
 .. code-block:: cmake
 
-    cmake_path(HAS_ROOT_PATH <path> <output>)
+    cmake_path(HAS_ROOT_PATH <path-var> <out-var>)
 
-Checks if ``<path>`` has root path.
+Checks if ``<path-var>`` has root path.
 
-Effectively, checks if ``<path>`` has ``root-name`` and ``root-directory``.
+Effectively, checks if ``<path-var>`` has ``root-name`` and ``root-directory``.
 
 .. _HAS_FILENAME:
 
 .. code-block:: cmake
 
-    cmake_path(HAS_FILENAME <path> <output>)
+    cmake_path(HAS_FILENAME <path-var> <out-var>)
 
-Checks if ``<path>`` has a :ref:`filename <FILENAME_DEF>`.
+Checks if ``<path-var>`` has a :ref:`filename <FILENAME_DEF>`.
 
 .. _HAS_EXTENSION:
 
 .. code-block:: cmake
 
-    cmake_path(HAS_EXTENSION <path> <output>)
+    cmake_path(HAS_EXTENSION <path-var> <out-var>)
 
-Checks if ``<path>`` has an :ref:`extension <EXTENSION_DEF>`. If the first
+Checks if ``<path-var>`` has an :ref:`extension <EXTENSION_DEF>`. If the first
 character in the filename is a period, it is not treated as an extension (for
 example ".profile").
 
@@ -758,36 +763,36 @@
 
 .. code-block:: cmake
 
-    cmake_path(HAS_STEM <path> <output>)
+    cmake_path(HAS_STEM <path-var> <out-var>)
 
-Checks if ``<path>`` has stem (:ref:`GET ... STEM <GET_STEM>` returns a non
+Checks if ``<path-var>`` has stem (:ref:`GET ... STEM <GET_STEM>` returns a non
 empty path).
 
 .. _HAS_RELATIVE_PATH:
 
 .. code-block:: cmake
 
-    cmake_path(HAS_RELATIVE_PATH <path> <output>)
+    cmake_path(HAS_RELATIVE_PATH <path-var> <out-var>)
 
-Checks if ``<path>`` has relative path (`GET_RELATIVE_PATH`_ returns a
+Checks if ``<path-var>`` has relative path (`GET_RELATIVE_PATH`_ returns a
 non-empty path).
 
 .. _HAS_PARENT_PATH:
 
 .. code-block:: cmake
 
-    cmake_path(HAS_PARENT_PATH <path> <output>)
+    cmake_path(HAS_PARENT_PATH <path-var> <out-var>)
 
-Checks if ``<path>`` has parent path. The result is true except if the path is
-only composed of a :ref:`filename <FILENAME_DEF>`.
+Checks if ``<path-var>`` has parent path. The result is true except if the path
+is only composed of a :ref:`filename <FILENAME_DEF>`.
 
 .. _IS_ABSOLUTE:
 
 .. code-block:: cmake
 
-    cmake_path(IS_ABSOLUTE <path> <output>)
+    cmake_path(IS_ABSOLUTE <path-var> <out-var>)
 
-Checks if ``<path>`` is absolute.
+Checks if ``<path-var>`` is absolute.
 
 An absolute path is a path that unambiguously identifies the location of a file
 without reference to an additional starting location.
@@ -796,7 +801,7 @@
 
 .. code-block:: cmake
 
-    cmake_path(IS_RELATIVE <path> <output>)
+    cmake_path(IS_RELATIVE <path-var> <out-var>)
 
 Checks if path is relative (i.e. not :ref:`absolute <IS_ABSOLUTE>`).
 
@@ -804,9 +809,9 @@
 
 .. code-block:: cmake
 
-    cmake_path(IS_PREFIX <path> <input> [NORMALIZE] <output>)
+    cmake_path(IS_PREFIX <path-var> <input> [NORMALIZE] <out-var>)
 
-Checks if ``<path>`` is the prefix of ``<input>``.
+Checks if ``<path-var>`` is the prefix of ``<input>``.
 
 When ``NORMALIZE`` option is specified, the paths are :ref:`normalized
 <NORMAL_PATH>` before the check.
@@ -818,11 +823,11 @@
 
 .. code-block:: cmake
 
-    cmake_path(HASH <path> [NORMALIZE] <output>)
+    cmake_path(HASH <path-var> [NORMALIZE] <out-var>)
 
-Compute hash value of ``<path>`` such that if for two paths (``p1`` and ``p2``)
-are equal (:ref:`COMPARE ... EQUAL <COMPARE>`) then hash value of p1 is equal
-to hash value of p2.
+Compute hash value of ``<path-var>`` such that if for two paths (``p1`` and
+``p2``) are equal (:ref:`COMPARE ... EQUAL <COMPARE>`) then hash value of p1 is
+equal to hash value of p2.
 
 When ``NORMALIZE`` option is specified, the paths are :ref:`normalized
 <NORMAL_PATH>` before the check.
diff --git a/Help/manual/cmake-gui.1.rst b/Help/manual/cmake-gui.1.rst
index 97b5731..281986f 100644
--- a/Help/manual/cmake-gui.1.rst
+++ b/Help/manual/cmake-gui.1.rst
@@ -11,6 +11,7 @@
  cmake-gui [<options>]
  cmake-gui [<options>] {<path-to-source> | <path-to-existing-build>}
  cmake-gui [<options>] -S <path-to-source> -B <path-to-build>
+ cmake-gui [<options>] --browse-manual
 
 Description
 ===========
@@ -40,6 +41,9 @@
  Name of the preset to use from the project's
  :manual:`presets <cmake-presets(7)>` files, if it has them.
 
+``--browse-manual``
+ Open the CMake reference manual in a browser and immediately exit.
+
 .. include:: OPTIONS_HELP.txt
 
 See Also
diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake
index 0559a69..a0cdf3b 100644
--- a/Modules/FindRuby.cmake
+++ b/Modules/FindRuby.cmake
@@ -515,6 +515,7 @@
     Ruby_SITELIB_DIR
     Ruby_HAS_VENDOR_RUBY
     Ruby_VENDORARCH_DIR
+    Ruby_VENDORLIB_DIR
 
     )
     string(TOUPPER ${Camel} UPPER)
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index 5b9d479..c1555a2 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -32,7 +32,8 @@
     "  cmake-gui [options]\n"
     "  cmake-gui [options] <path-to-source>\n"
     "  cmake-gui [options] <path-to-existing-build>\n"
-    "  cmake-gui [options] -S <path-to-source> -B <path-to-build>\n" },
+    "  cmake-gui [options] -S <path-to-source> -B <path-to-build>\n"
+    "  cmake-gui [options] --browse-manual\n" },
   { nullptr, nullptr }
 };
 
@@ -61,6 +62,7 @@
 
 int CMakeGUIExec(CMakeSetupDialog* window);
 void SetupDefaultQSettings();
+void OpenReferenceManual();
 
 int main(int argc, char** argv)
 {
@@ -198,6 +200,9 @@
         return 1;
       }
       presetName = preset.toLocal8Bit().data();
+    } else if (arg == "--browse-manual") {
+      OpenReferenceManual();
+      return 0;
     }
   }
   if (!sourceDirectory.empty() &&
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index a15614d..05518a9 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -43,6 +43,21 @@
 #include "RegexExplorer.h"
 #include "WarningMessagesDialog.h"
 
+void OpenReferenceManual()
+{
+  QString urlFormat("https://cmake.org/cmake/help/v%1.%2/");
+  QUrl url(urlFormat.arg(QString::number(cmVersion::GetMajorVersion()),
+                         QString::number(cmVersion::GetMinorVersion())));
+
+  if (!cmSystemTools::GetHTMLDoc().empty()) {
+    url = QUrl::fromLocalFile(
+      QDir(QString::fromLocal8Bit(cmSystemTools::GetHTMLDoc().data()))
+        .filePath("index.html"));
+  }
+
+  QDesktopServices::openUrl(url);
+}
+
 namespace {
 const QString PRESETS_DISABLED_TOOLTIP =
   "This option is disabled because there are no available presets in "
@@ -194,19 +209,7 @@
   QObject::connect(a, &QAction::triggered, this, &CMakeSetupDialog::doHelp);
   a->setShortcut(QKeySequence::HelpContents);
   a = HelpMenu->addAction(tr("CMake Reference Manual"));
-  QObject::connect(a, &QAction::triggered, this, []() {
-    QString urlFormat("https://cmake.org/cmake/help/v%1.%2/");
-    QUrl url(urlFormat.arg(QString::number(cmVersion::GetMajorVersion()),
-                           QString::number(cmVersion::GetMinorVersion())));
-
-    if (!cmSystemTools::GetHTMLDoc().empty()) {
-      url = QUrl::fromLocalFile(
-        QDir(QString::fromLocal8Bit(cmSystemTools::GetHTMLDoc().data()))
-          .filePath("index.html"));
-    }
-
-    QDesktopServices::openUrl(url);
-  });
+  QObject::connect(a, &QAction::triggered, this, OpenReferenceManual);
   a = HelpMenu->addAction(tr("About"));
   QObject::connect(a, &QAction::triggered, this, &CMakeSetupDialog::doAbout);
 
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 952a179..e7bbf72 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1423,7 +1423,7 @@
     cmGeneratorTarget::SourceFileFlags tsFlags =
       gtgt->GetTargetSourceFileFlags(sourceFile);
 
-    if (filetype && IsLibraryType(filetype->GetString())) {
+    if (filetype && filetype->GetString() == "compiled.mach-o.objfile") {
       if (sourceFile->GetObjectLibrary().empty()) {
         externalObjFiles.push_back(xsf);
       }
@@ -1591,7 +1591,7 @@
     }
   }
 
-  // always create framework build phase
+  // Always create Link Binary With Libraries build phase
   cmXCodeObject* frameworkBuildPhase = nullptr;
   frameworkBuildPhase =
     this->CreateObject(cmXCodeObject::PBXFrameworksBuildPhase);
@@ -1600,6 +1600,7 @@
                                     this->CreateString("2147483647"));
   buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST);
   frameworkBuildPhase->AddAttribute("files", buildFiles);
+  // Add all collected .o files to this build phase
   for (auto& externalObjFile : externalObjFiles) {
     buildFiles->AddObject(externalObjFile);
   }