summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml10
-rw-r--r--.gitlab/ci/configure_windows_vs2019_x64_ninja.cmake3
-rw-r--r--CMakeLists.txt2
-rw-r--r--Help/cpack_gen/nsis.rst6
-rw-r--r--Help/manual/cmake-developer.7.rst18
-rw-r--r--Help/manual/cmake-policies.7.rst8
-rw-r--r--Help/policy/CMP0121.rst21
-rw-r--r--Help/release/dev/0-sample-topic.rst7
-rw-r--r--Help/release/dev/cpack-nsis-executable-name.rst6
-rw-r--r--Help/release/dev/list-index-arg-parsing.rst7
-rw-r--r--Help/release/index.rst2
-rw-r--r--Modules/CMakeCUDAInformation.cmake32
-rw-r--r--Modules/Compiler/Clang-CUDA.cmake4
-rw-r--r--Modules/FortranCInterface/Detect.cmake19
-rw-r--r--Modules/GoogleTest.cmake3
-rw-r--r--Modules/Platform/Apple-NVIDIA-CUDA.cmake12
-rw-r--r--Modules/Platform/Windows-NVIDIA-CUDA.cmake42
-rw-r--r--Modules/UseSWIG.cmake23
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx4
-rw-r--r--Source/cmExportFileGenerator.cxx4
-rw-r--r--Source/cmListCommand.cxx68
-rw-r--r--Source/cmLocalGenerator.cxx5
-rw-r--r--Source/cmMakefile.cxx2
-rw-r--r--Source/cmPolicies.h5
-rw-r--r--Source/cmQtAutoMocUic.cxx6
-rw-r--r--Tests/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/BundleUtilities/CMP0080-COMMAND-OLD-stderr.txt9
-rw-r--r--Tests/RunCMake/BundleUtilities/CMP0080-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/CMP0081/CMP0081-OLD-result.txt1
-rw-r--r--Tests/RunCMake/CMP0081/CMP0081-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-Common.cmake8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-result.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-result.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-result.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt18
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-Common.cmake4
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-NEW-result.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-NEW-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-OLD-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-WARN-stderr.txt11
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-GET-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-Common.cmake4
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-result.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN-stderr.txt11
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-Common.cmake4
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-result.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN-stderr.txt11
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-Common.cmake4
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-result.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN-stderr.txt11
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-Common.cmake4
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-result.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN-stderr.txt11
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0121/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0121/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/UseSWIG/CMP0078-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/option/CMP0077-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/target_link_libraries/CMP0079-iface-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/target_link_libraries/CMP0079-link-OLD-stderr.txt13
-rw-r--r--Utilities/Doxygen/CMakeLists.txt2
-rw-r--r--Utilities/Sphinx/CMakeLists.txt2
90 files changed, 517 insertions, 104 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d0b3b1e..8e76e41 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -52,7 +52,7 @@ prep:doc-package:
- .cmake_doc_artifacts
- .run_only_for_package
-.upload:source-package:
+upload:source-package:
extends:
- .rsync_upload
- .run_only_for_package
@@ -199,7 +199,7 @@ build:linux-x86_64-package:
needs:
- prep:doc-package
-.upload:linux-x86_64-package:
+upload:linux-x86_64-package:
extends:
- .rsync_upload
- .run_only_for_package
@@ -223,7 +223,7 @@ build:linux-aarch64-package:
needs:
- prep:doc-package
-.upload:linux-aarch64-package:
+upload:linux-aarch64-package:
extends:
- .rsync_upload
- .run_only_for_package
@@ -335,7 +335,7 @@ build:macos-package:
needs:
- prep:doc-package
-.upload:macos-package:
+upload:macos-package:
extends:
- .rsync_upload
- .run_only_for_package
@@ -358,7 +358,7 @@ build:macos10.10-package:
needs:
- prep:doc-package
-.upload:macos10.10-package:
+upload:macos10.10-package:
extends:
- .rsync_upload
- .run_only_for_package
diff --git a/.gitlab/ci/configure_windows_vs2019_x64_ninja.cmake b/.gitlab/ci/configure_windows_vs2019_x64_ninja.cmake
index 9c30a4b..e1ae81e 100644
--- a/.gitlab/ci/configure_windows_vs2019_x64_ninja.cmake
+++ b/.gitlab/ci/configure_windows_vs2019_x64_ninja.cmake
@@ -1,4 +1,7 @@
set(CMake_TEST_WIX_NO_VERIFY "ON" CACHE BOOL "")
set(CMake_TEST_GUI "ON" CACHE BOOL "")
+set(CMake_TEST_FindOpenGL "ON" CACHE BOOL "")
+set(CMake_TEST_IPO_WORKS_C "ON" CACHE BOOL "")
+set(CMake_TEST_IPO_WORKS_CXX "ON" CACHE BOOL "")
include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_common.cmake")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a2fcf2e..045a283 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
-cmake_minimum_required(VERSION 3.1...3.18 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.1...3.19 FATAL_ERROR)
set(CMAKE_USER_MAKE_RULES_OVERRIDE_C ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideC.cmake)
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideCXX.cmake)
project(CMake)
diff --git a/Help/cpack_gen/nsis.rst b/Help/cpack_gen/nsis.rst
index eaef8ae..964f629 100644
--- a/Help/cpack_gen/nsis.rst
+++ b/Help/cpack_gen/nsis.rst
@@ -193,3 +193,9 @@ on Windows Nullsoft Scriptable Install System.
.. versionadded:: 3.20
If set, trim down the size of the control to the size of the branding text string.
+
+.. variable:: CPACK_NSIS_EXECUTABLE
+
+ .. versionadded:: 3.21
+
+ If set, specify the name of the NSIS executable. Default is ``makensis``.
diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst
index af9a8ab..fe146de 100644
--- a/Help/manual/cmake-developer.7.rst
+++ b/Help/manual/cmake-developer.7.rst
@@ -350,6 +350,24 @@ look.
PATHS ${PC_Foo_LIBRARY_DIRS}
)
+Alternatively, if the library is available with multiple configurations, you can
+use :module:`SelectLibraryConfigurations` to automatically set the
+``Foo_LIBRARY`` variable instead:
+
+.. code-block:: cmake
+
+ find_library(Foo_LIBRARY_RELEASE
+ NAMES foo
+ PATHS ${PC_Foo_LIBRARY_DIRS}/Release
+ )
+ find_library(Foo_LIBRARY_DEBUG
+ NAMES foo
+ PATHS ${PC_Foo_LIBRARY_DIRS}/Debug
+ )
+
+ include(SelectLibraryConfigurations)
+ select_library_configurations(Foo)
+
If you have a good way of getting the version (from a header file, for
example), you can use that information to set ``Foo_VERSION`` (although
note that find modules have traditionally used ``Foo_VERSION_STRING``,
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index bd6b2f0..f103c50 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -51,6 +51,14 @@ The :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable may also be used
to determine whether to report an error on use of deprecated macros or
functions.
+Policies Introduced by CMake 3.21
+=================================
+
+.. toctree::
+ :maxdepth: 1
+
+ CMP0121: The list command detects invalid indicies </policy/CMP0121>
+
Policies Introduced by CMake 3.20
=================================
diff --git a/Help/policy/CMP0121.rst b/Help/policy/CMP0121.rst
new file mode 100644
index 0000000..5ef2856
--- /dev/null
+++ b/Help/policy/CMP0121.rst
@@ -0,0 +1,21 @@
+CMP0121
+-------
+
+.. versionadded:: 3.21
+
+The :command:`list` command now detects invalid indicies.
+
+Prior to CMake version 3.21, the :command:`list` command's ``GET``,
+``INSERT``, ``SUBLIST``, and ``REMOVE_AT`` subcommands did not detect invalid
+index arguments.
+
+The ``OLD`` behavior of this policy is for invalid indicies to be treated as
+their integer value (if any) at the start of the string. For example,
+``2good4you`` is a ``2`` and ``not_an_integer`` is a ``0``. The ``NEW``
+behavior is for invalid indicies to trigger an error.
+
+This policy was introduced in CMake version 3.21. CMake version |release|
+warns when the policy is not set and uses ``OLD`` behavior. Use the
+:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
+
+.. include:: DEPRECATED.txt
diff --git a/Help/release/dev/0-sample-topic.rst b/Help/release/dev/0-sample-topic.rst
new file mode 100644
index 0000000..e4cc01e
--- /dev/null
+++ b/Help/release/dev/0-sample-topic.rst
@@ -0,0 +1,7 @@
+0-sample-topic
+--------------
+
+* This is a sample release note for the change in a topic.
+ Developers should add similar notes for each topic branch
+ making a noteworthy change. Each document should be named
+ and titled to match the topic name to avoid merge conflicts.
diff --git a/Help/release/dev/cpack-nsis-executable-name.rst b/Help/release/dev/cpack-nsis-executable-name.rst
new file mode 100644
index 0000000..a3818db
--- /dev/null
+++ b/Help/release/dev/cpack-nsis-executable-name.rst
@@ -0,0 +1,6 @@
+cpack-nsis-executable-name
+--------------------------
+
+* The :cpack_gen:`CPack NSIS Generator` gained a new variable
+ :variable:`CPACK_NSIS_EXECUTABLE` to specify the makensis
+ executable to use instead of the default one.
diff --git a/Help/release/dev/list-index-arg-parsing.rst b/Help/release/dev/list-index-arg-parsing.rst
new file mode 100644
index 0000000..2ea525b
--- /dev/null
+++ b/Help/release/dev/list-index-arg-parsing.rst
@@ -0,0 +1,7 @@
+list-index-arg-parsing
+----------------------
+
+* The :command:`list` command's ``GET``, ``INSERT``, ``SUBLIST``, and
+ ``REMOVE_AT`` subcommands now error with invalid (i.e., non-integer) values
+ are given as any of their index arguments based on the setting of policy
+ :policy:`CMP0121`.
diff --git a/Help/release/index.rst b/Help/release/index.rst
index 95b41fb..5dfca05 100644
--- a/Help/release/index.rst
+++ b/Help/release/index.rst
@@ -7,6 +7,8 @@ CMake Release Notes
This file should include the adjacent "dev.txt" file
in development versions but not in release versions.
+.. include:: dev.txt
+
Releases
========
diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake
index cb03ef4..2b7d7b2 100644
--- a/Modules/CMakeCUDAInformation.cmake
+++ b/Modules/CMakeCUDAInformation.cmake
@@ -9,15 +9,15 @@ endif()
set(CMAKE_INCLUDE_FLAG_CUDA "-I")
# Set implicit links early so compiler-specific modules can use them.
-set(__IMPLICT_LINKS )
+set(__IMPLICIT_LINKS)
foreach(dir ${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES})
- string(APPEND __IMPLICT_LINKS " -L\"${dir}\"")
+ string(APPEND __IMPLICIT_LINKS " -L\"${dir}\"")
endforeach()
foreach(lib ${CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES})
if(${lib} MATCHES "/")
- string(APPEND __IMPLICT_LINKS " \"${lib}\"")
+ string(APPEND __IMPLICIT_LINKS " \"${lib}\"")
else()
- string(APPEND __IMPLICT_LINKS " -l${lib}")
+ string(APPEND __IMPLICIT_LINKS " -l${lib}")
endif()
endforeach()
@@ -117,7 +117,7 @@ endif()
# create a shared library
if(NOT CMAKE_CUDA_CREATE_SHARED_LIBRARY)
set(CMAKE_CUDA_CREATE_SHARED_LIBRARY
- "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <CMAKE_SHARED_LIBRARY_CUDA_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>${__IMPLICT_LINKS}")
+ "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <CMAKE_SHARED_LIBRARY_CUDA_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>${__IMPLICIT_LINKS}")
endif()
# create a shared module copy the shared library rule by default
@@ -157,32 +157,32 @@ endif()
# compile a cu file into an executable
if(NOT CMAKE_CUDA_LINK_EXECUTABLE)
set(CMAKE_CUDA_LINK_EXECUTABLE
- "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICT_LINKS}")
+ "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICIT_LINKS}")
endif()
# Add implicit host link directories that contain device libraries
# to the device link line.
-set(__IMPLICT_DLINK_DIRS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
-if(__IMPLICT_DLINK_DIRS)
- list(REMOVE_ITEM __IMPLICT_DLINK_DIRS ${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES})
+set(__IMPLICIT_DLINK_DIRS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
+if(__IMPLICIT_DLINK_DIRS)
+ list(REMOVE_ITEM __IMPLICIT_DLINK_DIRS ${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES})
endif()
-set(__IMPLICT_DLINK_FLAGS )
-foreach(dir ${__IMPLICT_DLINK_DIRS})
+set(__IMPLICIT_DLINK_FLAGS)
+foreach(dir ${__IMPLICIT_DLINK_DIRS})
if(EXISTS "${dir}/libcurand_static.a")
- string(APPEND __IMPLICT_DLINK_FLAGS " -L\"${dir}\"")
+ string(APPEND __IMPLICIT_DLINK_FLAGS " -L\"${dir}\"")
endif()
endforeach()
-unset(__IMPLICT_DLINK_DIRS)
+unset(__IMPLICIT_DLINK_DIRS)
#These are used when linking relocatable (dc) cuda code
if(NOT CMAKE_CUDA_DEVICE_LINK_LIBRARY)
set(CMAKE_CUDA_DEVICE_LINK_LIBRARY
- "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICT_DLINK_FLAGS}")
+ "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICIT_DLINK_FLAGS}")
endif()
if(NOT CMAKE_CUDA_DEVICE_LINK_EXECUTABLE)
set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE
- "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICT_DLINK_FLAGS}")
+ "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICIT_DLINK_FLAGS}")
endif()
# Used when device linking is handled by CMake.
@@ -190,6 +190,6 @@ if(NOT CMAKE_CUDA_DEVICE_LINK_COMPILE)
set(CMAKE_CUDA_DEVICE_LINK_COMPILE "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <FLAGS> -D__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__ -D__NV_EXTRA_INITIALIZATION=\"\" -D__NV_EXTRA_FINALIZATION=\"\" -DREGISTERLINKBINARYFILE=\\\"<REGISTER_FILE>\\\" -DFATBINFILE=\\\"<FATBINARY>\\\" ${_CMAKE_COMPILE_AS_CUDA_FLAG} -c \"${CMAKE_CUDA_COMPILER_TOOLKIT_LIBRARY_ROOT}/bin/crt/link.stub\" -o <OBJECT>")
endif()
-unset(__IMPLICT_DLINK_FLAGS)
+unset(__IMPLICIT_DLINK_FLAGS)
set(CMAKE_CUDA_INFORMATION_LOADED 1)
diff --git a/Modules/Compiler/Clang-CUDA.cmake b/Modules/Compiler/Clang-CUDA.cmake
index cafc7dd..37e5e9f 100644
--- a/Modules/Compiler/Clang-CUDA.cmake
+++ b/Modules/Compiler/Clang-CUDA.cmake
@@ -22,8 +22,8 @@ set(_CMAKE_CUDA_PTX_FLAG "--cuda-device-only -S")
set(_CMAKE_CUDA_DEVICE_CODE "-fgpu-rdc -c")
# RulePlaceholderExpander expands crosscompile variables like sysroot and target only for CMAKE_<LANG>_COMPILER. Override the default.
-set(CMAKE_CUDA_LINK_EXECUTABLE "<CMAKE_CUDA_COMPILER> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICT_LINKS}")
-set(CMAKE_CUDA_CREATE_SHARED_LIBRARY "<CMAKE_CUDA_COMPILER> <CMAKE_SHARED_LIBRARY_CUDA_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>${__IMPLICT_LINKS}")
+set(CMAKE_CUDA_LINK_EXECUTABLE "<CMAKE_CUDA_COMPILER> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+set(CMAKE_CUDA_CREATE_SHARED_LIBRARY "<CMAKE_CUDA_COMPILER> <CMAKE_SHARED_LIBRARY_CUDA_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
set(CMAKE_CUDA_RUNTIME_LIBRARY_DEFAULT "STATIC")
set(CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_STATIC "cudadevrt;cudart_static")
diff --git a/Modules/FortranCInterface/Detect.cmake b/Modules/FortranCInterface/Detect.cmake
index 998faf1..9e5726b 100644
--- a/Modules/FortranCInterface/Detect.cmake
+++ b/Modules/FortranCInterface/Detect.cmake
@@ -6,14 +6,17 @@ configure_file(${FortranCInterface_SOURCE_DIR}/Input.cmake.in
# Detect the Fortran/C interface on the first run or when the
# configuration changes.
-if(${FortranCInterface_BINARY_DIR}/Input.cmake
- IS_NEWER_THAN ${FortranCInterface_BINARY_DIR}/Output.cmake
- OR ${FortranCInterface_SOURCE_DIR}/Output.cmake.in
- IS_NEWER_THAN ${FortranCInterface_BINARY_DIR}/Output.cmake
- OR ${FortranCInterface_SOURCE_DIR}/CMakeLists.txt
- IS_NEWER_THAN ${FortranCInterface_BINARY_DIR}/Output.cmake
- OR ${CMAKE_CURRENT_LIST_FILE}
- IS_NEWER_THAN ${FortranCInterface_BINARY_DIR}/Output.cmake
+if(NOT EXISTS ${FortranCInterface_BINARY_DIR}/Output.cmake
+ OR NOT EXISTS ${FortranCInterface_BINARY_DIR}/Input.cmake
+ OR NOT EXISTS ${FortranCInterface_BINARY_DIR}/Output.cmake.in
+ OR NOT ${FortranCInterface_BINARY_DIR}/Output.cmake
+ IS_NEWER_THAN ${FortranCInterface_BINARY_DIR}/Input.cmake
+ OR NOT ${FortranCInterface_SOURCE_DIR}/Output.cmake
+ IS_NEWER_THAN ${FortranCInterface_BINARY_DIR}/Output.cmake.in
+ OR NOT ${FortranCInterface_BINARY_DIR}/Output.cmake
+ IS_NEWER_THAN ${FortranCInterface_SOURCE_DIR}/CMakeLists.txt
+ OR NOT ${FortranCInterface_BINARY_DIR}/Output.cmake
+ IS_NEWER_THAN ${CMAKE_CURRENT_LIST_FILE}
)
message(CHECK_START "Detecting Fortran/C Interface")
else()
diff --git a/Modules/GoogleTest.cmake b/Modules/GoogleTest.cmake
index 2ea9e74..80d8e23 100644
--- a/Modules/GoogleTest.cmake
+++ b/Modules/GoogleTest.cmake
@@ -504,7 +504,8 @@ function(gtest_discover_tests TARGET)
string(CONCAT ctest_include_content
"if(EXISTS \"$<TARGET_FILE:${TARGET}>\")" "\n"
- " if(\"$<TARGET_FILE:${TARGET}>\" IS_NEWER_THAN \"${ctest_tests_file}\")" "\n"
+ " if(NOT EXISTS \"${ctest_tests_file}\" OR" "\n"
+ " NOT \"${ctest_tests_file}\" IS_NEWER_THAN \"$<TARGET_FILE:${TARGET}>\")" "\n"
" include(\"${_GOOGLETEST_DISCOVER_TESTS_SCRIPT}\")" "\n"
" gtest_discover_tests_impl(" "\n"
" TEST_EXECUTABLE" " [==[" "$<TARGET_FILE:${TARGET}>" "]==]" "\n"
diff --git a/Modules/Platform/Apple-NVIDIA-CUDA.cmake b/Modules/Platform/Apple-NVIDIA-CUDA.cmake
index bec3948..35e759a 100644
--- a/Modules/Platform/Apple-NVIDIA-CUDA.cmake
+++ b/Modules/Platform/Apple-NVIDIA-CUDA.cmake
@@ -1,19 +1,19 @@
include(Platform/Darwin)
-set(__IMPLICT_LINKS )
+set(__IMPLICIT_LINKS)
foreach(dir ${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES})
- string(APPEND __IMPLICT_LINKS " -L\"${dir}\"")
+ string(APPEND __IMPLICIT_LINKS " -L\"${dir}\"")
endforeach()
foreach(lib ${CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES})
if(${lib} MATCHES "/")
- string(APPEND __IMPLICT_LINKS " \"${lib}\"")
+ string(APPEND __IMPLICIT_LINKS " \"${lib}\"")
else()
- string(APPEND __IMPLICT_LINKS " -l${lib}")
+ string(APPEND __IMPLICIT_LINKS " -l${lib}")
endif()
endforeach()
set(CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS "-shared -Wl,-headerpad_max_install_names")
set(CMAKE_SHARED_MODULE_CREATE_CUDA_FLAGS "-shared -Wl,-headerpad_max_install_names")
-set(CMAKE_CUDA_CREATE_SHARED_LIBRARY "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <CMAKE_SHARED_LIBRARY_CUDA_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>${__IMPLICT_LINKS}")
-set(CMAKE_CUDA_CREATE_SHARED_MODULE "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <CMAKE_SHARED_LIBRARY_CUDA_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>${__IMPLICT_LINKS}")
+set(CMAKE_CUDA_CREATE_SHARED_LIBRARY "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <CMAKE_SHARED_LIBRARY_CUDA_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>${__IMPLICIT_LINKS}")
+set(CMAKE_CUDA_CREATE_SHARED_MODULE "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <CMAKE_SHARED_LIBRARY_CUDA_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>${__IMPLICIT_LINKS}")
diff --git a/Modules/Platform/Windows-NVIDIA-CUDA.cmake b/Modules/Platform/Windows-NVIDIA-CUDA.cmake
index a88f4bc..b83932e 100644
--- a/Modules/Platform/Windows-NVIDIA-CUDA.cmake
+++ b/Modules/Platform/Windows-NVIDIA-CUDA.cmake
@@ -7,49 +7,49 @@ set(CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION
set(CMAKE_CUDA_COMPILE_WHOLE_COMPILATION
"<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} -c <SOURCE> -o <OBJECT> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
-set(__IMPLICT_LINKS )
+set(__IMPLICIT_LINKS)
foreach(dir ${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES})
- string(APPEND __IMPLICT_LINKS " -LIBPATH:\"${dir}\"")
+ string(APPEND __IMPLICIT_LINKS " -LIBPATH:\"${dir}\"")
endforeach()
foreach(lib ${CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES})
- string(APPEND __IMPLICT_LINKS " \"${lib}\"")
+ string(APPEND __IMPLICIT_LINKS " \"${lib}\"")
endforeach()
set(CMAKE_CUDA_LINK_EXECUTABLE
- "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <LINK_FLAGS> <OBJECTS> /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <LINK_LIBRARIES>${__IMPLICT_LINKS}")
+ "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <LINK_FLAGS> <OBJECTS> /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <LINK_LIBRARIES>${__IMPLICIT_LINKS}")
set(_CMAKE_VS_LINK_DLL "<CMAKE_COMMAND> -E vs_link_dll --intdir=<OBJECT_DIR> --rc=<CMAKE_RC_COMPILER> --mt=<CMAKE_MT> --manifests <MANIFESTS> -- ")
set(_CMAKE_VS_LINK_EXE "<CMAKE_COMMAND> -E vs_link_exe --intdir=<OBJECT_DIR> --rc=<CMAKE_RC_COMPILER> --mt=<CMAKE_MT> --manifests <MANIFESTS> -- ")
set(CMAKE_CUDA_CREATE_SHARED_LIBRARY
- "${_CMAKE_VS_LINK_DLL}<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /dll /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR>${_PLATFORM_LINK_FLAGS} <LINK_FLAGS> <LINK_LIBRARIES>${__IMPLICT_LINKS} ${CMAKE_END_TEMP_FILE}")
+ "${_CMAKE_VS_LINK_DLL}<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /dll /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR>${_PLATFORM_LINK_FLAGS} <LINK_FLAGS> <LINK_LIBRARIES>${__IMPLICIT_LINKS} ${CMAKE_END_TEMP_FILE}")
set(CMAKE_CUDA_CREATE_SHARED_MODULE ${CMAKE_CUDA_CREATE_SHARED_LIBRARY})
set(CMAKE_CUDA_CREATE_STATIC_LIBRARY "<CMAKE_AR> ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
set(CMAKE_CUDA_LINKER_SUPPORTS_PDB ON)
set(CMAKE_CUDA_LINK_EXECUTABLE
- "${_CMAKE_VS_LINK_EXE}<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR>${_PLATFORM_LINK_FLAGS} <LINK_FLAGS> <LINK_LIBRARIES>${__IMPLICT_LINKS} ${CMAKE_END_TEMP_FILE}")
-unset(_CMAKE_VS_LINK_EXE)
+ "${_CMAKE_VS_LINK_EXE}<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR>${_PLATFORM_LINK_FLAGS} <LINK_FLAGS> <LINK_LIBRARIES>${__IMPLICIT_LINKS} ${CMAKE_END_TEMP_FILE}")
+unset(_CMAKE_VS_LINK_DLL)
unset(_CMAKE_VS_LINK_EXE)
# Add implicit host link directories that contain device libraries
# to the device link line.
-set(__IMPLICT_DLINK_DIRS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
-if(__IMPLICT_DLINK_DIRS)
- list(REMOVE_ITEM __IMPLICT_DLINK_DIRS ${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES})
+set(__IMPLICIT_DLINK_DIRS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
+if(__IMPLICIT_DLINK_DIRS)
+ list(REMOVE_ITEM __IMPLICIT_DLINK_DIRS ${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES})
endif()
-set(__IMPLICT_DLINK_FLAGS )
-foreach(dir ${__IMPLICT_DLINK_DIRS})
+set(__IMPLICIT_DLINK_FLAGS)
+foreach(dir ${__IMPLICIT_DLINK_DIRS})
if(EXISTS "${dir}/curand_static.lib")
- string(APPEND __IMPLICT_DLINK_FLAGS " -L\"${dir}\"")
+ string(APPEND __IMPLICIT_DLINK_FLAGS " -L\"${dir}\"")
endif()
endforeach()
-unset(__IMPLICT_DLINK_DIRS)
+unset(__IMPLICIT_DLINK_DIRS)
set(CMAKE_CUDA_DEVICE_LINK_LIBRARY
- "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS${__IMPLICT_DLINK_FLAGS}")
+ "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS${__IMPLICIT_DLINK_FLAGS}")
set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE
- "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS${__IMPLICT_DLINK_FLAGS}")
-unset(__IMPLICT_DLINK_FLAGS)
+ "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS${__IMPLICIT_DLINK_FLAGS}")
+unset(__IMPLICIT_DLINK_FLAGS)
string(REPLACE "/D" "-D" _PLATFORM_DEFINES_CUDA "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_CXX}")
@@ -69,14 +69,6 @@ else()
endif()
unset(_cmp0092)
-set(CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_STATIC "cudadevrt;cudart_static")
-set(CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_SHARED "cudadevrt;cudart")
-set(CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_NONE "")
-
-if(UNIX)
- list(APPEND CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_STATIC "rt" "pthread" "dl")
-endif()
-
string(APPEND CMAKE_CUDA_FLAGS_INIT " ${PLATFORM_DEFINES_CUDA} -D_WINDOWS -Xcompiler=\"${_W3}${_FLAGS_CXX}\"")
string(APPEND CMAKE_CUDA_FLAGS_DEBUG_INIT " -Xcompiler=\"${_MDd}-Zi -Ob0 -Od ${_RTC1}\"")
string(APPEND CMAKE_CUDA_FLAGS_RELEASE_INIT " -Xcompiler=\"${_MD}-O2 -Ob2\" -DNDEBUG")
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 7d7f737..b1e0576 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -338,20 +338,11 @@ as well as ``SWIG``:
initialized with the value of this variable.
#]=======================================================================]
-cmake_policy(GET CMP0078 target_name_policy)
-cmake_policy(GET CMP0086 module_name_policy)
-
-cmake_policy (VERSION 3.12)
-if (target_name_policy)
- # respect user choice regarding CMP0078 policy
- cmake_policy(SET CMP0078 ${target_name_policy})
-endif()
-if (module_name_policy)
- # respect user choice regarding CMP0086 policy
- cmake_policy(SET CMP0086 ${module_name_policy})
-endif()
-unset(target_name_policy)
-unset(module_name_policy)
+cmake_policy(PUSH)
+# numbers and boolean constants
+cmake_policy (SET CMP0012 NEW)
+# IN_LIST operator
+cmake_policy (SET CMP0057 NEW)
set(SWIG_CXX_EXTENSION "cxx")
set(SWIG_EXTRA_LIBRARIES "")
@@ -911,7 +902,7 @@ function(SWIG_ADD_LIBRARY name)
if (APPLE)
set_target_properties (${target_name} PROPERTIES SUFFIX ".jnilib")
endif()
- if ((WIN32 AND MINGW) OR CYGWIN OR CMAKE_SYSTEM_NAME STREQUAL MSYS)
+ if ((WIN32 AND MINGW) OR CYGWIN OR CMAKE_SYSTEM_NAME STREQUAL "MSYS")
set_target_properties(${target_name} PROPERTIES PREFIX "")
endif()
elseif (swig_lowercase_language STREQUAL "lua")
@@ -1007,3 +998,5 @@ function(SWIG_LINK_LIBRARIES name)
endif()
endif()
endfunction()
+
+cmake_policy(POP)
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index c41675f..4503c0b 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,8 +1,8 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 20)
-set(CMake_VERSION_PATCH 0)
-set(CMake_VERSION_RC 1)
+set(CMake_VERSION_PATCH 20210224)
+#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
# Start with the full version number used in tags. It has no dev info.
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 263adfd..9b00704 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -430,7 +430,9 @@ int cmCPackNSISGenerator::InitializeInternal()
}
#endif
- nsisPath = cmSystemTools::FindProgram("makensis", path, false);
+ this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLE", "makensis");
+ nsisPath = cmSystemTools::FindProgram(
+ this->GetOption("CPACK_NSIS_EXECUTABLE"), path, false);
if (nsisPath.empty()) {
cmCPackLogger(
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 7015a01..0409f97 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -924,13 +924,13 @@ void cmExportFileGenerator::GeneratePolicyHeaderCode(std::ostream& os)
// Isolate the file policy level.
// Support CMake versions as far back as 2.6 but also support using NEW
- // policy settings for up to CMake 3.18 (this upper limit may be reviewed
+ // policy settings for up to CMake 3.19 (this upper limit may be reviewed
// and increased from time to time). This reduces the opportunity for CMake
// warnings when an older export file is later used with newer CMake
// versions.
/* clang-format off */
os << "cmake_policy(PUSH)\n"
- << "cmake_policy(VERSION 2.6...3.18)\n";
+ << "cmake_policy(VERSION 2.6...3.19)\n";
/* clang-format on */
}
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index fdddb45..1bafdf7 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -4,9 +4,7 @@
#include <algorithm>
#include <cassert>
-#include <cstddef>
#include <cstdio>
-#include <cstdlib> // required for atoi
#include <functional>
#include <iterator>
#include <set>
@@ -36,6 +34,42 @@
namespace {
+bool GetIndexArg(char const* arg, int* idx, cmMakefile& mf)
+{
+ long value;
+ if (!cmStrToLong(arg, &value)) {
+ switch (mf.GetPolicyStatus(cmPolicies::CMP0121)) {
+ case cmPolicies::WARN: {
+ // Default is to warn and use old behavior OLD behavior is to allow
+ // compatibility, so issue a warning and use the previous behavior.
+ std::string warn =
+ cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0121),
+ " Invalid list index \"", arg, "\".");
+ mf.IssueMessage(MessageType::AUTHOR_WARNING, warn);
+ break;
+ }
+ case cmPolicies::OLD:
+ // OLD behavior is to allow compatibility, so just ignore the
+ // situation.
+ break;
+ case cmPolicies::NEW:
+ return false;
+ case cmPolicies::REQUIRED_IF_USED:
+ case cmPolicies::REQUIRED_ALWAYS:
+ std::string msg =
+ cmStrCat(cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0121),
+ " Invalid list index \"", arg, "\".");
+ mf.IssueMessage(MessageType::FATAL_ERROR, msg);
+ break;
+ }
+ }
+
+ // Truncation is happening here, but it had always been happening here.
+ *idx = static_cast<int>(value);
+
+ return true;
+}
+
bool FilterRegex(std::vector<std::string> const& args, bool includeMatches,
std::string const& listName,
std::vector<std::string>& varArgsExpanded,
@@ -154,7 +188,11 @@ bool HandleGetCommand(std::vector<std::string> const& args,
const char* sep = "";
size_t nitem = varArgsExpanded.size();
for (cc = 2; cc < args.size() - 1; cc++) {
- int item = atoi(args[cc].c_str());
+ int item;
+ if (!GetIndexArg(args[cc].c_str(), &item, status.GetMakefile())) {
+ status.SetError(cmStrCat("index: ", args[cc], " is not a valid index"));
+ return false;
+ }
value += sep;
sep = ";";
if (item < 0) {
@@ -362,7 +400,11 @@ bool HandleInsertCommand(std::vector<std::string> const& args,
const std::string& listName = args[1];
// expand the variable
- int item = atoi(args[2].c_str());
+ int item;
+ if (!GetIndexArg(args[2].c_str(), &item, status.GetMakefile())) {
+ status.SetError(cmStrCat("index: ", args[2], " is not a valid index"));
+ return false;
+ }
std::vector<std::string> varArgsExpanded;
if ((!GetList(varArgsExpanded, listName, status.GetMakefile()) ||
varArgsExpanded.empty()) &&
@@ -1282,8 +1324,16 @@ bool HandleSublistCommand(std::vector<std::string> const& args,
return true;
}
- const int start = atoi(args[2].c_str());
- const int length = atoi(args[3].c_str());
+ int start;
+ int length;
+ if (!GetIndexArg(args[2].c_str(), &start, status.GetMakefile())) {
+ status.SetError(cmStrCat("index: ", args[2], " is not a valid index"));
+ return false;
+ }
+ if (!GetIndexArg(args[3].c_str(), &length, status.GetMakefile())) {
+ status.SetError(cmStrCat("index: ", args[3], " is not a valid index"));
+ return false;
+ }
using size_type = decltype(varArgsExpanded)::size_type;
@@ -1338,7 +1388,11 @@ bool HandleRemoveAtCommand(std::vector<std::string> const& args,
std::vector<size_t> removed;
size_t nitem = varArgsExpanded.size();
for (cc = 2; cc < args.size(); ++cc) {
- int item = atoi(args[cc].c_str());
+ int item;
+ if (!GetIndexArg(args[cc].c_str(), &item, status.GetMakefile())) {
+ status.SetError(cmStrCat("index: ", args[cc], " is not a valid index"));
+ return false;
+ }
if (item < 0) {
item = static_cast<int>(nitem) + item;
}
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 73b6fbc..20d4df1 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2701,8 +2701,9 @@ void cmLocalGenerator::CopyPchCompilePdb(
}
file << "foreach(retry RANGE 1 30)\n";
- file << " if (EXISTS \"" << from_file << "\" AND \"" << from_file
- << " \" IS_NEWER_THAN \"" << dest_file << "\")\n";
+ file << " if (EXISTS \"" << from_file << "\" AND (NOT EXISTS \""
+ << dest_file << "\" OR NOT \"" << dest_file << " \" IS_NEWER_THAN \""
+ << from_file << "\"))\n";
file << " execute_process(COMMAND ${CMAKE_COMMAND} -E copy";
file << " \"" << from_file << "\""
<< " \"" << to_dir << "\" RESULT_VARIABLE result "
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 78cae0e..e156625 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4393,7 +4393,7 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id,
// Deprecate old policies, especially those that require a lot
// of code to maintain the old behavior.
- if (status == cmPolicies::OLD && id <= cmPolicies::CMP0075 &&
+ if (status == cmPolicies::OLD && id <= cmPolicies::CMP0081 &&
!(this->GetCMakeInstance()->GetIsInTryCompile() &&
(
// Policies set by cmCoreTryCompile::TryCompileCode.
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 2194b0f..9295a3f 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -359,7 +359,10 @@ class cmMakefile;
3, 20, 0, cmPolicies::WARN) \
SELECT(POLICY, CMP0120, \
"The WriteCompilerDetectionHeader module is removed.", 3, 20, 0, \
- cmPolicies::WARN)
+ cmPolicies::WARN) \
+ SELECT(POLICY, CMP0121, \
+ "The list() command now validates parsing of index arguments.", 3, \
+ 21, 0, cmPolicies::WARN)
#define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)
#define CM_FOR_EACH_POLICY_ID(POLICY) \
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx
index 1e3bf06..02b32dd 100644
--- a/Source/cmQtAutoMocUic.cxx
+++ b/Source/cmQtAutoMocUic.cxx
@@ -1589,14 +1589,14 @@ bool cmQtAutoMocUicT::JobEvalCacheUicT::FindIncludedUi(
};
// Vicinity of the source
- if (findUi(cmStrCat(sourceDirPrefix, this->UiName))) {
- return true;
- }
if (!includePrefix.empty()) {
if (findUi(cmStrCat(sourceDirPrefix, includePrefix, this->UiName))) {
return true;
}
}
+ if (findUi(cmStrCat(sourceDirPrefix, this->UiName))) {
+ return true;
+ }
// Additional AUTOUIC search paths
auto const& searchPaths = this->UicConst().SearchPaths;
if (!searchPaths.empty()) {
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 8e7c04f..987f54d 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -25,14 +25,14 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/CheckFortran.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/CheckSwift.cmake)
# Fake a user home directory to avoid polluting the real one.
-if(DEFINED ENV{HOME} AND NOT CTEST_NO_TEST_HOME)
+if(NOT CTEST_NO_TEST_HOME AND (NOT WIN32 OR DEFINED ENV{HOME}))
set(TEST_HOME "${CMake_BINARY_DIR}/Tests/CMakeFiles/TestHome")
file(MAKE_DIRECTORY "${TEST_HOME}")
file(WRITE "${TEST_HOME}/.cvspass" ":pserver:anoncvs@www.cmake.org:/cvsroot/KWSys A\n")
set(TEST_HOME_ENV_CODE "# Fake a user home directory to avoid polluting the real one.
# But provide original ENV{HOME} value in ENV{CTEST_REAL_HOME} for tests that
# need access to the real HOME directory.
-if(NOT DEFINED ENV{CTEST_REAL_HOME})
+if(DEFINED ENV{HOME} AND NOT DEFINED ENV{CTEST_REAL_HOME})
set(ENV{CTEST_REAL_HOME} \"\$ENV{HOME}\")
endif()
set(ENV{HOME} \"${TEST_HOME}\")
diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND-OLD-stderr.txt b/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND-OLD-stderr.txt
new file mode 100644
index 0000000..31a0207
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND-OLD-stderr.txt
@@ -0,0 +1,9 @@
+^CMake Deprecation Warning at [^
+]*/Tests/RunCMake/BundleUtilities/CMP0080-COMMAND.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0080 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.$
diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-OLD-stderr.txt b/Tests/RunCMake/BundleUtilities/CMP0080-OLD-stderr.txt
new file mode 100644
index 0000000..2ff5d60
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/CMP0080-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0080-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0080 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/CMP0081/CMP0081-OLD-result.txt b/Tests/RunCMake/CMP0081/CMP0081-OLD-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/CMP0081/CMP0081-OLD-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/CMP0081/CMP0081-OLD-stderr.txt b/Tests/RunCMake/CMP0081/CMP0081-OLD-stderr.txt
new file mode 100644
index 0000000..ff339fa
--- /dev/null
+++ b/Tests/RunCMake/CMP0081/CMP0081-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0081-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0081 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-Common.cmake b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-Common.cmake
new file mode 100644
index 0000000..5594be8
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-Common.cmake
@@ -0,0 +1,8 @@
+set(listvar a b c d e)
+
+list(GET listvar
+ 18446744073709551616 # 2^64
+ 2147483648 # 2^31
+ 4294967296 # 2^32; errors out-of-range as -2147483643 due to underflow
+ out)
+message("ERANGE: -->${out}<--")
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-result.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-stderr.txt
new file mode 100644
index 0000000..0166e14
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at CMP0121-ERANGE-Common.cmake:3 \(list\):
+ list index: 18446744073709551616 is not a valid index
+Call Stack \(most recent call first\):
+ CMP0121-ERANGE-NEW.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+ERANGE: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW.cmake b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW.cmake
new file mode 100644
index 0000000..68e564d
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 NEW)
+include(CMP0121-ERANGE-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-result.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-stderr.txt
new file mode 100644
index 0000000..5a03559
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at CMP0121-ERANGE-Common.cmake:3 \(list\):
+ list index: (-2147483643|2147483647) out of range \(-5, 4\)
+Call Stack \(most recent call first\):
+ CMP0121-ERANGE-OLD.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+ERANGE: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD.cmake b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD.cmake
new file mode 100644
index 0000000..32f0b56
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 OLD)
+include(CMP0121-ERANGE-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-result.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt
new file mode 100644
index 0000000..1e7b127
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN-stderr.txt
@@ -0,0 +1,18 @@
+CMake Warning \(dev\) at CMP0121-ERANGE-Common.cmake:3 \(list\):
+ Policy CMP0121 is not set: The list\(\) command now validates parsing of
+ index arguments. Run "cmake --help-policy CMP0121" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+ Invalid list index "18446744073709551616".
+Call Stack \(most recent call first\):
+ CMP0121-ERANGE-WARN.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Error at CMP0121-ERANGE-Common.cmake:3 \(list\):
+ list index: (-2147483643|2147483647) out of range \(-5, 4\)
+Call Stack \(most recent call first\):
+ CMP0121-ERANGE-WARN.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+ERANGE: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN.cmake b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN.cmake
new file mode 100644
index 0000000..9655290
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-WARN.cmake
@@ -0,0 +1,2 @@
+
+include(CMP0121-ERANGE-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-Common.cmake b/Tests/RunCMake/CMP0121/CMP0121-GET-Common.cmake
new file mode 100644
index 0000000..e4986f0
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-Common.cmake
@@ -0,0 +1,4 @@
+set(listvar a b c d e)
+
+list(GET listvar 0 2junk out)
+message("GET: -->${out}<--")
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-NEW-result.txt b/Tests/RunCMake/CMP0121/CMP0121-GET-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-NEW-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-GET-NEW-stderr.txt
new file mode 100644
index 0000000..d502b86
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-NEW-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at CMP0121-GET-Common.cmake:3 \(list\):
+ list index: 2junk is not a valid index
+Call Stack \(most recent call first\):
+ CMP0121-GET-NEW.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+GET: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-NEW.cmake b/Tests/RunCMake/CMP0121/CMP0121-GET-NEW.cmake
new file mode 100644
index 0000000..1ab054d
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 NEW)
+include(CMP0121-GET-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-OLD-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-GET-OLD-stderr.txt
new file mode 100644
index 0000000..96375e9
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-OLD-stderr.txt
@@ -0,0 +1 @@
+GET: -->a;c<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-OLD.cmake b/Tests/RunCMake/CMP0121/CMP0121-GET-OLD.cmake
new file mode 100644
index 0000000..ef4526f
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 OLD)
+include(CMP0121-GET-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-GET-WARN-stderr.txt
new file mode 100644
index 0000000..ecfad2c
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-WARN-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) at CMP0121-GET-Common.cmake:3 \(list\):
+ Policy CMP0121 is not set: The list\(\) command now validates parsing of
+ index arguments. Run "cmake --help-policy CMP0121" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+ Invalid list index "2junk".
+Call Stack \(most recent call first\):
+ CMP0121-GET-WARN.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+GET: -->a;c<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-GET-WARN.cmake b/Tests/RunCMake/CMP0121/CMP0121-GET-WARN.cmake
new file mode 100644
index 0000000..b08620b
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-GET-WARN.cmake
@@ -0,0 +1,2 @@
+
+include(CMP0121-GET-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-Common.cmake b/Tests/RunCMake/CMP0121/CMP0121-INSERT-Common.cmake
new file mode 100644
index 0000000..4950881
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-Common.cmake
@@ -0,0 +1,4 @@
+set(listvar a b c d e)
+
+list(INSERT listvar junk2 new)
+message("INSERT: -->${listvar}<--")
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-result.txt b/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-stderr.txt
new file mode 100644
index 0000000..2241962
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at CMP0121-INSERT-Common.cmake:3 \(list\):
+ list index: junk2 is not a valid index
+Call Stack \(most recent call first\):
+ CMP0121-INSERT-NEW.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+INSERT: -->a;b;c;d;e<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW.cmake b/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW.cmake
new file mode 100644
index 0000000..db627d1
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 NEW)
+include(CMP0121-INSERT-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD-stderr.txt
new file mode 100644
index 0000000..52f34ad
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD-stderr.txt
@@ -0,0 +1 @@
+INSERT: -->new;a;b;c;d;e<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD.cmake b/Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD.cmake
new file mode 100644
index 0000000..60364d7
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 OLD)
+include(CMP0121-INSERT-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN-stderr.txt
new file mode 100644
index 0000000..5fa7d17
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) at CMP0121-INSERT-Common.cmake:3 \(list\):
+ Policy CMP0121 is not set: The list\(\) command now validates parsing of
+ index arguments. Run "cmake --help-policy CMP0121" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+ Invalid list index "junk2".
+Call Stack \(most recent call first\):
+ CMP0121-INSERT-WARN.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+INSERT: -->new;a;b;c;d;e<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN.cmake b/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN.cmake
new file mode 100644
index 0000000..55f13e2
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-INSERT-WARN.cmake
@@ -0,0 +1,2 @@
+
+include(CMP0121-INSERT-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-Common.cmake b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-Common.cmake
new file mode 100644
index 0000000..ec92387
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-Common.cmake
@@ -0,0 +1,4 @@
+set(listvar a b c d e)
+
+list(REMOVE_AT listvar 0 invalid)
+message("REMOVE_AT: -->${listvar}<--")
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-result.txt b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-stderr.txt
new file mode 100644
index 0000000..f17bafd
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at CMP0121-REMOVE_AT-Common.cmake:3 \(list\):
+ list index: invalid is not a valid index
+Call Stack \(most recent call first\):
+ CMP0121-REMOVE_AT-NEW.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+REMOVE_AT: -->a;b;c;d;e<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW.cmake b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW.cmake
new file mode 100644
index 0000000..d1f09e3
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 NEW)
+include(CMP0121-REMOVE_AT-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD-stderr.txt
new file mode 100644
index 0000000..09af1ae
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD-stderr.txt
@@ -0,0 +1 @@
+REMOVE_AT: -->b;c;d;e<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD.cmake b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD.cmake
new file mode 100644
index 0000000..ac83226
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 OLD)
+include(CMP0121-REMOVE_AT-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN-stderr.txt
new file mode 100644
index 0000000..e2d47af
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) at CMP0121-REMOVE_AT-Common.cmake:3 \(list\):
+ Policy CMP0121 is not set: The list\(\) command now validates parsing of
+ index arguments. Run "cmake --help-policy CMP0121" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+ Invalid list index "invalid".
+Call Stack \(most recent call first\):
+ CMP0121-REMOVE_AT-WARN.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+REMOVE_AT: -->b;c;d;e<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN.cmake b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN.cmake
new file mode 100644
index 0000000..2b4a824
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-REMOVE_AT-WARN.cmake
@@ -0,0 +1,2 @@
+
+include(CMP0121-REMOVE_AT-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-Common.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-Common.cmake
new file mode 100644
index 0000000..93f46c5
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-Common.cmake
@@ -0,0 +1,4 @@
+set(listvar a b c d e)
+
+list(SUBLIST listvar 0 invalid out)
+message("SUBLIST-length: -->${out}<--")
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-result.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-stderr.txt
new file mode 100644
index 0000000..28bd362
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at CMP0121-SUBLIST-length-Common.cmake:3 \(list\):
+ list index: invalid is not a valid index
+Call Stack \(most recent call first\):
+ CMP0121-SUBLIST-length-NEW.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+SUBLIST-length: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW.cmake
new file mode 100644
index 0000000..c7875cb
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 NEW)
+include(CMP0121-SUBLIST-length-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD-stderr.txt
new file mode 100644
index 0000000..00fcf07
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD-stderr.txt
@@ -0,0 +1 @@
+SUBLIST-length: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD.cmake
new file mode 100644
index 0000000..e9b78ee
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 OLD)
+include(CMP0121-SUBLIST-length-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN-stderr.txt
new file mode 100644
index 0000000..bd06c2f
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) at CMP0121-SUBLIST-length-Common.cmake:3 \(list\):
+ Policy CMP0121 is not set: The list\(\) command now validates parsing of
+ index arguments. Run "cmake --help-policy CMP0121" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+ Invalid list index "invalid".
+Call Stack \(most recent call first\):
+ CMP0121-SUBLIST-length-WARN.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+SUBLIST-length: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN.cmake
new file mode 100644
index 0000000..27318bf
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-length-WARN.cmake
@@ -0,0 +1,2 @@
+
+include(CMP0121-SUBLIST-length-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-Common.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-Common.cmake
new file mode 100644
index 0000000..33f57a3
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-Common.cmake
@@ -0,0 +1,4 @@
+set(listvar a b c d e)
+
+list(SUBLIST listvar invalid 2 out)
+message("SUBLIST-start: -->${out}<--")
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-result.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-stderr.txt
new file mode 100644
index 0000000..9819f95
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at CMP0121-SUBLIST-start-Common.cmake:3 \(list\):
+ list index: invalid is not a valid index
+Call Stack \(most recent call first\):
+ CMP0121-SUBLIST-start-NEW.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+
+
+SUBLIST-start: --><--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW.cmake
new file mode 100644
index 0000000..3d676a3
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 NEW)
+include(CMP0121-SUBLIST-start-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD-stderr.txt
new file mode 100644
index 0000000..8da2881
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD-stderr.txt
@@ -0,0 +1 @@
+SUBLIST-start: -->a;b<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD.cmake
new file mode 100644
index 0000000..268f317
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0121 OLD)
+include(CMP0121-SUBLIST-start-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN-stderr.txt b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN-stderr.txt
new file mode 100644
index 0000000..39d0e0e
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) at CMP0121-SUBLIST-start-Common.cmake:3 \(list\):
+ Policy CMP0121 is not set: The list\(\) command now validates parsing of
+ index arguments. Run "cmake --help-policy CMP0121" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+ Invalid list index "invalid".
+Call Stack \(most recent call first\):
+ CMP0121-SUBLIST-start-WARN.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+SUBLIST-start: -->a;b<--
diff --git a/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN.cmake b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN.cmake
new file mode 100644
index 0000000..a407879
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-SUBLIST-start-WARN.cmake
@@ -0,0 +1,2 @@
+
+include(CMP0121-SUBLIST-start-Common.cmake)
diff --git a/Tests/RunCMake/CMP0121/CMakeLists.txt b/Tests/RunCMake/CMP0121/CMakeLists.txt
new file mode 100644
index 0000000..7cabeb6
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.20)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0121/RunCMakeTest.cmake b/Tests/RunCMake/CMP0121/RunCMakeTest.cmake
new file mode 100644
index 0000000..1ed5b1a
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/RunCMakeTest.cmake
@@ -0,0 +1,7 @@
+include(RunCMake)
+
+foreach (subcommand IN ITEMS ERANGE GET INSERT REMOVE_AT SUBLIST-length SUBLIST-start)
+ run_cmake(CMP0121-${subcommand}-WARN)
+ run_cmake(CMP0121-${subcommand}-OLD)
+ run_cmake(CMP0121-${subcommand}-NEW)
+endforeach ()
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 91fe6ca..c842574 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -131,6 +131,7 @@ if(CMAKE_GENERATOR MATCHES "Ninja")
endif()
add_RunCMake_test(CMP0118)
add_RunCMake_test(CMP0119 -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
+add_RunCMake_test(CMP0121)
# The test for Policy 65 requires the use of the
# CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS variable, which both the VS and Xcode
diff --git a/Tests/RunCMake/UseSWIG/CMP0078-OLD-stderr.txt b/Tests/RunCMake/UseSWIG/CMP0078-OLD-stderr.txt
new file mode 100644
index 0000000..2afdc4f
--- /dev/null
+++ b/Tests/RunCMake/UseSWIG/CMP0078-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0078-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0078 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/option/CMP0077-OLD-stderr.txt b/Tests/RunCMake/option/CMP0077-OLD-stderr.txt
new file mode 100644
index 0000000..9d963cb
--- /dev/null
+++ b/Tests/RunCMake/option/CMP0077-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0077-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0077 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/target_link_libraries/CMP0079-iface-OLD-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0079-iface-OLD-stderr.txt
new file mode 100644
index 0000000..c664505
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/CMP0079-iface-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0079-iface-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0079 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/target_link_libraries/CMP0079-link-OLD-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0079-link-OLD-stderr.txt
index 0b4c4c6..14f4789 100644
--- a/Tests/RunCMake/target_link_libraries/CMP0079-link-OLD-stderr.txt
+++ b/Tests/RunCMake/target_link_libraries/CMP0079-link-OLD-stderr.txt
@@ -1,4 +1,15 @@
-^CMake Error at CMP0079-link/CMakeLists.txt:[0-9]+ \(target_link_libraries\):
+^CMake Deprecation Warning at CMP0079-link-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0079 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
++
+CMake Error at CMP0079-link/CMakeLists.txt:[0-9]+ \(target_link_libraries\):
Attempt to add link library "foo" to target "top" which is not built in
this directory.
diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt
index a880f7a..0ccb721 100644
--- a/Utilities/Doxygen/CMakeLists.txt
+++ b/Utilities/Doxygen/CMakeLists.txt
@@ -3,7 +3,7 @@
if(NOT CMake_SOURCE_DIR)
set(CMakeDeveloperReference_STANDALONE 1)
- cmake_minimum_required(VERSION 3.1...3.18 FATAL_ERROR)
+ cmake_minimum_required(VERSION 3.1...3.19 FATAL_ERROR)
get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH)
include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt
index f989907..69f85d9 100644
--- a/Utilities/Sphinx/CMakeLists.txt
+++ b/Utilities/Sphinx/CMakeLists.txt
@@ -3,7 +3,7 @@
if(NOT CMake_SOURCE_DIR)
set(CMakeHelp_STANDALONE 1)
- cmake_minimum_required(VERSION 3.1...3.18 FATAL_ERROR)
+ cmake_minimum_required(VERSION 3.1...3.19 FATAL_ERROR)
get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH)
include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)