summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy5
-rw-r--r--.gitlab-ci.yml56
-rw-r--r--.gitlab/ci/configure_fedora34_clang_analyzer.cmake1
-rw-r--r--.gitlab/ci/configure_fedora34_ninja.cmake7
-rw-r--r--.gitlab/ci/configure_fedora34_tidy.cmake3
-rw-r--r--.gitlab/ci/configure_fedora35_asan.cmake (renamed from .gitlab/ci/configure_fedora34_asan.cmake)2
-rw-r--r--.gitlab/ci/configure_fedora35_clang_analyzer.cmake1
-rw-r--r--.gitlab/ci/configure_fedora35_common.cmake (renamed from .gitlab/ci/configure_fedora34_common.cmake)0
-rw-r--r--.gitlab/ci/configure_fedora35_makefiles.cmake (renamed from .gitlab/ci/configure_fedora34_makefiles.cmake)0
-rw-r--r--.gitlab/ci/configure_fedora35_ninja.cmake11
-rw-r--r--.gitlab/ci/configure_fedora35_ninja_multi.cmake (renamed from .gitlab/ci/configure_fedora34_ninja_multi.cmake)0
-rw-r--r--.gitlab/ci/configure_fedora35_sphinx.cmake (renamed from .gitlab/ci/configure_fedora34_sphinx.cmake)0
-rw-r--r--.gitlab/ci/configure_fedora35_sphinx_package.cmake (renamed from .gitlab/ci/configure_fedora34_sphinx_package.cmake)0
-rw-r--r--.gitlab/ci/configure_fedora35_tidy.cmake3
-rw-r--r--.gitlab/ci/ctest_memcheck_fedora35_asan.lsan.supp (renamed from .gitlab/ci/ctest_memcheck_fedora34_asan.lsan.supp)0
-rw-r--r--.gitlab/ci/docker/fedora35/Dockerfile (renamed from .gitlab/ci/docker/fedora34/Dockerfile)4
-rwxr-xr-x.gitlab/ci/docker/fedora35/install_deps.sh (renamed from .gitlab/ci/docker/fedora34/install_deps.sh)2
-rwxr-xr-x.gitlab/ci/docker/fedora35/install_ispc.sh (renamed from .gitlab/ci/docker/fedora34/install_ispc.sh)0
-rwxr-xr-x.gitlab/ci/docker/fedora35/install_rvm.sh (renamed from .gitlab/ci/docker/fedora34/install_rvm.sh)0
-rw-r--r--.gitlab/ci/env_fedora35_asan.sh (renamed from .gitlab/ci/env_fedora34_asan.sh)0
-rw-r--r--.gitlab/ci/env_fedora35_clang_analyzer.sh (renamed from .gitlab/ci/env_fedora34_clang_analyzer.sh)0
-rw-r--r--.gitlab/ci/env_fedora35_makefiles.cmake (renamed from .gitlab/ci/env_fedora34_makefiles.cmake)0
-rw-r--r--.gitlab/os-linux.yml59
-rw-r--r--.gitlab/upload.yml4
-rw-r--r--Help/command/try_compile.rst8
-rw-r--r--Help/command/try_run.rst5
-rw-r--r--Help/release/3.21.rst7
-rw-r--r--Modules/ExternalProject.cmake114
-rw-r--r--Modules/ExternalProject/RepositoryInfo.txt.in12
-rw-r--r--Modules/FindHDF5.cmake46
-rw-r--r--Modules/FindRuby.cmake35
-rw-r--r--Modules/Internal/CPack/NSIS.template.in3
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmFindBase.cxx2
-rw-r--r--Source/cmFindCommon.cxx17
-rw-r--r--Source/cmFindCommon.h9
-rw-r--r--Source/cmFindPackageCommand.cxx11
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx1
-rw-r--r--Source/kwsys/testSystemTools.cxx2
-rw-r--r--Tests/FindBoost/TestPython/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/ExternalProject/MultiCommand.cmake12
-rw-r--r--Tests/RunCMake/ExternalProject/RunCMakeTest.cmake17
-rw-r--r--Tests/RunCMake/ExternalProject/SourceDirChange-build2-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/SourceDirChange.cmake20
-rw-r--r--Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake5
-rw-r--r--Tests/RunCMake/find_package/IgnorePath.cmake12
-rw-r--r--Tests/RunCMake/find_package/RunCMakeTest.cmake1
-rwxr-xr-xUtilities/Scripts/update-expat.bash2
-rw-r--r--Utilities/Sphinx/CMakeLists.txt1
-rw-r--r--Utilities/Sphinx/CTestCustom.cmake.in3
-rw-r--r--Utilities/cmexpat/README.md2
-rw-r--r--Utilities/cmexpat/lib/expat.h2
-rw-r--r--Utilities/cmexpat/lib/xmlparse.c36
53 files changed, 351 insertions, 199 deletions
diff --git a/.clang-tidy b/.clang-tidy
index dda86b0..7b8d200 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,6 +1,8 @@
---
Checks: "-*,\
bugprone-*,\
+-bugprone-easily-swappable-parameters,\
+-bugprone-implicit-widening-of-multiplication-result,\
-bugprone-macro-parentheses,\
-bugprone-misplaced-widening-cast,\
-bugprone-narrowing-conversions,\
@@ -12,6 +14,7 @@ misc-*,\
-misc-static-assert,\
modernize-*,\
-modernize-avoid-c-arrays,\
+-modernize-return-braced-init-list,\
-modernize-use-nodiscard,\
-modernize-use-noexcept,\
-modernize-use-trailing-return-type,\
@@ -27,6 +30,8 @@ readability-*,\
-readability-magic-numbers,\
-readability-named-parameter,\
-readability-redundant-declaration,\
+-readability-redundant-member-init,\
+-readability-suspicious-call-argument,\
-readability-uppercase-literal-suffix,\
"
HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$'
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2cb4716..d8d3a36 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -53,7 +53,7 @@ p:source-package:
p:doc-package:
extends:
- - .fedora34_sphinx_package
+ - .fedora35_sphinx_package
- .cmake_prep_doc_linux
- .linux_builder_tags_qt
- .cmake_doc_artifacts
@@ -119,16 +119,16 @@ l:iwyu-debian10:
- .linux_builder_tags
- .run_automatically
-l:tidy-fedora34:
+l:tidy-fedora35:
extends:
- - .fedora34_tidy
+ - .fedora35_tidy
- .cmake_build_linux
- .linux_builder_tags_qt
- .run_automatically
-l:sphinx-fedora34:
+l:sphinx-fedora35:
extends:
- - .fedora34_sphinx
+ - .fedora35_sphinx
- .cmake_build_linux
- .linux_builder_tags_qt
- .run_automatically
@@ -136,9 +136,9 @@ l:sphinx-fedora34:
CMAKE_CI_JOB_CONTINUOUS: "true"
CMAKE_CI_JOB_HELP: "true"
-l:clang-analyzer-fedora34:
+l:clang-analyzer-fedora35:
extends:
- - .fedora34_clang_analyzer
+ - .fedora35_clang_analyzer
- .cmake_build_linux
- .linux_builder_tags_qt
- .run_automatically
@@ -207,17 +207,17 @@ t:debian10-makefiles-clang:
variables:
CMAKE_CI_JOB_NIGHTLY: "true"
-t:fedora34-makefiles:
+t:fedora35-makefiles:
extends:
- - .fedora34_makefiles
+ - .fedora35_makefiles
- .cmake_test_linux_release
- .linux_builder_tags_qt
- .run_dependent
- .needs_centos6_x86_64
-t:fedora34-makefiles-nospace:
+t:fedora35-makefiles-nospace:
extends:
- - .fedora34_makefiles
+ - .fedora35_makefiles
- .cmake_test_linux_release
- .linux_builder_tags_qt
- .cmake_junit_artifacts
@@ -225,7 +225,7 @@ t:fedora34-makefiles-nospace:
- .needs_centos6_x86_64
variables:
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake-ci"
- CMAKE_CI_BUILD_NAME: fedora34_makefiles_nospace
+ CMAKE_CI_BUILD_NAME: fedora35_makefiles_nospace
CMAKE_CI_JOB_NIGHTLY: "true"
t:cuda9.2-nvidia:
@@ -267,37 +267,37 @@ t:hip4.2-radeon:
variables:
CMAKE_CI_JOB_NIGHTLY: "true"
-b:fedora34-ninja:
+b:fedora35-ninja:
extends:
- - .fedora34_ninja
+ - .fedora35_ninja
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags_qt
- .run_manually
-t:fedora34-ninja:
+t:fedora35-ninja:
extends:
- - .fedora34_ninja
+ - .fedora35_ninja
- .cmake_test_linux
- .linux_builder_tags_x11
- .cmake_test_artifacts
- .run_dependent
dependencies:
- - b:fedora34-ninja
+ - b:fedora35-ninja
needs:
- - b:fedora34-ninja
+ - b:fedora35-ninja
-t:fedora34-ninja-multi:
+t:fedora35-ninja-multi:
extends:
- - .fedora34_ninja_multi
+ - .fedora35_ninja_multi
- .cmake_test_linux_external
- .linux_builder_tags_qt
- .cmake_junit_artifacts
- .run_dependent
dependencies:
- - t:fedora34-ninja
+ - t:fedora35-ninja
needs:
- - t:fedora34-ninja
+ - t:fedora35-ninja
t:intel2016-makefiles:
extends:
@@ -566,9 +566,9 @@ u:linux-aarch64-package:
## Sanitizer builds
-b:fedora34-asan:
+b:fedora35-asan:
extends:
- - .fedora34_asan
+ - .fedora35_asan
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags_qt
@@ -576,16 +576,16 @@ b:fedora34-asan:
variables:
CMAKE_CI_JOB_NIGHTLY: "true"
-t:fedora34-asan:
+t:fedora35-asan:
extends:
- - .fedora34_asan
+ - .fedora35_asan
- .cmake_memcheck_linux
- .linux_builder_tags_qt
- .run_dependent
dependencies:
- - b:fedora34-asan
+ - b:fedora35-asan
needs:
- - b:fedora34-asan
+ - b:fedora35-asan
variables:
CMAKE_CI_JOB_NIGHTLY: "true"
diff --git a/.gitlab/ci/configure_fedora34_clang_analyzer.cmake b/.gitlab/ci/configure_fedora34_clang_analyzer.cmake
deleted file mode 100644
index e00f8a7..0000000
--- a/.gitlab/ci/configure_fedora34_clang_analyzer.cmake
+++ /dev/null
@@ -1 +0,0 @@
-include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora34_common.cmake")
diff --git a/.gitlab/ci/configure_fedora34_ninja.cmake b/.gitlab/ci/configure_fedora34_ninja.cmake
deleted file mode 100644
index 37bc189..0000000
--- a/.gitlab/ci/configure_fedora34_ninja.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-set(CMake_TEST_ISPC "ON" CACHE STRING "")
-set(CMake_TEST_GUI "ON" CACHE BOOL "")
-
-# Cover compilation with C++11 only and not higher standards.
-set(CMAKE_CXX_STANDARD "11" CACHE STRING "")
-
-include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora34_common.cmake")
diff --git a/.gitlab/ci/configure_fedora34_tidy.cmake b/.gitlab/ci/configure_fedora34_tidy.cmake
deleted file mode 100644
index 9c79303..0000000
--- a/.gitlab/ci/configure_fedora34_tidy.cmake
+++ /dev/null
@@ -1,3 +0,0 @@
-set(CMake_RUN_CLANG_TIDY ON CACHE BOOL "")
-
-include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora34_common.cmake")
diff --git a/.gitlab/ci/configure_fedora34_asan.cmake b/.gitlab/ci/configure_fedora35_asan.cmake
index c22cdb7..84fefad 100644
--- a/.gitlab/ci/configure_fedora34_asan.cmake
+++ b/.gitlab/ci/configure_fedora35_asan.cmake
@@ -1,4 +1,4 @@
set(CMAKE_C_FLAGS "-fsanitize=address" CACHE STRING "")
set(CMAKE_CXX_FLAGS "-fsanitize=address" CACHE STRING "")
-include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora34_common.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora35_common.cmake")
diff --git a/.gitlab/ci/configure_fedora35_clang_analyzer.cmake b/.gitlab/ci/configure_fedora35_clang_analyzer.cmake
new file mode 100644
index 0000000..761a323
--- /dev/null
+++ b/.gitlab/ci/configure_fedora35_clang_analyzer.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora35_common.cmake")
diff --git a/.gitlab/ci/configure_fedora34_common.cmake b/.gitlab/ci/configure_fedora35_common.cmake
index 4484e26..4484e26 100644
--- a/.gitlab/ci/configure_fedora34_common.cmake
+++ b/.gitlab/ci/configure_fedora35_common.cmake
diff --git a/.gitlab/ci/configure_fedora34_makefiles.cmake b/.gitlab/ci/configure_fedora35_makefiles.cmake
index a482378..a482378 100644
--- a/.gitlab/ci/configure_fedora34_makefiles.cmake
+++ b/.gitlab/ci/configure_fedora35_makefiles.cmake
diff --git a/.gitlab/ci/configure_fedora35_ninja.cmake b/.gitlab/ci/configure_fedora35_ninja.cmake
new file mode 100644
index 0000000..e6143b7
--- /dev/null
+++ b/.gitlab/ci/configure_fedora35_ninja.cmake
@@ -0,0 +1,11 @@
+set(CMake_TEST_ISPC "ON" CACHE STRING "")
+set(CMake_TEST_GUI "ON" CACHE BOOL "")
+
+# "Release" flags without "-DNDEBUG" so we get assertions.
+set(CMAKE_C_FLAGS_RELEASE "-O3" CACHE STRING "")
+set(CMAKE_CXX_FLAGS_RELEASE "-O3" CACHE STRING "")
+
+# Cover compilation with C++11 only and not higher standards.
+set(CMAKE_CXX_STANDARD "11" CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora35_common.cmake")
diff --git a/.gitlab/ci/configure_fedora34_ninja_multi.cmake b/.gitlab/ci/configure_fedora35_ninja_multi.cmake
index efb4b84..efb4b84 100644
--- a/.gitlab/ci/configure_fedora34_ninja_multi.cmake
+++ b/.gitlab/ci/configure_fedora35_ninja_multi.cmake
diff --git a/.gitlab/ci/configure_fedora34_sphinx.cmake b/.gitlab/ci/configure_fedora35_sphinx.cmake
index 90d159b..90d159b 100644
--- a/.gitlab/ci/configure_fedora34_sphinx.cmake
+++ b/.gitlab/ci/configure_fedora35_sphinx.cmake
diff --git a/.gitlab/ci/configure_fedora34_sphinx_package.cmake b/.gitlab/ci/configure_fedora35_sphinx_package.cmake
index e839de8..e839de8 100644
--- a/.gitlab/ci/configure_fedora34_sphinx_package.cmake
+++ b/.gitlab/ci/configure_fedora35_sphinx_package.cmake
diff --git a/.gitlab/ci/configure_fedora35_tidy.cmake b/.gitlab/ci/configure_fedora35_tidy.cmake
new file mode 100644
index 0000000..752d241
--- /dev/null
+++ b/.gitlab/ci/configure_fedora35_tidy.cmake
@@ -0,0 +1,3 @@
+set(CMake_RUN_CLANG_TIDY ON CACHE BOOL "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora35_common.cmake")
diff --git a/.gitlab/ci/ctest_memcheck_fedora34_asan.lsan.supp b/.gitlab/ci/ctest_memcheck_fedora35_asan.lsan.supp
index 8ec1a03..8ec1a03 100644
--- a/.gitlab/ci/ctest_memcheck_fedora34_asan.lsan.supp
+++ b/.gitlab/ci/ctest_memcheck_fedora35_asan.lsan.supp
diff --git a/.gitlab/ci/docker/fedora34/Dockerfile b/.gitlab/ci/docker/fedora35/Dockerfile
index af2322d..d1614b4 100644
--- a/.gitlab/ci/docker/fedora34/Dockerfile
+++ b/.gitlab/ci/docker/fedora35/Dockerfile
@@ -1,10 +1,10 @@
-FROM fedora:34 as rvm-build
+FROM fedora:35 as rvm-build
MAINTAINER Ben Boeckel <ben.boeckel@kitware.com>
COPY install_rvm.sh /root/install_rvm.sh
RUN sh /root/install_rvm.sh
-FROM fedora:34
+FROM fedora:35
MAINTAINER Ben Boeckel <ben.boeckel@kitware.com>
COPY install_deps.sh /root/install_deps.sh
diff --git a/.gitlab/ci/docker/fedora34/install_deps.sh b/.gitlab/ci/docker/fedora35/install_deps.sh
index bef3a97..30214af 100755
--- a/.gitlab/ci/docker/fedora34/install_deps.sh
+++ b/.gitlab/ci/docker/fedora35/install_deps.sh
@@ -75,7 +75,7 @@ dnf install --setopt=install_weak_deps=False -y \
libinput-devel systemd-devel \
libjpeg-turbo-devel \
libpng-devel \
- libpq-devel postgresql-server-devel \
+ postgresql-server-devel \
libtiff-devel \
libuv-devel \
libxml2-devel \
diff --git a/.gitlab/ci/docker/fedora34/install_ispc.sh b/.gitlab/ci/docker/fedora35/install_ispc.sh
index fdc14b5..fdc14b5 100755
--- a/.gitlab/ci/docker/fedora34/install_ispc.sh
+++ b/.gitlab/ci/docker/fedora35/install_ispc.sh
diff --git a/.gitlab/ci/docker/fedora34/install_rvm.sh b/.gitlab/ci/docker/fedora35/install_rvm.sh
index fca5104..fca5104 100755
--- a/.gitlab/ci/docker/fedora34/install_rvm.sh
+++ b/.gitlab/ci/docker/fedora35/install_rvm.sh
diff --git a/.gitlab/ci/env_fedora34_asan.sh b/.gitlab/ci/env_fedora35_asan.sh
index e976486..e976486 100644
--- a/.gitlab/ci/env_fedora34_asan.sh
+++ b/.gitlab/ci/env_fedora35_asan.sh
diff --git a/.gitlab/ci/env_fedora34_clang_analyzer.sh b/.gitlab/ci/env_fedora35_clang_analyzer.sh
index d732c0b..d732c0b 100644
--- a/.gitlab/ci/env_fedora34_clang_analyzer.sh
+++ b/.gitlab/ci/env_fedora35_clang_analyzer.sh
diff --git a/.gitlab/ci/env_fedora34_makefiles.cmake b/.gitlab/ci/env_fedora35_makefiles.cmake
index aa84e23..aa84e23 100644
--- a/.gitlab/ci/env_fedora34_makefiles.cmake
+++ b/.gitlab/ci/env_fedora35_makefiles.cmake
diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml
index c831530..a2da7f9 100644
--- a/.gitlab/os-linux.yml
+++ b/.gitlab/os-linux.yml
@@ -5,7 +5,7 @@
### Release
.linux_prep_source:
- image: "fedora:34"
+ image: "fedora:35"
variables:
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
@@ -68,8 +68,8 @@
### Fedora
-.fedora34:
- image: "kitware/cmake:ci-fedora34-x86_64-2021-10-05"
+.fedora35:
+ image: "kitware/cmake:ci-fedora35-x86_64-2022-02-01"
variables:
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci/long file name for testing purposes"
@@ -77,37 +77,37 @@
#### Lint builds
-.fedora34_tidy:
- extends: .fedora34
+.fedora35_tidy:
+ extends: .fedora35
variables:
- CMAKE_CONFIGURATION: fedora34_tidy
+ CMAKE_CONFIGURATION: fedora35_tidy
CTEST_NO_WARNINGS_ALLOWED: 1
CMake_SKIP_INSTALL: 1
-.fedora34_clang_analyzer:
- extends: .fedora34
+.fedora35_clang_analyzer:
+ extends: .fedora35
variables:
- CMAKE_CONFIGURATION: fedora34_clang_analyzer
+ CMAKE_CONFIGURATION: fedora35_clang_analyzer
CMAKE_CI_BUILD_TYPE: Debug
CTEST_NO_WARNINGS_ALLOWED: 1
CMake_SKIP_INSTALL: 1
-.fedora34_sphinx:
- extends: .fedora34
+.fedora35_sphinx:
+ extends: .fedora35
variables:
- CMAKE_CONFIGURATION: fedora34_sphinx
+ CMAKE_CONFIGURATION: fedora35_sphinx
CTEST_NO_WARNINGS_ALLOWED: 1
CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx"
CMake_SKIP_INSTALL: 1
-.fedora34_sphinx_package:
- extends: .fedora34
+.fedora35_sphinx_package:
+ extends: .fedora35
variables:
- CMAKE_CONFIGURATION: fedora34_sphinx_package
+ CMAKE_CONFIGURATION: fedora35_sphinx_package
CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx"
#### Build and test
@@ -126,26 +126,27 @@
CMAKE_CONFIGURATION: debian10_aarch64_ninja
CTEST_NO_WARNINGS_ALLOWED: 1
-.fedora34_ninja:
- extends: .fedora34
+.fedora35_ninja:
+ extends: .fedora35
variables:
- CMAKE_CONFIGURATION: fedora34_ninja
+ CMAKE_CONFIGURATION: fedora35_ninja
+ CMAKE_CI_BUILD_TYPE: Release
CTEST_NO_WARNINGS_ALLOWED: 1
-.fedora34_ninja_multi:
- extends: .fedora34
+.fedora35_ninja_multi:
+ extends: .fedora35
variables:
- CMAKE_CONFIGURATION: fedora34_ninja_multi
+ CMAKE_CONFIGURATION: fedora35_ninja_multi
CTEST_NO_WARNINGS_ALLOWED: 1
CMAKE_GENERATOR: "Ninja Multi-Config"
-.fedora34_makefiles:
- extends: .fedora34
+.fedora35_makefiles:
+ extends: .fedora35
variables:
- CMAKE_CONFIGURATION: fedora34_makefiles
+ CMAKE_CONFIGURATION: fedora35_makefiles
CTEST_NO_WARNINGS_ALLOWED: 1
CMAKE_GENERATOR: "Unix Makefiles"
@@ -177,13 +178,13 @@
CTEST_MEMORYCHECK_TYPE: AddressSanitizer
CTEST_MEMORYCHECK_SANITIZER_OPTIONS: ""
-.fedora34_asan:
+.fedora35_asan:
extends:
- - .fedora34
+ - .fedora35
- .fedora_asan_addon
variables:
- CMAKE_CONFIGURATION: fedora34_asan
+ CMAKE_CONFIGURATION: fedora35_asan
### Intel Compiler
@@ -352,7 +353,7 @@
.cmake_codespell_linux:
stage: build
- extends: .fedora34
+ extends: .fedora35
script:
- codespell
interruptible: true
@@ -482,7 +483,7 @@
.cmake_org_help:
stage: build
extends:
- - .fedora34
+ - .fedora35
- .linux_builder_tags
- .cmake_org_help_artifacts
script:
diff --git a/.gitlab/upload.yml b/.gitlab/upload.yml
index 693388d..dc7da7e 100644
--- a/.gitlab/upload.yml
+++ b/.gitlab/upload.yml
@@ -1,7 +1,7 @@
# Steps for uploading artifacts
.rsync_upload_binary:
- image: "fedora:34"
+ image: "fedora:35"
stage: upload
tags:
- cmake
@@ -20,7 +20,7 @@
.rsync_upload_help:
stage: upload
- image: "fedora:34"
+ image: "fedora:35"
tags:
- cmake
- docker
diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst
index 06da910..08f8d5b 100644
--- a/Help/command/try_compile.rst
+++ b/Help/command/try_compile.rst
@@ -19,10 +19,6 @@ Try Compiling Whole Projects
Try building a project. The success or failure of the ``try_compile``,
i.e. ``TRUE`` or ``FALSE`` respectively, is returned in ``<resultVar>``.
-.. versionadded:: 3.14
- The name of the ``<resultVar>`` is defined by the user. Previously, it had
- a fixed name ``RESULT_VAR``.
-
In this form, ``<srcdir>`` should contain a complete CMake project with a
``CMakeLists.txt`` file and all sources. The ``<bindir>`` and ``<srcdir>``
will not be deleted after this command is run. Specify ``<targetName>`` to
@@ -51,10 +47,6 @@ Try building an executable or static library from one or more source files
variable). The success or failure of the ``try_compile``, i.e. ``TRUE`` or
``FALSE`` respectively, is returned in ``<resultVar>``.
-.. versionadded:: 3.14
- The name of the ``<resultVar>`` is defined by the user. Previously, it had
- a fixed name ``RESULT_VAR``.
-
In this form, one or more source files must be provided. If
:variable:`CMAKE_TRY_COMPILE_TARGET_TYPE` is unset or is set to ``EXECUTABLE``,
the sources must include a definition for ``main`` and CMake will create a
diff --git a/Help/command/try_run.rst b/Help/command/try_run.rst
index 404de98..fc41cdd 100644
--- a/Help/command/try_run.rst
+++ b/Help/command/try_run.rst
@@ -30,11 +30,6 @@ executable was built, but failed to run, then ``<runResultVar>`` will be
set to ``FAILED_TO_RUN``. See the :command:`try_compile` command for
information on how the test project is constructed to build the source file.
-.. versionadded:: 3.14
- The names of the result variables ``<runResultVar>`` and
- ``<compileResultVar>`` are defined by the user. Previously, they had
- fixed names ``RUN_RESULT_VAR`` and ``COMPILE_RESULT_VAR``.
-
The options are:
``CMAKE_FLAGS <flags>...``
diff --git a/Help/release/3.21.rst b/Help/release/3.21.rst
index e1c6172..ae954b2 100644
--- a/Help/release/3.21.rst
+++ b/Help/release/3.21.rst
@@ -334,3 +334,10 @@ Changes made since CMake 3.21.0 include the following.
* The :generator:`Visual Studio 17 2022` generator is now based on the
"Visual Studio 2022" release candidates. Previously it was based on
preview versions.
+
+3.21.5
+------
+
+This version made no changes to documented features or interfaces.
+Some implementation updates were made to support ecosystem changes
+and/or fix regressions.
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 411a1a9..05af822 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -2473,10 +2473,13 @@ function(_ep_add_download_command name)
set(depends)
set(comment)
set(work_dir)
+ set(extra_repo_info)
if(cmd_set)
set(work_dir ${download_dir})
+ set(method custom)
elseif(cvs_repository)
+ set(method cvs)
find_package(CVS QUIET)
if(NOT CVS_EXECUTABLE)
message(FATAL_ERROR "error: could not find cvs for checkout of ${name}")
@@ -2488,22 +2491,13 @@ function(_ep_add_download_command name)
endif()
get_property(cvs_tag TARGET ${name} PROPERTY _EP_CVS_TAG)
-
- set(repository ${cvs_repository})
- set(module ${cvs_module})
- set(tag ${cvs_tag})
- configure_file(
- "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/ExternalProject/RepositoryInfo.txt.in"
- "${stamp_dir}/${name}-cvsinfo.txt"
- @ONLY
- )
-
get_filename_component(src_name "${source_dir}" NAME)
get_filename_component(work_dir "${source_dir}" PATH)
set(comment "Performing download step (CVS checkout) for '${name}'")
set(cmd ${CVS_EXECUTABLE} -d ${cvs_repository} -q co ${cvs_tag} -d ${src_name} ${cvs_module})
- list(APPEND depends ${stamp_dir}/${name}-cvsinfo.txt)
+
elseif(svn_repository)
+ set(method svn)
find_package(Subversion QUIET)
if(NOT Subversion_SVN_EXECUTABLE)
message(FATAL_ERROR "error: could not find svn for checkout of ${name}")
@@ -2514,15 +2508,6 @@ function(_ep_add_download_command name)
get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)
get_property(svn_trust_cert TARGET ${name} PROPERTY _EP_SVN_TRUST_CERT)
- set(repository "${svn_repository} user=${svn_username} password=${svn_password}")
- set(module)
- set(tag ${svn_revision})
- configure_file(
- "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/ExternalProject/RepositoryInfo.txt.in"
- "${stamp_dir}/${name}-svninfo.txt"
- @ONLY
- )
-
get_filename_component(src_name "${source_dir}" NAME)
get_filename_component(work_dir "${source_dir}" PATH)
set(comment "Performing download step (SVN checkout) for '${name}'")
@@ -2538,8 +2523,9 @@ function(_ep_add_download_command name)
endif()
set(cmd ${Subversion_SVN_EXECUTABLE} co ${svn_repository} ${svn_revision}
--non-interactive ${svn_trust_cert_args} ${svn_user_pw_args} ${src_name})
- list(APPEND depends ${stamp_dir}/${name}-svninfo.txt)
+
elseif(git_repository)
+ set(method git)
# FetchContent gives us these directly, so don't try to recompute them
if(NOT GIT_EXECUTABLE OR NOT GIT_VERSION_STRING)
unset(CMAKE_MODULE_PATH) # Use CMake builtin find module
@@ -2584,21 +2570,21 @@ function(_ep_add_download_command name)
list(PREPEND git_config advice.detachedHead=false)
endif()
- # For the download step, and the git clone operation, only the repository
- # should be recorded in a configured RepositoryInfo file. If the repo
- # changes, the clone script should be run again. But if only the tag
- # changes, avoid running the clone script again. Let the 'always' running
- # update step checkout the new tag.
+ # The command doesn't expose any details, so we need to record additional
+ # information in the RepositoryInfo.txt file. For the download step, only
+ # the things specifically affecting the clone operation should be recorded.
+ # If the repo changes, the clone script should be run again.
+ # But if only the tag changes, avoid running the clone script again.
+ # Let the 'always' running update step checkout the new tag.
#
- set(repository ${git_repository})
- set(module)
- set(tag ${git_remote_name})
- configure_file(
- "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/ExternalProject/RepositoryInfo.txt.in"
- "${stamp_dir}/${name}-gitinfo.txt"
- @ONLY
- )
-
+ set(extra_repo_info
+"repository=${git_repository}
+remote=${git_remote_name}
+init_submodules=${git_init_submodules}
+recurse_submodules=${git_submodules_recurse}
+submodules=${git_submodules}
+CMP0097=${_EP_CMP0097}
+")
get_filename_component(src_name "${source_dir}" NAME)
get_filename_component(work_dir "${source_dir}" PATH)
@@ -2612,8 +2598,9 @@ function(_ep_add_download_command name)
)
set(comment "Performing download step (git clone) for '${name}'")
set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-gitclone.cmake)
- list(APPEND depends ${stamp_dir}/${name}-gitinfo.txt)
+
elseif(hg_repository)
+ set(method hg)
find_package(Hg QUIET)
if(NOT HG_EXECUTABLE)
message(FATAL_ERROR "error: could not find hg for clone of ${name}")
@@ -2624,21 +2611,14 @@ function(_ep_add_download_command name)
set(hg_tag "tip")
endif()
- # For the download step, and the hg clone operation, only the repository
- # should be recorded in a configured RepositoryInfo file. If the repo
- # changes, the clone script should be run again. But if only the tag
- # changes, avoid running the clone script again. Let the 'always' running
- # update step checkout the new tag.
+ # The command doesn't expose any details, so we need to record additional
+ # information in the RepositoryInfo.txt file. For the download step, only
+ # the things specifically affecting the clone operation should be recorded.
+ # If the repo changes, the clone script should be run again.
+ # But if only the tag changes, avoid running the clone script again.
+ # Let the 'always' running update step checkout the new tag.
#
- set(repository ${hg_repository})
- set(module)
- set(tag)
- configure_file(
- "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/ExternalProject/RepositoryInfo.txt.in"
- "${stamp_dir}/${name}-hginfo.txt"
- @ONLY
- )
-
+ set(extra_repo_info "repository=${hg_repository}")
get_filename_component(src_name "${source_dir}" NAME)
get_filename_component(work_dir "${source_dir}" PATH)
@@ -2652,8 +2632,9 @@ function(_ep_add_download_command name)
)
set(comment "Performing download step (hg clone) for '${name}'")
set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-hgclone.cmake)
- list(APPEND depends ${stamp_dir}/${name}-hginfo.txt)
+
elseif(url)
+ set(method url)
get_filename_component(work_dir "${source_dir}" PATH)
get_property(hash TARGET ${name} PROPERTY _EP_URL_HASH)
_ep_get_hash_regex(_ep_hash_regex)
@@ -2671,15 +2652,10 @@ function(_ep_add_download_command name)
if(md5 AND NOT hash)
set(hash "MD5=${md5}")
endif()
- set(repository "external project URL")
- set(module "${url}")
- set(tag "${hash}")
- configure_file(
- "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/ExternalProject/RepositoryInfo.txt.in"
- "${stamp_dir}/${name}-urlinfo.txt"
- @ONLY
- )
- list(APPEND depends ${stamp_dir}/${name}-urlinfo.txt)
+ set(extra_repo_info
+"url(s)=${url}
+hash=${hash}
+")
list(LENGTH url url_list_length)
if(NOT "${url_list_length}" STREQUAL "1")
@@ -2700,6 +2676,7 @@ function(_ep_add_download_command name)
COMMAND ${CMAKE_COMMAND} -E copy_directory ${abs_dir} ${source_dir})
else()
get_property(no_extract TARGET "${name}" PROPERTY _EP_DOWNLOAD_NO_EXTRACT)
+ string(APPEND extra_repo_info "no_extract=${no_extract}\n")
if("${url}" MATCHES "^[a-z]+://")
# TODO: Should download and extraction be different steps?
if("x${fname}" STREQUAL "x")
@@ -2754,6 +2731,11 @@ function(_ep_add_download_command name)
endif ()
set(comment "Performing download step (${steps}) for '${name}'")
file(WRITE "${stamp_dir}/verify-${name}.cmake" "") # already verified by 'download_script'
+
+ # Rather than adding everything to the RepositoryInfo.txt file, it is
+ # more robust to just depend on the download script. That way, we will
+ # re-download if any aspect of the download changes.
+ list(APPEND depends "${download_script}")
else()
set(file "${url}")
if (no_extract)
@@ -2782,6 +2764,7 @@ function(_ep_add_download_command name)
endif ()
endif()
else()
+ set(method source_dir)
_ep_is_dir_empty("${source_dir}" empty)
if(${empty})
message(SEND_ERROR
@@ -2799,6 +2782,17 @@ function(_ep_add_download_command name)
endif()
endif()
+ # We use configure_file() to write the repo_info_file so that the file's
+ # timestamp is not updated if we don't change the contents
+
+ set(repo_info_file ${stamp_dir}/${name}-${method}info.txt)
+ list(APPEND depends ${repo_info_file})
+ configure_file(
+ "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/ExternalProject/RepositoryInfo.txt.in"
+ "${repo_info_file}"
+ @ONLY
+ )
+
get_property(log TARGET ${name} PROPERTY _EP_LOG_DOWNLOAD)
if(log)
set(log LOG 1)
diff --git a/Modules/ExternalProject/RepositoryInfo.txt.in b/Modules/ExternalProject/RepositoryInfo.txt.in
index df8e322..b81850f 100644
--- a/Modules/ExternalProject/RepositoryInfo.txt.in
+++ b/Modules/ExternalProject/RepositoryInfo.txt.in
@@ -1,3 +1,9 @@
-repository='@repository@'
-module='@module@'
-tag='@tag@'
+# This is a generated file and its contents are an internal implementation detail.
+# The download step will be re-executed if anything in this file changes.
+# No other meaning or use of this file is supported.
+
+method=@method@
+command=@cmd@
+source_dir=@source_dir@
+work_dir=@work_dir@
+@extra_repo_info@
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 6e07da5..9123d56 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -1050,8 +1050,12 @@ if (HDF5_FOUND)
else()
if (DEFINED "HDF5_${hdf5_target_name}_LIBRARY")
set(_hdf5_location "${HDF5_${hdf5_target_name}_LIBRARY}")
+ set(_hdf5_location_release "${HDF5_${hdf5_target_name}_LIBRARY_RELEASE}")
+ set(_hdf5_location_debug "${HDF5_${hdf5_target_name}_LIBRARY_DEBUG}")
elseif (DEFINED "HDF5_${hdf5_lang}_LIBRARY")
set(_hdf5_location "${HDF5_${hdf5_lang}_LIBRARY}")
+ set(_hdf5_location_release "${HDF5_${hdf5_lang}_LIBRARY_RELEASE}")
+ set(_hdf5_location_debug "${HDF5_${hdf5_lang}_LIBRARY_DEBUG}")
elseif (DEFINED "HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}")
set(_hdf5_location "${HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}}")
else ()
@@ -1066,10 +1070,24 @@ if (HDF5_FOUND)
set(HDF5_${hdf5_lang}_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS})
endif ()
set_target_properties("hdf5::${hdf5_target_name}" PROPERTIES
- IMPORTED_LOCATION "${_hdf5_location}"
- IMPORTED_IMPLIB "${_hdf5_location}"
INTERFACE_INCLUDE_DIRECTORIES "${HDF5_${hdf5_lang}_INCLUDE_DIRS}"
INTERFACE_COMPILE_DEFINITIONS "${_hdf5_definitions}")
+ if (_hdf5_location_release)
+ set_property(TARGET "hdf5::${hdf5_target_name}" APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_property(TARGET "hdf5::${hdf5_target_name}" PROPERTY
+ IMPORTED_LOCATION_RELEASE "${_hdf5_location_release}")
+ endif()
+ if (_hdf5_location_debug)
+ set_property(TARGET "hdf5::${hdf5_target_name}" APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_property(TARGET "hdf5::${hdf5_target_name}" PROPERTY
+ IMPORTED_LOCATION_DEBUG "${_hdf5_location_debug}")
+ endif()
+ if (NOT _hdf5_location_release AND NOT _hdf5_location_debug)
+ set_property(TARGET "hdf5::${hdf5_target_name}" PROPERTY
+ IMPORTED_LOCATION "${_hdf5_location}")
+ endif()
if (_hdf5_libtype STREQUAL "SHARED")
set_property(TARGET "hdf5::${hdf5_target_name}" APPEND
PROPERTY
@@ -1082,6 +1100,8 @@ if (HDF5_FOUND)
unset(_hdf5_definitions)
unset(_hdf5_libtype)
unset(_hdf5_location)
+ unset(_hdf5_location_release)
+ unset(_hdf5_location_debug)
endif ()
endif ()
@@ -1111,8 +1131,12 @@ if (HDF5_FOUND)
else()
if (DEFINED "HDF5_${hdf5_target_name}_LIBRARY")
set(_hdf5_location "${HDF5_${hdf5_target_name}_LIBRARY}")
+ set(_hdf5_location_release "${HDF5_${hdf5_target_name}_LIBRARY_RELEASE}")
+ set(_hdf5_location_debug "${HDF5_${hdf5_target_name}_LIBRARY_DEBUG}")
elseif (DEFINED "HDF5_${hdf5_lang}_HL_LIBRARY")
set(_hdf5_location "${HDF5_${hdf5_lang}_HL_LIBRARY}")
+ set(_hdf5_location_release "${HDF5_${hdf5_lang}_HL_LIBRARY_RELEASE}")
+ set(_hdf5_location_debug "${HDF5_${hdf5_lang}_HL_LIBRARY_DEBUG}")
elseif (DEFINED "HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}")
set(_hdf5_location "${HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}}")
elseif (hdf5_alt_target_name AND DEFINED "HDF5_${hdf5_lang}_LIBRARY_${hdf5_alt_target_name}")
@@ -1126,10 +1150,24 @@ if (HDF5_FOUND)
add_library("hdf5::${hdf5_target_name}" UNKNOWN IMPORTED)
string(REPLACE "-D" "" _hdf5_definitions "${HDF5_${hdf5_lang}_HL_DEFINITIONS}")
set_target_properties("hdf5::${hdf5_target_name}" PROPERTIES
- IMPORTED_LOCATION "${_hdf5_location}"
- IMPORTED_IMPLIB "${_hdf5_location}"
INTERFACE_INCLUDE_DIRECTORIES "${HDF5_${hdf5_lang}_HL_INCLUDE_DIRS}"
INTERFACE_COMPILE_DEFINITIONS "${_hdf5_definitions}")
+ if (_hdf5_location_release)
+ set_property(TARGET "hdf5::${hdf5_target_name}" APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_property(TARGET "hdf5::${hdf5_target_name}" PROPERTY
+ IMPORTED_LOCATION_RELEASE "${_hdf5_location_release}")
+ endif()
+ if (_hdf5_location_debug)
+ set_property(TARGET "hdf5::${hdf5_target_name}" APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_property(TARGET "hdf5::${hdf5_target_name}" PROPERTY
+ IMPORTED_LOCATION_DEBUG "${_hdf5_location_debug}")
+ endif()
+ if (NOT _hdf5_location_release AND NOT _hdf5_location_debug)
+ set_property(TARGET "hdf5::${hdf5_target_name}" PROPERTY
+ IMPORTED_LOCATION "${_hdf5_location}")
+ endif()
if (_hdf5_libtype STREQUAL "SHARED")
set_property(TARGET "hdf5::${hdf5_target_name}" APPEND
PROPERTY
diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake
index 759f57c..a80758d 100644
--- a/Modules/FindRuby.cmake
+++ b/Modules/FindRuby.cmake
@@ -8,7 +8,7 @@ FindRuby
Find Ruby
This module finds if Ruby is installed and determines where the
-include files and libraries are. Ruby 1.8 through 2.7 are
+include files and libraries are. Ruby 1.8 through 3.1 are
supported.
The minimum required version of Ruby can be specified using the
@@ -139,13 +139,13 @@ set(Ruby_FIND_VERSION_SHORT_NODOT "${Ruby_FIND_VERSION_MAJOR}${Ruby_FIND_VERSION
# Set name of possible executables, ignoring the minor
# Eg:
-# 2.1.1 => from ruby27 to ruby21 included
-# 2.1 => from ruby27 to ruby21 included
-# 2 => from ruby26 to ruby20 included
-# empty => from ruby27 to ruby18 included
+# 2.1.1 => from ruby31 to ruby21 included
+# 2.1 => from ruby31 to ruby21 included
+# 2 => from ruby31 to ruby20 included
+# empty => from ruby31 to ruby18 included
if(NOT Ruby_FIND_VERSION_EXACT)
- foreach(_ruby_version RANGE 27 18 -1)
+ foreach(_ruby_version RANGE 31 18 -1)
string(SUBSTRING "${_ruby_version}" 0 1 _ruby_major_version)
string(SUBSTRING "${_ruby_version}" 1 1 _ruby_minor_version)
@@ -266,9 +266,20 @@ while(1)
_RUBY_VALIDATE_INTERPRETER (${Ruby_FIND_VERSION})
if (Ruby_EXECUTABLE)
break()
+ else()
+ # Remove first entry from names list.
+ LIST(REMOVE_AT _Ruby_POSSIBLE_EXECUTABLE_NAMES 0)
+
+ # If the list is now empty, abort.
+ if (NOT _Ruby_POSSIBLE_EXECUTABLE_NAMES)
+ break()
+ else()
+ # Otherwise, continue with the remaining list. Make sure that we clear
+ # the cached variable.
+ unset(Ruby_EXECUTABLE CACHE)
+ endif()
endif()
- break()
endwhile()
if(Ruby_EXECUTABLE AND NOT Ruby_VERSION_MAJOR)
@@ -398,6 +409,16 @@ if(Ruby_EXECUTABLE AND NOT Ruby_VERSION_MAJOR)
set(Ruby_VERSION_MAJOR 2)
set(Ruby_VERSION_MINOR 7)
endif()
+ # check whether we found 3.0.x
+ if(${Ruby_EXECUTABLE} MATCHES "ruby3\\.?0")
+ set(Ruby_VERSION_MAJOR 3)
+ set(Ruby_VERSION_MINOR 0)
+ endif()
+ # check whether we found 3.1.x
+ if(${Ruby_EXECUTABLE} MATCHES "ruby3\\.?1")
+ set(Ruby_VERSION_MAJOR 3)
+ set(Ruby_VERSION_MINOR 1)
+ endif()
endif()
if(Ruby_VERSION_MAJOR)
diff --git a/Modules/Internal/CPack/NSIS.template.in b/Modules/Internal/CPack/NSIS.template.in
index 8a0c972..e3abf22 100644
--- a/Modules/Internal/CPack/NSIS.template.in
+++ b/Modules/Internal/CPack/NSIS.template.in
@@ -531,7 +531,6 @@ FunctionEnd
@CPACK_NSIS_INSTALLER_ICON_CODE@
@CPACK_NSIS_INSTALLER_MUI_WELCOMEFINISH_CODE@
@CPACK_NSIS_INSTALLER_MUI_UNWELCOMEFINISH_CODE@
-@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
@CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@
;--------------------------------
@@ -648,7 +647,7 @@ FunctionEnd
;--------------------------------
; Component sections
@CPACK_NSIS_COMPONENT_SECTIONS@
-
+@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
;--------------------------------
;Installer Sections
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 3b23899..a661c20 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 22)
-set(CMake_VERSION_PATCH 20220131)
+set(CMake_VERSION_PATCH 20220202)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index a123e44..efc4e3a 100644
--- a/Source/cmFindBase.cxx
+++ b/Source/cmFindBase.cxx
@@ -168,7 +168,7 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
}
this->ExpandPaths();
- this->ComputeFinalPaths();
+ this->ComputeFinalPaths(IgnorePaths::Yes);
return true;
}
diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx
index 7631583..c58db1e 100644
--- a/Source/cmFindCommon.cxx
+++ b/Source/cmFindCommon.cxx
@@ -283,14 +283,15 @@ void cmFindCommon::RerootPaths(std::vector<std::string>& paths)
void cmFindCommon::GetIgnoredPaths(std::vector<std::string>& ignore)
{
- // null-terminated list of paths.
- static const char* paths[] = { "CMAKE_SYSTEM_IGNORE_PATH",
- "CMAKE_IGNORE_PATH", nullptr };
+ static constexpr const char* paths[] = {
+ "CMAKE_SYSTEM_IGNORE_PATH",
+ "CMAKE_IGNORE_PATH",
+ };
// Construct the list of path roots with no trailing slashes.
- for (const char** pathName = paths; *pathName; ++pathName) {
+ for (const char* pathName : paths) {
// Get the list of paths to ignore from the variable.
- this->Makefile->GetDefExpandList(*pathName, ignore);
+ this->Makefile->GetDefExpandList(pathName, ignore);
}
for (std::string& i : ignore) {
@@ -365,11 +366,13 @@ static void AddTrailingSlash(std::string& s)
s += '/';
}
}
-void cmFindCommon::ComputeFinalPaths()
+void cmFindCommon::ComputeFinalPaths(IgnorePaths ignorePaths)
{
// Filter out ignored paths from the prefix list
std::set<std::string> ignored;
- this->GetIgnoredPaths(ignored);
+ if (ignorePaths == IgnorePaths::Yes) {
+ this->GetIgnoredPaths(ignored);
+ }
// Combine the separate path types, filtering out ignores
this->SearchPaths.clear();
diff --git a/Source/cmFindCommon.h b/Source/cmFindCommon.h
index 1a49aff..49d64e4 100644
--- a/Source/cmFindCommon.h
+++ b/Source/cmFindCommon.h
@@ -82,12 +82,17 @@ protected:
/** Place a set of search paths under the search roots. */
void RerootPaths(std::vector<std::string>& paths);
- /** Get ignored paths from CMAKE_[SYSTEM_]IGNORE_path variables. */
+ /** Get ignored paths from CMAKE_[SYSTEM_]IGNORE_PATH variables. */
void GetIgnoredPaths(std::vector<std::string>& ignore);
void GetIgnoredPaths(std::set<std::string>& ignore);
/** Compute final search path list (reroot + trailing slash). */
- void ComputeFinalPaths();
+ enum class IgnorePaths
+ {
+ No,
+ Yes,
+ };
+ void ComputeFinalPaths(IgnorePaths ignorePaths);
/** Compute the current default root path mode. */
void SelectDefaultRootPathMode();
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 6d788e4..c468a3c 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -1346,7 +1346,7 @@ void cmFindPackageCommand::ComputePrefixes()
}
this->FillPrefixesUserGuess();
- this->ComputeFinalPaths();
+ this->ComputeFinalPaths(IgnorePaths::No);
}
void cmFindPackageCommand::FillPrefixesPackageRoot()
@@ -2286,6 +2286,15 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in)
return false;
}
+ // Skip this if it's in ignored paths.
+ std::string prefixWithoutSlash = prefix_in;
+ if (prefixWithoutSlash != "/" && prefixWithoutSlash.back() == '/') {
+ prefixWithoutSlash.erase(prefixWithoutSlash.length() - 1);
+ }
+ if (this->IgnoredPaths.count(prefixWithoutSlash)) {
+ return false;
+ }
+
// PREFIX/ (useful on windows or in build trees)
if (this->SearchDirectory(prefix_in)) {
return true;
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f325994..be46825 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -928,6 +928,7 @@ void cmVisualStudio10TargetGenerator::WriteSdkStyleProjectFile(
this->WriteDotNetDocumentationFile(e0);
this->WriteAllSources(e0);
+ this->WriteDotNetReferences(e0);
this->WritePackageReferences(e0);
this->WriteProjectReferences(e0);
}
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx
index 21d6f04..487da8d 100644
--- a/Source/kwsys/testSystemTools.cxx
+++ b/Source/kwsys/testSystemTools.cxx
@@ -336,7 +336,7 @@ static bool CheckFileOperations()
// While we're at it, check proper TestFileAccess functionality.
bool do_write_test = true;
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
- defined(__NetBSD__) || defined(__DragonFly__)
+ defined(__NetBSD__) || defined(__DragonFly__) || defined(__HOS_AIX__)
// If we are running as root on POSIX-ish systems (Linux and the BSDs,
// at least), ignore this check, as root can always write to files.
do_write_test = (getuid() != 0);
diff --git a/Tests/FindBoost/TestPython/CMakeLists.txt b/Tests/FindBoost/TestPython/CMakeLists.txt
index 6d292cd..8ef18e9 100644
--- a/Tests/FindBoost/TestPython/CMakeLists.txt
+++ b/Tests/FindBoost/TestPython/CMakeLists.txt
@@ -2,10 +2,10 @@ cmake_minimum_required(VERSION 3.14)
project(TestFindBoostPython CXX)
include(CTest)
-find_package(Boost OPTIONAL_COMPONENTS python27 python34 python35 python36 python37 python38 python39)
+find_package(Boost OPTIONAL_COMPONENTS python27 python34 python35 python36 python37 python38 python39 python310)
set(FAILTEST TRUE)
-foreach (v IN ITEMS 27 34 35 36 37 38 39)
+foreach (v IN ITEMS 27 34 35 36 37 38 39 310)
if (Boost_PYTHON${v}_FOUND)
set(FAILTEST FALSE)
break()
diff --git a/Tests/RunCMake/ExternalProject/MultiCommand.cmake b/Tests/RunCMake/ExternalProject/MultiCommand.cmake
index 0849658..3e8bd94 100644
--- a/Tests/RunCMake/ExternalProject/MultiCommand.cmake
+++ b/Tests/RunCMake/ExternalProject/MultiCommand.cmake
@@ -1,5 +1,12 @@
include(ExternalProject)
+# Force all steps to be re-run by removing timestamps from any previous run.
+# This has to happen before we call ExternalProject_Add() because that command
+# writes some files to the stamp directory for recording repository details.
+set(STAMP_DIR ${CMAKE_BINARY_DIR}/multiCommand-prefix/src/multiCommand-stamp)
+file(REMOVE_RECURSE "${STAMP_DIR}")
+file(MAKE_DIRECTORY "${STAMP_DIR}")
+
# Verify COMMAND keyword is recognized after various *_COMMAND options
ExternalProject_Add(multiCommand
DOWNLOAD_COMMAND "${CMAKE_COMMAND}" -E echo "download 1"
@@ -17,8 +24,3 @@ ExternalProject_Add(multiCommand
INSTALL_COMMAND "${CMAKE_COMMAND}" -E echo "install 1"
COMMAND "${CMAKE_COMMAND}" -E echo "install 2"
)
-
-# Force all steps to be re-run by removing timestamps from any previous run
-ExternalProject_Get_Property(multiCommand STAMP_DIR)
-file(REMOVE_RECURSE "${STAMP_DIR}")
-file(MAKE_DIRECTORY "${STAMP_DIR}")
diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
index 48f8b23..fde384f 100644
--- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
@@ -61,6 +61,23 @@ if(NOT XCODE_VERSION OR XCODE_VERSION VERSION_LESS 12)
endif()
run_steps_CMP0114(NEW)
+function(__ep_test_source_dir_change)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SourceDirChange-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ run_cmake(SourceDirChange)
+ run_cmake_command(SourceDirChange-build1 ${CMAKE_COMMAND} --build .)
+ # Because some file systems have timestamps with only one second resolution,
+ # we have to ensure we don't re-run the configure stage too quickly after the
+ # first build. Otherwise, the modified RepositoryInfo.txt files the next
+ # configure writes might still have the same timestamp as the previous one.
+ execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1.125)
+ run_cmake_command(SourceDirChange-change ${CMAKE_COMMAND} -DSOURCE_DIR_CHANGE=YES .)
+ run_cmake_command(SourceDirChange-build2 ${CMAKE_COMMAND} --build .)
+endfunction()
+__ep_test_source_dir_change()
+
# Run both cmake and build steps. We always do a clean before the
# build to ensure that the download step re-runs each time.
function(__ep_test_with_build testName)
diff --git a/Tests/RunCMake/ExternalProject/SourceDirChange-build2-stdout.txt b/Tests/RunCMake/ExternalProject/SourceDirChange-build2-stdout.txt
new file mode 100644
index 0000000..22dac9d
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/SourceDirChange-build2-stdout.txt
@@ -0,0 +1 @@
+Download command executed
diff --git a/Tests/RunCMake/ExternalProject/SourceDirChange.cmake b/Tests/RunCMake/ExternalProject/SourceDirChange.cmake
new file mode 100644
index 0000000..62213cd
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/SourceDirChange.cmake
@@ -0,0 +1,20 @@
+include(ExternalProject)
+
+file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/first")
+file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/second")
+
+if("${SOURCE_DIR_CHANGE}" STREQUAL "")
+ set(source_dir first)
+else()
+ set(source_dir second)
+endif()
+
+ExternalProject_Add(source_dir_change
+ SOURCE_DIR "${CMAKE_BINARY_DIR}/${source_dir}"
+ DOWNLOAD_COMMAND "${CMAKE_COMMAND}" -E echo "Download command executed"
+ UPDATE_COMMAND ""
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ TEST_COMMAND ""
+ INSTALL_COMMAND ""
+)
diff --git a/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake b/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake
index 60066ab..c585f5e 100644
--- a/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake
+++ b/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake
@@ -15,4 +15,7 @@ add_executable(DotNetSdk csharponly.cs)
target_link_libraries(DotNetSdk dotNetSdkLib1)
set_target_properties(DotNetSdk
PROPERTIES
- VS_GLOBAL_RuntimeIdentifier win10-x64)
+ VS_GLOBAL_RuntimeIdentifier win10-x64
+
+ VS_DOTNET_REFERENCE_SomeDll
+ ${PROJECT_SOURCE_DIR}/SomeDll.dll)
diff --git a/Tests/RunCMake/find_package/IgnorePath.cmake b/Tests/RunCMake/find_package/IgnorePath.cmake
new file mode 100644
index 0000000..f40549b
--- /dev/null
+++ b/Tests/RunCMake/find_package/IgnorePath.cmake
@@ -0,0 +1,12 @@
+set(CMAKE_PREFIX_PATH
+ ${CMAKE_SOURCE_DIR}/PackageRoot/foo/cmake_root
+ ${CMAKE_SOURCE_DIR}/PackageRoot/foo/env_root
+ )
+set(CMAKE_IGNORE_PATH
+ ${CMAKE_SOURCE_DIR}/PackageRoot//foo/cmake_root// # Test double slashes
+ ${CMAKE_SOURCE_DIR}/PackageRoot/foo/env_root/cmake
+ )
+find_package(Bar QUIET CONFIG)
+if(Bar_FOUND)
+ message(FATAL_ERROR "Bar should not be found, was found in ${Bar_DIR}")
+endif()
diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake
index 2bace98..12701dc 100644
--- a/Tests/RunCMake/find_package/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake
@@ -44,6 +44,7 @@ run_cmake(VersionRangeConfig2)
run_cmake(VersionRangeConfig02)
run_cmake(VersionRangeConfigStd)
run_cmake(VersionRangeConfigStd2)
+run_cmake(IgnorePath)
if(UNIX
AND NOT MSYS # FIXME: This works on CYGWIN but not on MSYS
)
diff --git a/Utilities/Scripts/update-expat.bash b/Utilities/Scripts/update-expat.bash
index 53449d0..2ff3c59 100755
--- a/Utilities/Scripts/update-expat.bash
+++ b/Utilities/Scripts/update-expat.bash
@@ -8,7 +8,7 @@ readonly name="expat"
readonly ownership="Expat Upstream <kwrobot@kitware.com>"
readonly subtree="Utilities/cmexpat"
readonly repo="https://github.com/libexpat/libexpat.git"
-readonly tag="R_2_4_3"
+readonly tag="R_2_4_4"
readonly shortlog=false
readonly paths="
expat/lib/asciitab.h
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt
index 165d557..073e5ff 100644
--- a/Utilities/Sphinx/CMakeLists.txt
+++ b/Utilities/Sphinx/CMakeLists.txt
@@ -9,6 +9,7 @@ if(NOT CMake_SOURCE_DIR)
include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)
include(${CMake_SOURCE_DIR}/Source/CMakeVersion.cmake)
include(${CMake_SOURCE_DIR}/Source/CMakeInstallDestinations.cmake)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake @ONLY)
unset(CMAKE_DATA_DIR)
unset(CMAKE_DATA_DIR CACHE)
macro(CMake_OPTIONAL_COMPONENT)
diff --git a/Utilities/Sphinx/CTestCustom.cmake.in b/Utilities/Sphinx/CTestCustom.cmake.in
new file mode 100644
index 0000000..840121b
--- /dev/null
+++ b/Utilities/Sphinx/CTestCustom.cmake.in
@@ -0,0 +1,3 @@
+list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
+ "cmake.texi:[0-9]+: warning: .definfoenclose is obsolete"
+ )
diff --git a/Utilities/cmexpat/README.md b/Utilities/cmexpat/README.md
index 6fdd614..00e6cca 100644
--- a/Utilities/cmexpat/README.md
+++ b/Utilities/cmexpat/README.md
@@ -5,7 +5,7 @@
[![Downloads GitHub](https://img.shields.io/github/downloads/libexpat/libexpat/total?label=Downloads%20GitHub)](https://github.com/libexpat/libexpat/releases)
-# Expat, Release 2.4.3
+# Expat, Release 2.4.4
This is Expat, a C library for parsing XML, started by
[James Clark](https://en.wikipedia.org/wiki/James_Clark_%28programmer%29) in 1997.
diff --git a/Utilities/cmexpat/lib/expat.h b/Utilities/cmexpat/lib/expat.h
index 0f021e2..4c5704f 100644
--- a/Utilities/cmexpat/lib/expat.h
+++ b/Utilities/cmexpat/lib/expat.h
@@ -1041,7 +1041,7 @@ XML_SetBillionLaughsAttackProtectionActivationThreshold(
*/
#define XML_MAJOR_VERSION 2
#define XML_MINOR_VERSION 4
-#define XML_MICRO_VERSION 3
+#define XML_MICRO_VERSION 4
#ifdef __cplusplus
}
diff --git a/Utilities/cmexpat/lib/xmlparse.c b/Utilities/cmexpat/lib/xmlparse.c
index b2f5fc6..4b43e61 100644
--- a/Utilities/cmexpat/lib/xmlparse.c
+++ b/Utilities/cmexpat/lib/xmlparse.c
@@ -1,4 +1,4 @@
-/* 9ca2a2fedc35bcb13ba9a134ba5e173020bc2ff5f5a311abf742cec7da1ff26a (2.4.3+)
+/* 2e2c8ce5f11a473d65ec313ab20ceee6afefb355f5405afc06e7204e2e41c8c0 (2.4.4+)
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
@@ -33,6 +33,7 @@
Copyright (c) 2019-2020 Ben Wagner <bungeman@chromium.org>
Copyright (c) 2019 Vadim Zeitlin <vadim@zeitlins.org>
Copyright (c) 2021 Dong-hee Na <donghee.na@python.org>
+ Copyright (c) 2022 Samanta Navarro <ferivoz@riseup.net>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
@@ -974,7 +975,7 @@ parserCreate(const XML_Char *encodingName,
if (memsuite) {
XML_Memory_Handling_Suite *mtemp;
- parser = (XML_Parser)memsuite->malloc_fcn(sizeof(struct XML_ParserStruct));
+ parser = memsuite->malloc_fcn(sizeof(struct XML_ParserStruct));
if (parser != NULL) {
mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
mtemp->malloc_fcn = memsuite->malloc_fcn;
@@ -2067,6 +2068,11 @@ XML_GetBuffer(XML_Parser parser, int len) {
keep = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer);
if (keep > XML_CONTEXT_BYTES)
keep = XML_CONTEXT_BYTES;
+ /* Detect and prevent integer overflow */
+ if (keep > INT_MAX - neededSize) {
+ parser->m_errorCode = XML_ERROR_NO_MEMORY;
+ return NULL;
+ }
neededSize += keep;
#endif /* defined XML_CONTEXT_BYTES */
if (neededSize
@@ -4092,7 +4098,7 @@ initializeEncoding(XML_Parser parser) {
const char *s;
#ifdef XML_UNICODE
char encodingBuf[128];
- /* See comments abount `protoclEncodingName` in parserInit() */
+ /* See comments about `protocolEncodingName` in parserInit() */
if (! parser->m_protocolEncodingName)
s = NULL;
else {
@@ -5367,7 +5373,7 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end,
if (dtd->in_eldecl) {
ELEMENT_TYPE *el;
const XML_Char *name;
- int nameLen;
+ size_t nameLen;
const char *nxt
= (quant == XML_CQUANT_NONE ? next : next - enc->minBytesPerChar);
int myindex = nextScaffoldPart(parser);
@@ -5383,7 +5389,13 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end,
nameLen = 0;
for (; name[nameLen++];)
;
- dtd->contentStringLen += nameLen;
+
+ /* Detect and prevent integer overflow */
+ if (nameLen > UINT_MAX - dtd->contentStringLen) {
+ return XML_ERROR_NO_MEMORY;
+ }
+
+ dtd->contentStringLen += (unsigned)nameLen;
if (parser->m_elementDeclHandler)
handleDefault = XML_FALSE;
}
@@ -6536,7 +6548,7 @@ normalizePublicId(XML_Char *publicId) {
static DTD *
dtdCreate(const XML_Memory_Handling_Suite *ms) {
- DTD *p = (DTD *)ms->malloc_fcn(sizeof(DTD));
+ DTD *p = ms->malloc_fcn(sizeof(DTD));
if (p == NULL)
return p;
poolInit(&(p->pool), ms);
@@ -6709,8 +6721,8 @@ dtdCopy(XML_Parser oldParser, DTD *newDtd, const DTD *oldDtd,
if (! newE)
return 0;
if (oldE->nDefaultAtts) {
- newE->defaultAtts = (DEFAULT_ATTRIBUTE *)ms->malloc_fcn(
- oldE->nDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
+ newE->defaultAtts
+ = ms->malloc_fcn(oldE->nDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
if (! newE->defaultAtts) {
return 0;
}
@@ -6872,7 +6884,7 @@ lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) {
/* table->size is a power of 2 */
table->size = (size_t)1 << INIT_POWER;
tsize = table->size * sizeof(NAMED *);
- table->v = (NAMED **)table->mem->malloc_fcn(tsize);
+ table->v = table->mem->malloc_fcn(tsize);
if (! table->v) {
table->size = 0;
return NULL;
@@ -6912,7 +6924,7 @@ lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) {
}
size_t tsize = newSize * sizeof(NAMED *);
- NAMED **newV = (NAMED **)table->mem->malloc_fcn(tsize);
+ NAMED **newV = table->mem->malloc_fcn(tsize);
if (! newV)
return NULL;
memset(newV, 0, tsize);
@@ -6941,7 +6953,7 @@ lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) {
}
}
}
- table->v[i] = (NAMED *)table->mem->malloc_fcn(createSize);
+ table->v[i] = table->mem->malloc_fcn(createSize);
if (! table->v[i])
return NULL;
memset(table->v[i], 0, createSize);
@@ -7229,7 +7241,7 @@ poolGrow(STRING_POOL *pool) {
if (bytesToAllocate == 0)
return XML_FALSE;
- tem = (BLOCK *)pool->mem->malloc_fcn(bytesToAllocate);
+ tem = pool->mem->malloc_fcn(bytesToAllocate);
if (! tem)
return XML_FALSE;
tem->size = blockSize;