summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab/ci/configure_sphinx.cmake3
-rw-r--r--.gitlab/ci/docker/debian10-aarch64/Dockerfile29
-rw-r--r--.gitlab/ci/docker/debian10-aarch64/deps_packages.lst90
-rw-r--r--.gitlab/ci/docker/debian10-aarch64/docker-clean0
-rw-r--r--.gitlab/ci/docker/debian10-aarch64/dpkg-exclude21
-rwxr-xr-x.gitlab/ci/docker/debian10-aarch64/install_deps.sh102
-rw-r--r--.gitlab/ci/docker/debian10/Dockerfile73
-rw-r--r--.gitlab/ci/docker/debian10/deps_packages.lst96
-rw-r--r--.gitlab/ci/docker/debian10/docker-clean0
-rw-r--r--.gitlab/ci/docker/debian10/dpkg-exclude21
-rwxr-xr-x.gitlab/ci/docker/debian10/install_deps.sh114
-rwxr-xr-x.gitlab/ci/docker/debian10/install_iwyu.sh13
-rwxr-xr-x.gitlab/ci/docker/debian10/install_rvm.sh12
-rw-r--r--.gitlab/ci/docker/debian10/iwyu_packages.lst9
-rw-r--r--.gitlab/ci/docker/debian10/rvm_packages.lst25
-rw-r--r--.gitlab/ci/docker/fedora37/Dockerfile90
-rw-r--r--.gitlab/ci/docker/fedora37/clang_tidy_headers_packages.lst4
-rw-r--r--.gitlab/ci/docker/fedora37/deps_packages.lst110
-rwxr-xr-x.gitlab/ci/docker/fedora37/install_clang_tidy_headers.sh12
-rwxr-xr-x.gitlab/ci/docker/fedora37/install_deps.sh147
-rwxr-xr-x.gitlab/ci/docker/fedora37/install_iwyu.sh14
-rwxr-xr-x.gitlab/ci/docker/fedora37/install_rvm.sh18
-rw-r--r--.gitlab/ci/docker/fedora37/iwyu_packages.lst7
-rw-r--r--.gitlab/ci/docker/fedora37/rvm_packages.lst18
-rw-r--r--.gitlab/os-linux.yml6
-rw-r--r--Help/command/execute_process.rst74
-rw-r--r--Help/command/set_property.rst2
-rw-r--r--Help/cpack_gen/archive.rst56
-rw-r--r--Help/cpack_gen/deb.rst212
-rw-r--r--Help/cpack_gen/dmg.rst32
-rw-r--r--Help/cpack_gen/freebsd.rst56
-rw-r--r--Help/cpack_gen/nuget.rst117
-rw-r--r--Help/cpack_gen/rpm.rst445
-rw-r--r--Help/guide/using-dependencies/index.rst2
-rw-r--r--Help/manual/cmake-variables.7.rst2
-rw-r--r--Help/manual/cmake.1.rst4
-rw-r--r--Help/variable/CMAKE_KATE_FILES_MODE.rst20
-rw-r--r--Help/variable/CMAKE_KATE_MAKE_ARGUMENTS.rst11
-rw-r--r--Modules/CMakeFindKate.cmake8
-rw-r--r--Modules/CTestTargets.cmake2
-rw-r--r--Modules/CheckFortranSourceCompiles.cmake12
-rw-r--r--Modules/CheckFortranSourceRuns.cmake10
-rw-r--r--Modules/CheckSourceCompiles.cmake30
-rw-r--r--Modules/CheckSourceRuns.cmake30
-rw-r--r--Modules/Compiler/Clang.cmake2
-rw-r--r--Modules/ExternalProject.cmake8
-rw-r--r--Modules/FetchContent.cmake6
-rw-r--r--Modules/FindCUDAToolkit.cmake2
-rw-r--r--Modules/FindOpenSSL.cmake10
-rw-r--r--Modules/Platform/Android.cmake2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/Modules/CMakeBuildUtilities.cmake1
-rw-r--r--Source/cmComputeLinkInformation.cxx84
-rw-r--r--Source/cmCustomCommand.cxx19
-rw-r--r--Source/cmCustomCommand.h20
-rw-r--r--Source/cmExtraKateGenerator.cxx58
-rw-r--r--Source/cmGlobalGenerator.cxx2
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx3
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx7
-rw-r--r--Source/cmGlobalNinjaGenerator.h1
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx3
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx1
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx3
-rw-r--r--Source/cmLocalGenerator.cxx14
-rw-r--r--Source/cmLocalGenerator.h4
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx6
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx2
-rw-r--r--Source/cmMakefile.cxx6
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx14
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx14
-rw-r--r--Source/cmMakefileTargetGenerator.cxx7
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx12
-rw-r--r--Source/cmNinjaTargetGenerator.cxx6
-rw-r--r--Source/cmPolicies.h2
-rw-r--r--Source/cmQtAutoGenGlobalInitializer.cxx2
-rw-r--r--Source/cmQtAutoGenInitializer.cxx5
-rw-r--r--Source/cmQtAutoMocUic.cxx2
-rw-r--r--Source/cmake.cxx4
-rw-r--r--Source/kwsys/CMakeLists.txt16
-rw-r--r--Source/kwsys/SharedForward.h.in873
-rw-r--r--Source/kwsys/SystemTools.cxx29
-rw-r--r--Source/kwsys/SystemTools.hxx.in5
-rw-r--r--Source/kwsys/testDynamicLoader.cxx4
-rw-r--r--Source/kwsys/testSharedForward.c.in31
-rw-r--r--Tests/CMakeLib/testVisualStudioSlnParser.cxx1
-rw-r--r--Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file16
-rw-r--r--Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/importable.cxx2
-rw-r--r--Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/importable.cxx2
-rw-r--r--Tests/RunCMake/CXXModules/examples/export-interface-build/importable.cxx2
-rw-r--r--Tests/RunCMake/CXXModules/examples/export-interface-install/importable.cxx2
-rw-r--r--Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/importable.cxx2
-rw-r--r--Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/importable.cxx2
-rw-r--r--Tests/RunCMake/add_custom_command/WorkingDirectory.cmake2
-rw-r--r--Tests/RunCMake/add_link_options/LINKER_expansion-list.cmake2
94 files changed, 1462 insertions, 2022 deletions
diff --git a/.gitlab/ci/configure_sphinx.cmake b/.gitlab/ci/configure_sphinx.cmake
index 3750309..9f3f0be 100644
--- a/.gitlab/ci/configure_sphinx.cmake
+++ b/.gitlab/ci/configure_sphinx.cmake
@@ -4,3 +4,6 @@ set(SPHINX_HTML ON CACHE BOOL "")
set(SPHINX_SINGLEHTML ON CACHE BOOL "")
set(SPHINX_QTHELP ON CACHE BOOL "")
set(SPHINX_TEXT ON CACHE BOOL "")
+if(NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "")
+ set(SPHINX_LINKCHECK ON CACHE BOOL "")
+endif()
diff --git a/.gitlab/ci/docker/debian10-aarch64/Dockerfile b/.gitlab/ci/docker/debian10-aarch64/Dockerfile
index 2079795..a0687e3 100644
--- a/.gitlab/ci/docker/debian10-aarch64/Dockerfile
+++ b/.gitlab/ci/docker/debian10-aarch64/Dockerfile
@@ -1,5 +1,26 @@
-FROM arm64v8/debian:10
-MAINTAINER Brad King <brad.king@kitware.com>
+# syntax=docker/dockerfile:1
-COPY install_deps.sh /root/install_deps.sh
-RUN sh /root/install_deps.sh
+ARG BASE_IMAGE=arm64v8/debian:10
+
+FROM ${BASE_IMAGE} AS apt-cache
+# Populate APT cache w/ the fresh metadata and prefetch packages.
+# Use an empty `docker-clean` file to "hide" the image-provided
+# file to disallow removing packages after `apt-get` operations.
+RUN --mount=type=tmpfs,target=/var/log \
+ --mount=type=bind,source=docker-clean,target=/etc/apt/apt.conf.d/docker-clean \
+ --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
+ apt-get update \
+ && apt-get --download-only -y install $(grep -h '^[^#]\+$' /root/*.lst)
+
+FROM ${BASE_IMAGE}
+LABEL maintainer="Brad King <brad.king@kitware.com>"
+
+RUN --mount=type=bind,source=install_deps.sh,target=/root/install_deps.sh \
+ --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
+ --mount=type=bind,source=dpkg-exclude,target=/etc/dpkg/dpkg.cfg.d/exclude \
+ --mount=type=bind,source=docker-clean,target=/etc/apt/apt.conf.d/docker-clean \
+ --mount=type=cache,from=apt-cache,source=/var/lib/apt/lists,target=/var/lib/apt/lists \
+ --mount=type=cache,from=apt-cache,source=/var/cache/apt,target=/var/cache/apt,sharing=private \
+ --mount=type=tmpfs,target=/var/log \
+ --mount=type=tmpfs,target=/tmp \
+ sh /root/install_deps.sh
diff --git a/.gitlab/ci/docker/debian10-aarch64/deps_packages.lst b/.gitlab/ci/docker/debian10-aarch64/deps_packages.lst
new file mode 100644
index 0000000..5e30e16
--- /dev/null
+++ b/.gitlab/ci/docker/debian10-aarch64/deps_packages.lst
@@ -0,0 +1,90 @@
+# Install build requirements.
+libssl-dev
+
+# Install development tools.
+g++
+curl
+git
+
+# Install optional external build dependencies.
+libarchive-dev
+libbz2-dev
+libcurl4-gnutls-dev
+libexpat1-dev
+libjsoncpp-dev
+liblzma-dev
+libncurses-dev
+librhash-dev
+libuv1-dev
+libzstd-dev
+zlib1g-dev
+
+# Install iwyu runtime deps.
+clang-6.0
+libncurses6
+
+# Tools needed for the test suite.
+jq
+
+# Packages needed to test CTest.
+bzr bzr-xmloutput
+cvs
+subversion
+mercurial
+
+# Packages needed to test find modules.
+alsa-utils
+doxygen graphviz
+freeglut3-dev
+gnutls-dev
+libarchive-dev
+libblas-dev
+libboost-dev
+libboost-filesystem-dev
+libboost-program-options-dev
+libboost-python-dev
+libboost-thread-dev
+libbz2-dev
+libcups2-dev
+libcurl4-gnutls-dev
+libdevil-dev
+libfontconfig1-dev
+libfreetype6-dev
+libgdal-dev
+libgif-dev
+libgl1-mesa-dev
+libglew-dev
+libgmock-dev
+libgrpc++-dev libgrpc-dev
+libgsl-dev
+libgtest-dev
+libgtk2.0-dev
+libicu-dev
+libinput-dev
+libjpeg-dev
+libjsoncpp-dev
+liblapack-dev
+liblzma-dev
+libmagick++-dev
+libopenal-dev
+libopenmpi-dev openmpi-bin
+libosp-dev
+libpng-dev
+libpq-dev postgresql-server-dev-11
+libprotobuf-dev libprotobuf-c-dev libprotoc-dev protobuf-compiler protobuf-compiler-grpc
+libsdl-dev
+libsqlite3-dev
+libtiff-dev
+libuv1-dev
+libx11-dev
+libxalan-c-dev
+libxerces-c-dev
+libxml2-dev libxml2-utils
+libxslt-dev xsltproc
+openjdk-11-jdk
+python2 python2-dev python-numpy pypy pypy-dev
+python3 python3-dev python3-numpy pypy3 pypy3-dev python3-venv
+qtbase5-dev qtbase5-dev-tools
+ruby ruby-dev
+swig
+unixodbc-dev
diff --git a/.gitlab/ci/docker/debian10-aarch64/docker-clean b/.gitlab/ci/docker/debian10-aarch64/docker-clean
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.gitlab/ci/docker/debian10-aarch64/docker-clean
diff --git a/.gitlab/ci/docker/debian10-aarch64/dpkg-exclude b/.gitlab/ci/docker/debian10-aarch64/dpkg-exclude
new file mode 100644
index 0000000..60b6565
--- /dev/null
+++ b/.gitlab/ci/docker/debian10-aarch64/dpkg-exclude
@@ -0,0 +1,21 @@
+# Drop all man pages
+path-exclude=/usr/share/man/*
+
+# Drop all info pages
+path-exclude=/usr/share/info/*
+
+# Drop all README files except from the some packages
+path-exclude=/usr/**/*README*
+path-include=/usr/share/devscripts/templates/README.mk-build-deps
+path-include=/usr/share/equivs/template/debian/README.Debian.in
+
+# Drop all translations
+path-exclude=/usr/share/locale/*/LC_MESSAGES/*.mo
+
+# Drop all documentation ...
+path-exclude=/usr/share/doc/*
+path-exclude=/usr/share/doc-base/*
+path-exclude=/usr/share/gtk-doc/*
+
+# Per package excludes
+path-exclude=/usr/share/gnupg/help.*.txt
diff --git a/.gitlab/ci/docker/debian10-aarch64/install_deps.sh b/.gitlab/ci/docker/debian10-aarch64/install_deps.sh
index 7396ad7..d1c8aed 100755
--- a/.gitlab/ci/docker/debian10-aarch64/install_deps.sh
+++ b/.gitlab/ci/docker/debian10-aarch64/install_deps.sh
@@ -2,104 +2,4 @@
set -e
-apt-get update
-
-# Install build requirements.
-apt-get install -y \
- libssl-dev
-
-# Install development tools.
-apt-get install -y \
- g++ \
- curl \
- git
-
-# Install optional external build dependencies.
-apt-get install -y \
- libarchive-dev \
- libbz2-dev \
- libcurl4-gnutls-dev \
- libexpat1-dev \
- libjsoncpp-dev \
- liblzma-dev \
- libncurses-dev \
- librhash-dev \
- libuv1-dev \
- libzstd-dev \
- zlib1g-dev
-
-# Install iwyu runtime deps.
-apt-get install -y \
- clang-6.0 \
- libncurses6
-
-# Tools needed for the test suite.
-apt-get install -y \
- jq
-
-# Packages needed to test CTest.
-apt-get install -y \
- bzr bzr-xmloutput \
- cvs \
- subversion \
- mercurial
-
-# Packages needed to test find modules.
-apt-get install -y \
- alsa-utils \
- doxygen graphviz \
- freeglut3-dev \
- gnutls-dev \
- libarchive-dev \
- libblas-dev \
- libboost-dev \
- libboost-filesystem-dev \
- libboost-program-options-dev \
- libboost-python-dev \
- libboost-thread-dev \
- libbz2-dev \
- libcups2-dev \
- libcurl4-gnutls-dev \
- libdevil-dev \
- libfontconfig1-dev \
- libfreetype6-dev \
- libgdal-dev \
- libgif-dev \
- libgl1-mesa-dev \
- libglew-dev \
- libgmock-dev \
- libgrpc++-dev libgrpc-dev \
- libgsl-dev \
- libgtest-dev \
- libgtk2.0-dev \
- libicu-dev \
- libinput-dev \
- libjpeg-dev \
- libjsoncpp-dev \
- liblapack-dev \
- liblzma-dev \
- libmagick++-dev \
- libopenal-dev \
- libopenmpi-dev openmpi-bin \
- libosp-dev \
- libpng-dev \
- libpq-dev postgresql-server-dev-11 \
- libprotobuf-dev libprotobuf-c-dev libprotoc-dev protobuf-compiler protobuf-compiler-grpc \
- libsdl-dev \
- libsqlite3-dev \
- libtiff-dev \
- libuv1-dev \
- libx11-dev \
- libxalan-c-dev \
- libxerces-c-dev \
- libxml2-dev libxml2-utils \
- libxslt-dev xsltproc \
- openjdk-11-jdk \
- python2 python2-dev python-numpy pypy pypy-dev \
- python3 python3-dev python3-numpy pypy3 pypy3-dev python3-venv \
- qtbase5-dev qtbase5-dev-tools \
- ruby ruby-dev \
- swig \
- unixodbc-dev
-
-apt-get clean
+apt-get install -y $(grep '^[^#]\+$' /root/deps_packages.lst)
diff --git a/.gitlab/ci/docker/debian10/Dockerfile b/.gitlab/ci/docker/debian10/Dockerfile
index 34a4bf1..d866428 100644
--- a/.gitlab/ci/docker/debian10/Dockerfile
+++ b/.gitlab/ci/docker/debian10/Dockerfile
@@ -1,25 +1,62 @@
-FROM debian:10 as iwyu-build
-MAINTAINER Ben Boeckel <ben.boeckel@kitware.com>
+# syntax=docker/dockerfile:1
-COPY install_iwyu.sh /root/install_iwyu.sh
-RUN sh /root/install_iwyu.sh
+ARG BASE_IMAGE=debian:10
-FROM debian:10 as rvm-build
-MAINTAINER Ben Boeckel <ben.boeckel@kitware.com>
+FROM ${BASE_IMAGE} AS apt-cache
+# Populate APT cache w/ the fresh metadata and prefetch packages.
+# Use an empty `docker-clean` file to "hide" the image-provided
+# file to disallow removing packages after `apt-get` operations.
+RUN --mount=type=tmpfs,target=/var/log \
+ --mount=type=bind,source=docker-clean,target=/etc/apt/apt.conf.d/docker-clean \
+ --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
+ --mount=type=bind,source=iwyu_packages.lst,target=/root/iwyu_packages.lst \
+ --mount=type=bind,source=rvm_packages.lst,target=/root/rvm_packages.lst \
+ apt-get update \
+ && apt-get --download-only -y install $(grep -h '^[^#]\+$' /root/*.lst)
-COPY install_rvm.sh /root/install_rvm.sh
-RUN sh /root/install_rvm.sh
-FROM debian:10
-MAINTAINER Ben Boeckel <ben.boeckel@kitware.com>
+FROM ${BASE_IMAGE} AS iwyu-build
+LABEL maintainer="Ben Boeckel <ben.boeckel@kitware.com>"
-COPY install_deps.sh /root/install_deps.sh
-RUN sh /root/install_deps.sh
+RUN --mount=type=bind,source=install_iwyu.sh,target=/root/install_iwyu.sh \
+ --mount=type=bind,source=iwyu_packages.lst,target=/root/iwyu_packages.lst \
+ --mount=type=bind,source=docker-clean,target=/etc/apt/apt.conf.d/docker-clean \
+ --mount=type=cache,from=apt-cache,source=/var/lib/apt/lists,target=/var/lib/apt/lists \
+ --mount=type=cache,from=apt-cache,source=/var/cache/apt,target=/var/cache/apt,sharing=private \
+ --mount=type=tmpfs,target=/var/log \
+ --mount=type=tmpfs,target=/tmp \
+ sh /root/install_iwyu.sh
-COPY --from=iwyu-build /root/iwyu.tar.gz /root/iwyu.tar.gz
-RUN tar -C / -xf /root/iwyu.tar.gz
-RUN ln -s /usr/lib/llvm-6.0/bin/include-what-you-use /usr/bin/include-what-you-use-6.0
-COPY --from=rvm-build /root/rvm.tar /root/rvm.tar
-RUN tar -C /usr/local -xf /root/rvm.tar \
- && rm /root/rvm.tar
+FROM ${BASE_IMAGE} AS rvm-build
+LABEL maintainer="Ben Boeckel <ben.boeckel@kitware.com>"
+
+RUN --mount=type=bind,source=install_rvm.sh,target=/root/install_rvm.sh \
+ --mount=type=bind,source=rvm_packages.lst,target=/root/rvm_packages.lst \
+ --mount=type=bind,source=docker-clean,target=/etc/apt/apt.conf.d/docker-clean \
+ --mount=type=cache,from=apt-cache,source=/var/lib/apt/lists,target=/var/lib/apt/lists \
+ --mount=type=cache,from=apt-cache,source=/var/cache/apt,target=/var/cache/apt,sharing=private \
+ --mount=type=tmpfs,target=/var/log \
+ --mount=type=tmpfs,target=/tmp \
+ sh /root/install_rvm.sh
+
+
+FROM ${BASE_IMAGE}
+LABEL maintainer="Ben Boeckel <ben.boeckel@kitware.com>"
+
+RUN --mount=type=bind,source=install_deps.sh,target=/root/install_deps.sh \
+ --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
+ --mount=type=bind,source=dpkg-exclude,target=/etc/dpkg/dpkg.cfg.d/exclude \
+ --mount=type=bind,source=docker-clean,target=/etc/apt/apt.conf.d/docker-clean \
+ --mount=type=cache,from=apt-cache,source=/var/lib/apt/lists,target=/var/lib/apt/lists \
+ --mount=type=cache,from=apt-cache,source=/var/cache/apt,target=/var/cache/apt,sharing=private \
+ --mount=type=tmpfs,target=/var/log \
+ --mount=type=tmpfs,target=/tmp \
+ sh /root/install_deps.sh
+
+RUN --mount=type=bind,from=iwyu-build,source=/root,target=/root \
+ tar -C / -xf /root/iwyu.tar \
+ && ln -s /usr/lib/llvm-6.0/bin/include-what-you-use /usr/bin/include-what-you-use-6.0
+
+RUN --mount=type=bind,from=rvm-build,source=/root,target=/root \
+ tar -C /usr/local -xf /root/rvm.tar
diff --git a/.gitlab/ci/docker/debian10/deps_packages.lst b/.gitlab/ci/docker/debian10/deps_packages.lst
new file mode 100644
index 0000000..3df41f5
--- /dev/null
+++ b/.gitlab/ci/docker/debian10/deps_packages.lst
@@ -0,0 +1,96 @@
+# Install build requirements.
+libssl-dev
+
+# Install development tools.
+g++
+curl
+git
+
+# Install optional external build dependencies.
+libarchive-dev
+libbz2-dev
+libcurl4-gnutls-dev
+libexpat1-dev
+libjsoncpp-dev
+liblzma-dev
+libncurses-dev
+librhash-dev
+libuv1-dev
+libzstd-dev
+zlib1g-dev
+
+# Install iwyu runtime deps.
+clang-6.0
+libncurses6
+
+# Tools needed for the test suite.
+jq
+
+# Packages needed to test CTest.
+bzr bzr-xmloutput
+cvs
+subversion
+mercurial
+
+# Install swift runtime deps.
+libncurses5
+
+# Packages needed to test find modules.
+alsa-utils
+doxygen graphviz
+freeglut3-dev
+gnutls-dev
+libarchive-dev
+libblas-dev
+libboost-dev
+libboost-filesystem-dev
+libboost-program-options-dev
+libboost-python-dev
+libboost-thread-dev
+libbz2-dev
+libcups2-dev
+libcurl4-gnutls-dev
+libdevil-dev
+libfontconfig1-dev
+libfreetype6-dev
+libgdal-dev
+libgif-dev
+libgl1-mesa-dev
+libglew-dev
+libgmock-dev
+libgrpc++-dev libgrpc-dev
+libgsl-dev
+libgtest-dev
+libgtk2.0-dev
+libicu-dev
+libinput-dev
+libjpeg-dev
+libjsoncpp-dev
+liblapack-dev
+liblzma-dev
+libmagick++-dev
+libopenal-dev
+libopenmpi-dev openmpi-bin
+libosp-dev
+libpng-dev
+libpq-dev postgresql-server-dev-11
+libprotobuf-dev libprotobuf-c-dev libprotoc-dev protobuf-compiler protobuf-compiler-grpc
+libsdl-dev
+libsqlite3-dev
+libtiff-dev
+libuv1-dev
+libx11-dev
+libxalan-c-dev
+libxerces-c-dev
+libxml2-dev libxml2-utils
+libxslt-dev xsltproc
+openjdk-11-jdk
+python2 python2-dev python-numpy pypy pypy-dev
+python3 python3-dev python3-numpy pypy3 pypy3-dev python3-venv
+qtbase5-dev qtbase5-dev-tools
+ruby ruby-dev
+swig
+unixodbc-dev
+
+# CMake_TEST_FindPython_IronPython
+libmono-system-windows-forms4.0-cil
diff --git a/.gitlab/ci/docker/debian10/docker-clean b/.gitlab/ci/docker/debian10/docker-clean
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.gitlab/ci/docker/debian10/docker-clean
diff --git a/.gitlab/ci/docker/debian10/dpkg-exclude b/.gitlab/ci/docker/debian10/dpkg-exclude
new file mode 100644
index 0000000..60b6565
--- /dev/null
+++ b/.gitlab/ci/docker/debian10/dpkg-exclude
@@ -0,0 +1,21 @@
+# Drop all man pages
+path-exclude=/usr/share/man/*
+
+# Drop all info pages
+path-exclude=/usr/share/info/*
+
+# Drop all README files except from the some packages
+path-exclude=/usr/**/*README*
+path-include=/usr/share/devscripts/templates/README.mk-build-deps
+path-include=/usr/share/equivs/template/debian/README.Debian.in
+
+# Drop all translations
+path-exclude=/usr/share/locale/*/LC_MESSAGES/*.mo
+
+# Drop all documentation ...
+path-exclude=/usr/share/doc/*
+path-exclude=/usr/share/doc-base/*
+path-exclude=/usr/share/gtk-doc/*
+
+# Per package excludes
+path-exclude=/usr/share/gnupg/help.*.txt
diff --git a/.gitlab/ci/docker/debian10/install_deps.sh b/.gitlab/ci/docker/debian10/install_deps.sh
index 3e5622b..a00e322 100755
--- a/.gitlab/ci/docker/debian10/install_deps.sh
+++ b/.gitlab/ci/docker/debian10/install_deps.sh
@@ -2,113 +2,8 @@
set -e
-apt-get update
+apt-get install -y $(grep '^[^#]\+$' /root/deps_packages.lst)
-# Install build requirements.
-apt-get install -y \
- libssl-dev
-
-# Install development tools.
-apt-get install -y \
- g++ \
- curl \
- git
-
-# Install optional external build dependencies.
-apt-get install -y \
- libarchive-dev \
- libbz2-dev \
- libcurl4-gnutls-dev \
- libexpat1-dev \
- libjsoncpp-dev \
- liblzma-dev \
- libncurses-dev \
- librhash-dev \
- libuv1-dev \
- libzstd-dev \
- zlib1g-dev
-
-# Install iwyu runtime deps.
-apt-get install -y \
- clang-6.0 \
- libncurses6
-
-# Tools needed for the test suite.
-apt-get install -y \
- jq
-
-# Packages needed to test CTest.
-apt-get install -y \
- bzr bzr-xmloutput \
- cvs \
- subversion \
- mercurial
-
-# Install swift runtime deps.
-apt-get install -y \
- libncurses5
-
-# Packages needed to test find modules.
-apt-get install -y \
- alsa-utils \
- doxygen graphviz \
- freeglut3-dev \
- gnutls-dev \
- libarchive-dev \
- libblas-dev \
- libboost-dev \
- libboost-filesystem-dev \
- libboost-program-options-dev \
- libboost-python-dev \
- libboost-thread-dev \
- libbz2-dev \
- libcups2-dev \
- libcurl4-gnutls-dev \
- libdevil-dev \
- libfontconfig1-dev \
- libfreetype6-dev \
- libgdal-dev \
- libgif-dev \
- libgl1-mesa-dev \
- libglew-dev \
- libgmock-dev \
- libgrpc++-dev libgrpc-dev \
- libgsl-dev \
- libgtest-dev \
- libgtk2.0-dev \
- libicu-dev \
- libinput-dev \
- libjpeg-dev \
- libjsoncpp-dev \
- liblapack-dev \
- liblzma-dev \
- libmagick++-dev \
- libopenal-dev \
- libopenmpi-dev openmpi-bin \
- libosp-dev \
- libpng-dev \
- libpq-dev postgresql-server-dev-11 \
- libprotobuf-dev libprotobuf-c-dev libprotoc-dev protobuf-compiler protobuf-compiler-grpc \
- libsdl-dev \
- libsqlite3-dev \
- libtiff-dev \
- libuv1-dev \
- libx11-dev \
- libxalan-c-dev \
- libxerces-c-dev \
- libxml2-dev libxml2-utils \
- libxslt-dev xsltproc \
- openjdk-11-jdk \
- python2 python2-dev python-numpy pypy pypy-dev \
- python3 python3-dev python3-numpy pypy3 pypy3-dev python3-venv \
- qtbase5-dev qtbase5-dev-tools \
- ruby ruby-dev \
- swig \
- unixodbc-dev
-
-# CMake_TEST_FindPython_IronPython
-apt-get install -y \
- libmono-system-windows-forms4.0-cil
curl -L -O https://github.com/IronLanguages/ironpython2/releases/download/ipy-2.7.10/ironpython_2.7.10.deb
echo 'e1aceec1d49ffa66e9059a52168a734999dcccc50164a60e2936649cae698f3e ironpython_2.7.10.deb' > ironpython.sha256sum
sha256sum --check ironpython.sha256sum
@@ -116,8 +11,5 @@ dpkg -i ironpython_2.7.10.deb
rm ironpython_2.7.10.deb ironpython.sha256sum
# Perforce
-curl -L -O https://www.perforce.com/downloads/perforce/r21.2/bin.linux26x86_64/helix-core-server.tgz
-tar -C /usr/local/bin -xvzf helix-core-server.tgz -- p4 p4d
-rm helix-core-server.tgz
-
-apt-get clean
+curl -L https://www.perforce.com/downloads/perforce/r21.2/bin.linux26x86_64/helix-core-server.tgz -o - \
+ | tar -C /usr/local/bin -xvzf - -- p4 p4d
diff --git a/.gitlab/ci/docker/debian10/install_iwyu.sh b/.gitlab/ci/docker/debian10/install_iwyu.sh
index 54d26ef..4814a71 100755
--- a/.gitlab/ci/docker/debian10/install_iwyu.sh
+++ b/.gitlab/ci/docker/debian10/install_iwyu.sh
@@ -3,16 +3,7 @@
set -e
# Install development tools.
-apt-get update
-apt-get install -y \
- clang-6.0 \
- libclang-6.0-dev \
- llvm-6.0-dev \
- libz-dev \
- g++ \
- cmake \
- ninja-build \
- git
+apt-get install -y $(grep '^[^#]\+$' /root/iwyu_packages.lst)
cd /root
git clone "https://github.com/include-what-you-use/include-what-you-use.git"
@@ -29,4 +20,4 @@ cmake -GNinja \
..
ninja
DESTDIR=/root/iwyu-destdir ninja install
-tar -C /root/iwyu-destdir -cf /root/iwyu.tar.gz .
+tar -C /root/iwyu-destdir -cf /root/iwyu.tar .
diff --git a/.gitlab/ci/docker/debian10/install_rvm.sh b/.gitlab/ci/docker/debian10/install_rvm.sh
index 0ebc746..c6fff70 100755
--- a/.gitlab/ci/docker/debian10/install_rvm.sh
+++ b/.gitlab/ci/docker/debian10/install_rvm.sh
@@ -2,11 +2,7 @@
set -e
-apt-get update
-apt-get install -y \
- curl \
- gnupg2 \
- procps
+apt-get install -y $(grep '^[^#]\+$' /root/rvm_packages.lst)
gpg2 --keyserver hkps://keyserver.ubuntu.com \
--recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
@@ -17,4 +13,8 @@ curl -sSL https://get.rvm.io | bash -s stable
# keep version in sync with `env_debian*_ninja.sh`
/usr/local/rvm/bin/rvm install ruby-2.7.0
-tar -C /usr/local -cf /root/rvm.tar rvm
+for p in archives examples gem-cache log src; do
+ touch /usr/local/rvm/${p}/.tar_exclude
+done
+
+tar -C /usr/local --exclude-tag-under=.tar_exclude -cf /root/rvm.tar rvm
diff --git a/.gitlab/ci/docker/debian10/iwyu_packages.lst b/.gitlab/ci/docker/debian10/iwyu_packages.lst
new file mode 100644
index 0000000..9e291c9
--- /dev/null
+++ b/.gitlab/ci/docker/debian10/iwyu_packages.lst
@@ -0,0 +1,9 @@
+# Install development tools.
+clang-6.0
+libclang-6.0-dev
+llvm-6.0-dev
+libz-dev
+g++
+cmake
+ninja-build
+git
diff --git a/.gitlab/ci/docker/debian10/rvm_packages.lst b/.gitlab/ci/docker/debian10/rvm_packages.lst
new file mode 100644
index 0000000..80f079c
--- /dev/null
+++ b/.gitlab/ci/docker/debian10/rvm_packages.lst
@@ -0,0 +1,25 @@
+autoconf
+automake
+bison
+bzip2
+curl
+g++
+gawk
+gcc
+gnupg2
+libc6-dev
+libffi-dev
+libgdbm-dev
+libgmp-dev
+libncurses5-dev
+libreadline-dev
+libsqlite3-dev
+libssl-dev
+libtool
+libyaml-dev
+make
+patch
+pkg-config
+procps
+sqlite3
+zlib1g-dev
diff --git a/.gitlab/ci/docker/fedora37/Dockerfile b/.gitlab/ci/docker/fedora37/Dockerfile
index 13ef9aa..b36a17e 100644
--- a/.gitlab/ci/docker/fedora37/Dockerfile
+++ b/.gitlab/ci/docker/fedora37/Dockerfile
@@ -1,33 +1,73 @@
-FROM fedora:37 as rvm-build
-MAINTAINER Ben Boeckel <ben.boeckel@kitware.com>
+# syntax=docker/dockerfile:1
-COPY install_rvm.sh /root/install_rvm.sh
-RUN sh /root/install_rvm.sh
+ARG BASE_IMAGE=fedora:37
-FROM fedora:37 AS clang-tidy-headers
-MAINTAINER Kyle Edwards <kyle.edwards@kitware.com>
+FROM ${BASE_IMAGE} AS dnf-cache
+# Populate DNF cache w/ the fresh metadata and prefetch packages.
+RUN --mount=type=bind,source=clang_tidy_headers_packages.lst,target=/root/clang_tidy_headers_packages.lst \
+ --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
+ --mount=type=bind,source=iwyu_packages.lst,target=/root/iwyu_packages.lst \
+ --mount=type=bind,source=rvm_packages.lst,target=/root/rvm_packages.lst \
+ --mount=type=tmpfs,target=/var/log \
+ --mount=type=tmpfs,target=/tmp \
+ dnf install \
+ --setopt=install_weak_deps=False \
+ --setopt=fastestmirror=True \
+ --setopt=max_parallel_downloads=10 \
+ --downloadonly \
+ -y \
+ $(grep -h '^[^#]\+$' /root/*.lst)
-COPY install_clang_tidy_headers.sh /root/install_clang_tidy_headers.sh
-RUN sh /root/install_clang_tidy_headers.sh
-FROM fedora:37 AS iwyu
-MAINTAINER Kyle Edwards <kyle.edwards@kitware.com>
+FROM ${BASE_IMAGE} AS rvm-build
+LABEL maintainer="Ben Boeckel <ben.boeckel@kitware.com>"
-COPY install_iwyu.sh /root/install_iwyu.sh
-RUN sh /root/install_iwyu.sh
+RUN --mount=type=bind,source=install_rvm.sh,target=/root/install_rvm.sh \
+ --mount=type=bind,source=rvm_packages.lst,target=/root/rvm_packages.lst \
+ --mount=type=cache,from=dnf-cache,source=/var/cache/dnf,target=/var/cache/dnf,sharing=private \
+ --mount=type=tmpfs,target=/var/log \
+ --mount=type=tmpfs,target=/tmp \
+ sh /root/install_rvm.sh
-FROM fedora:37
-MAINTAINER Ben Boeckel <ben.boeckel@kitware.com>
-COPY install_deps.sh /root/install_deps.sh
-RUN sh /root/install_deps.sh
+FROM ${BASE_IMAGE} AS clang-tidy-headers
+LABEL maintainer="Kyle Edwards <kyle.edwards@kitware.com>"
-COPY --from=rvm-build /root/rvm.tar /root/rvm.tar
-RUN tar -C /usr/local -xf /root/rvm.tar \
- && rm /root/rvm.tar
-COPY --from=clang-tidy-headers /root/clang-tidy-headers.tar /root/clang-tidy-headers.tar
-RUN tar -C /usr/include -xf /root/clang-tidy-headers.tar \
- && rm /root/clang-tidy-headers.tar
-COPY --from=iwyu /root/iwyu.tar /root/iwyu.tar
-RUN tar -C / -xf /root/iwyu.tar \
- && rm /root/iwyu.tar
+RUN --mount=type=bind,source=install_clang_tidy_headers.sh,target=/root/install_clang_tidy_headers.sh \
+ --mount=type=bind,source=clang_tidy_headers_packages.lst,target=/root/clang_tidy_headers_packages.lst \
+ --mount=type=cache,from=dnf-cache,source=/var/cache/dnf,target=/var/cache/dnf,sharing=private \
+ --mount=type=tmpfs,target=/var/log \
+ --mount=type=tmpfs,target=/tmp \
+ sh /root/install_clang_tidy_headers.sh
+
+
+FROM ${BASE_IMAGE} AS iwyu-build
+LABEL maintainer="Kyle Edwards <kyle.edwards@kitware.com>"
+
+RUN --mount=type=bind,source=install_iwyu.sh,target=/root/install_iwyu.sh \
+ --mount=type=bind,source=iwyu_packages.lst,target=/root/iwyu_packages.lst \
+ --mount=type=cache,from=dnf-cache,source=/var/cache/dnf,target=/var/cache/dnf,sharing=private \
+ --mount=type=tmpfs,target=/var/log \
+ --mount=type=tmpfs,target=/tmp \
+ sh /root/install_iwyu.sh
+
+
+FROM ${BASE_IMAGE}
+LABEL maintainer="Ben Boeckel <ben.boeckel@kitware.com>"
+
+RUN --mount=type=bind,source=install_deps.sh,target=/root/install_deps.sh \
+ --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
+ --mount=type=cache,from=dnf-cache,source=/var/cache/dnf,target=/var/cache/dnf,sharing=private \
+ --mount=type=cache,target=/var/cache/pip \
+ --mount=type=tmpfs,target=/var/log \
+ --mount=type=tmpfs,target=/tmp \
+ sh /root/install_deps.sh
+
+RUN --mount=type=bind,from=rvm-build,source=/root,target=/root \
+ tar -C /usr/local -xf /root/rvm.tar
+
+RUN --mount=type=bind,from=clang-tidy-headers,source=/root,target=/root \
+ tar -C /usr/include -xf /root/clang-tidy-headers.tar
+
+RUN --mount=type=bind,from=iwyu-build,source=/root,target=/root \
+ tar -C / -xf /root/iwyu.tar
diff --git a/.gitlab/ci/docker/fedora37/clang_tidy_headers_packages.lst b/.gitlab/ci/docker/fedora37/clang_tidy_headers_packages.lst
new file mode 100644
index 0000000..fe86105
--- /dev/null
+++ b/.gitlab/ci/docker/fedora37/clang_tidy_headers_packages.lst
@@ -0,0 +1,4 @@
+dnf-command(download)
+rpm-build
+python3-devel
+clang-tools-extra
diff --git a/.gitlab/ci/docker/fedora37/deps_packages.lst b/.gitlab/ci/docker/fedora37/deps_packages.lst
new file mode 100644
index 0000000..9ce8007
--- /dev/null
+++ b/.gitlab/ci/docker/fedora37/deps_packages.lst
@@ -0,0 +1,110 @@
+# Install build requirements.
+ncurses-devel
+openssl-devel
+qt5-qtbase-devel
+qt6-qtbase-devel
+
+# Install development tools.
+clang
+clang-tools-extra
+compiler-rt
+flang
+flang-devel
+gcc-c++
+git-core
+make
+
+# Install optional external build dependencies.
+bzip2-devel
+expat-devel
+jsoncpp-devel
+libarchive-devel
+libcurl-devel
+libuv-devel
+libuv-devel
+libzstd-devel
+rhash-devel
+xz-devel
+zlib-devel
+
+# Install documentation tools.
+python3-sphinx
+texinfo
+qt5-qttools-devel
+qt6-qttools-devel
+
+# Install lint tools.
+clang-analyzer
+codespell
+
+# Tools needed for the test suite.
+findutils
+file
+jq
+which
+
+# Packages needed to test CTest.
+breezy
+subversion
+mercurial
+
+# Packages needed to test CPack.
+rpm-build
+
+# Packages needed to test find modules.
+alsa-lib-devel
+blas-devel
+boost-devel boost-python3-devel
+bzip2-devel
+cups-devel
+DevIL-devel
+doxygen
+expat-devel
+fontconfig-devel
+freeglut-devel
+freetype-devel
+gdal-devel
+gettext
+giflib-devel
+glew-devel
+gmock
+gnutls-devel
+grpc-devel grpc-plugins
+gsl-devel
+gtest-devel
+gtk2-devel
+ImageMagick-c++-devel
+java-11-openjdk-devel
+jsoncpp-devel
+lapack-devel
+libarchive-devel
+libcurl-devel
+libicu-devel
+libinput-devel systemd-devel
+libjpeg-turbo-devel
+libpng-devel
+opensp-devel
+postgresql-server-devel
+libtiff-devel
+libuv-devel
+libxml2-devel
+libxslt-devel
+mpich-devel
+openal-soft-devel
+openmpi-devel
+patch
+perl
+protobuf-devel protobuf-c-devel protobuf-lite-devel
+pypy2 pypy2-devel
+pypy3 pypy3-devel
+python2 python2-devel
+python3 python3-devel python3-numpy
+python3-jsmin python3-jsonschema
+ruby rubygems ruby-devel
+SDL-devel
+sqlite-devel
+swig
+unixODBC-devel
+xalan-c-devel
+xerces-c-devel
+xz-devel
diff --git a/.gitlab/ci/docker/fedora37/install_clang_tidy_headers.sh b/.gitlab/ci/docker/fedora37/install_clang_tidy_headers.sh
index b9883f4..200fa1e 100755
--- a/.gitlab/ci/docker/fedora37/install_clang_tidy_headers.sh
+++ b/.gitlab/ci/docker/fedora37/install_clang_tidy_headers.sh
@@ -4,11 +4,13 @@ set -e
# Packages for building the clang-tidy plugin.
# TODO: Upstream this as a proper Fedora package.
-dnf install --setopt=install_weak_deps=False -y \
- 'dnf-command(download)' \
- rpm-build \
- python3-devel \
- clang-tools-extra
+dnf install \
+ --setopt=install_weak_deps=False \
+ --setopt=fastestmirror=True \
+ --setopt=max_parallel_downloads=10 \
+ -y \
+ $(grep '^[^#]\+$' /root/clang_tidy_headers_packages.lst)
+
clang_source_rpm=$(rpm -q --queryformat '%{SOURCERPM}' clang-tools-extra)
clang_version=$(rpm -q --queryformat '%{VERSION}' clang-tools-extra)
dnf download --source -y clang
diff --git a/.gitlab/ci/docker/fedora37/install_deps.sh b/.gitlab/ci/docker/fedora37/install_deps.sh
index 3508929..cd2701e 100755
--- a/.gitlab/ci/docker/fedora37/install_deps.sh
+++ b/.gitlab/ci/docker/fedora37/install_deps.sh
@@ -2,135 +2,30 @@
set -e
-# Install build requirements.
-dnf install --setopt=install_weak_deps=False -y \
- ncurses-devel \
- openssl-devel \
- qt5-qtbase-devel \
- qt6-qtbase-devel
+dnf install \
+ --setopt=install_weak_deps=False \
+ --setopt=fastestmirror=True \
+ --setopt=max_parallel_downloads=10 \
+ -y \
+ $(grep '^[^#]\+$' /root/deps_packages.lst)
-# Install development tools.
-dnf install --setopt=install_weak_deps=False -y \
- clang \
- clang-tools-extra \
- compiler-rt \
- flang \
- flang-devel \
- gcc-c++ \
- git-core \
- make
-
-# Install optional external build dependencies.
-dnf install --setopt=install_weak_deps=False -y \
- bzip2-devel \
- expat-devel \
- jsoncpp-devel \
- libarchive-devel \
- libcurl-devel \
- libuv-devel \
- libuv-devel \
- libzstd-devel \
- rhash-devel \
- xz-devel \
- zlib-devel
-
-# Install documentation tools.
-dnf install --setopt=install_weak_deps=False -y \
- python3-sphinx \
- texinfo \
- qt5-qttools-devel \
- qt6-qttools-devel
-
-# Install lint tools.
-dnf install --setopt=install_weak_deps=False -y \
- clang-analyzer \
- codespell
-
-# Tools needed for the test suite.
-dnf install --setopt=install_weak_deps=False -y \
- findutils \
- file \
- jq \
- which
-
-# Packages needed to test CTest.
-dnf install --setopt=install_weak_deps=False -y \
- breezy \
- subversion \
- mercurial
-
-# Packages needed to test CPack.
-dnf install --setopt=install_weak_deps=False -y \
- rpm-build
+# Fedora no longer packages python2 numpy.
+curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o - | python2
+pip2.7 install --disable-pip-version-check --no-input --no-compile --cache-dir /var/cache/pip numpy
-# Packages needed to test find modules.
-dnf install --setopt=install_weak_deps=False -y \
- alsa-lib-devel \
- blas-devel \
- boost-devel boost-python3-devel \
- bzip2-devel \
- cups-devel \
- DevIL-devel \
- doxygen \
- expat-devel \
- fontconfig-devel \
- freeglut-devel \
- freetype-devel \
- gdal-devel \
- gettext \
- giflib-devel \
- glew-devel \
- gmock \
- gnutls-devel \
- grpc-devel grpc-plugins \
- gsl-devel \
- gtest-devel \
- gtk2-devel \
- ImageMagick-c++-devel \
- java-11-openjdk-devel \
- jsoncpp-devel \
- lapack-devel \
- libarchive-devel \
- libcurl-devel \
- libicu-devel \
- libinput-devel systemd-devel \
- libjpeg-turbo-devel \
- libpng-devel \
- opensp-devel \
- postgresql-server-devel \
- libtiff-devel \
- libuv-devel \
- libxml2-devel \
- libxslt-devel \
- mpich-devel \
- openal-soft-devel \
- openmpi-devel \
- patch \
- perl \
- protobuf-devel protobuf-c-devel protobuf-lite-devel \
- pypy2 pypy2-devel \
- pypy3 pypy3-devel \
- python2 python2-devel \
- python3 python3-devel python3-numpy \
- python3-jsmin python3-jsonschema \
- ruby rubygems ruby-devel \
- SDL-devel \
- sqlite-devel \
- swig \
- unixODBC-devel \
- xalan-c-devel \
- xerces-c-devel \
- xz-devel
+# Remove demos and Python2 tests
+for p in Demo test; do
+ rm -rf /usr/lib64/python2.7/${p}
+done
-dnf clean all
+# Remove tests for numpy
+for v in 2.7 3.11; do
+ find /usr/lib64/python${v}/site-packages/numpy -type d -a -name tests -exec rm -rf {} +
+done
-# Fedora no longer packages python2 numpy.
-curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
-python2 get-pip.py
-rm get-pip.py
-pip2.7 install numpy
+# Remove some other packages tests
+find /usr/lib64/python3.11/site-packages/breezy -type d -a -name tests -exec rm -rf {} +
# Perforce
-curl -L -O https://www.perforce.com/downloads/perforce/r21.2/bin.linux26x86_64/helix-core-server.tgz
-tar -C /usr/local/bin -xvzf helix-core-server.tgz -- p4 p4d
-rm helix-core-server.tgz
+curl -L https://www.perforce.com/downloads/perforce/r21.2/bin.linux26x86_64/helix-core-server.tgz -o - \
+ | tar -C /usr/local/bin -xvzf - -- p4 p4d
diff --git a/.gitlab/ci/docker/fedora37/install_iwyu.sh b/.gitlab/ci/docker/fedora37/install_iwyu.sh
index 714bcc0..684e355 100755
--- a/.gitlab/ci/docker/fedora37/install_iwyu.sh
+++ b/.gitlab/ci/docker/fedora37/install_iwyu.sh
@@ -3,14 +3,12 @@
set -e
# Install development tools.
-dnf install --setopt=install_weak_deps=False -y \
- clang-devel \
- llvm-devel \
- zlib-devel \
- g++ \
- cmake \
- ninja-build \
- git
+dnf install \
+ --setopt=install_weak_deps=False \
+ --setopt=fastestmirror=True \
+ --setopt=max_parallel_downloads=10 \
+ -y \
+ $(grep '^[^#]\+$' /root/iwyu_packages.lst)
cd /root
git clone "https://github.com/include-what-you-use/include-what-you-use.git"
diff --git a/.gitlab/ci/docker/fedora37/install_rvm.sh b/.gitlab/ci/docker/fedora37/install_rvm.sh
index 0011f87..10e7545 100755
--- a/.gitlab/ci/docker/fedora37/install_rvm.sh
+++ b/.gitlab/ci/docker/fedora37/install_rvm.sh
@@ -2,18 +2,24 @@
set -e
+dnf install \
+ --setopt=install_weak_deps=False \
+ --setopt=fastestmirror=True \
+ --setopt=max_parallel_downloads=10 \
+ -y \
+ $(grep '^[^#]\+$' /root/rvm_packages.lst)
+
gpg2 --keyserver hkps://keyserver.ubuntu.com \
--recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
7D2BAF1CF37B13E2069D6956105BD0E739499BDB
-dnf install --setopt=install_weak_deps=False -y \
- findutils \
- procps \
- which
-
curl -sSL https://get.rvm.io | bash -s stable
# keep version in sync with `env_fedora*_makefiles.cmake`
/usr/local/rvm/bin/rvm install ruby-3.0.4
-tar -C /usr/local -cf /root/rvm.tar rvm
+for p in archives examples gem-cache log src; do
+ touch /usr/local/rvm/${p}/.tar_exclude
+done
+
+tar -C /usr/local --exclude-tag-under=.tar_exclude -cf /root/rvm.tar rvm
diff --git a/.gitlab/ci/docker/fedora37/iwyu_packages.lst b/.gitlab/ci/docker/fedora37/iwyu_packages.lst
new file mode 100644
index 0000000..e3551bd
--- /dev/null
+++ b/.gitlab/ci/docker/fedora37/iwyu_packages.lst
@@ -0,0 +1,7 @@
+clang-devel
+llvm-devel
+zlib-devel
+g++
+cmake
+ninja-build
+git
diff --git a/.gitlab/ci/docker/fedora37/rvm_packages.lst b/.gitlab/ci/docker/fedora37/rvm_packages.lst
new file mode 100644
index 0000000..1dc852e
--- /dev/null
+++ b/.gitlab/ci/docker/fedora37/rvm_packages.lst
@@ -0,0 +1,18 @@
+autoconf
+automake
+bison
+bzip2
+findutils
+gcc-c++
+glibc-devel
+libffi-devel
+libtool
+libyaml-devel
+make
+openssl-devel
+patch
+procps
+readline-devel
+sqlite-devel
+which
+zlib-devel
diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml
index c00c4aa..8ab3fad 100644
--- a/.gitlab/os-linux.yml
+++ b/.gitlab/os-linux.yml
@@ -45,7 +45,7 @@
### Debian
.debian10:
- image: "kitware/cmake:ci-debian10-x86_64-2023-01-26"
+ image: "kitware/cmake:ci-debian10-x86_64-2023-02-07"
variables:
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
@@ -60,7 +60,7 @@
CMAKE_CI_NO_INSTALL: 1
.debian10_aarch64:
- image: "kitware/cmake:ci-debian10-aarch64-2023-01-26"
+ image: "kitware/cmake:ci-debian10-aarch64-2023-02-07"
variables:
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
@@ -69,7 +69,7 @@
### Fedora
.fedora37:
- image: "kitware/cmake:ci-fedora37-x86_64-2023-01-26"
+ image: "kitware/cmake:ci-fedora37-x86_64-2023-02-07"
variables:
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci/long file name for testing purposes"
diff --git a/Help/command/execute_process.rst b/Help/command/execute_process.rst
index 5cfeeab..98430c5 100644
--- a/Help/command/execute_process.rst
+++ b/Help/command/execute_process.rst
@@ -32,6 +32,11 @@ Commands are executed concurrently as a pipeline, with the standard
output of each process piped to the standard input of the next.
A single standard error pipe is used for all processes.
+``execute_process`` runs commands while CMake is configuring the project,
+prior to build system generation. Use the :command:`add_custom_target` and
+:command:`add_custom_command` commands to create custom commands that run
+at build time.
+
Options:
``COMMAND``
@@ -51,8 +56,8 @@ Options:
(Use the ``INPUT_*``, ``OUTPUT_*``, and ``ERROR_*`` options to
redirect stdin, stdout, and stderr.)
- If a sequential execution of multiple commands is required, use multiple
- ``execute_process`` calls with a single ``COMMAND`` argument.
+ For **sequential execution** of multiple commands use multiple
+ ``execute_process`` calls each with a single ``COMMAND`` argument.
``WORKING_DIRECTORY``
The named directory will be set as the current working directory of
@@ -76,22 +81,46 @@ Options:
given ``COMMAND`` arguments. Each entry will be an integer return code
from the corresponding child or a string describing an error condition.
+``INPUT_FILE <file>``
+ ``<file>`` is attached to the standard input pipe of the *first* ``COMMAND``
+ process.
+
+``OUTPUT_FILE <file>``
+ ``<file>`` is attached to the standard output pipe of the *last* ``COMMAND``
+ process.
+
+``ERROR_FILE <file>``
+ ``<file>`` is attached to the standard error pipe of *all* ``COMMAND``
+ processes.
+
+.. versionadded:: 3.3
+ If the same ``<file>`` is named for both ``OUTPUT_FILE`` and ``ERROR_FILE``
+ then it will be used for both standard output and standard error pipes.
+
+``OUTPUT_QUIET``, ``ERROR_QUIET``
+ The standard output on ``OUTPUT_VARIABLE`` or standard error on
+ ``ERROR_VARIABLE`` are not connected (no variable content).
+ The ``*_FILE`` and ``ECHO_*_VARIABLE`` options are not affected.
+
``OUTPUT_VARIABLE``, ``ERROR_VARIABLE``
The variable named will be set with the contents of the standard output
and standard error pipes, respectively. If the same variable is named
for both pipes their output will be merged in the order produced.
-``INPUT_FILE, OUTPUT_FILE``, ``ERROR_FILE``
- The file named will be attached to the standard input of the first
- process, standard output of the last process, or standard error of
- all processes, respectively.
+``ECHO_OUTPUT_VARIABLE``, ``ECHO_ERROR_VARIABLE``
+ .. versionadded:: 3.18
+
+ The standard output or standard error will not be exclusively redirected to
+ the specified variables.
- .. versionadded:: 3.3
- If the same file is named for both output and error then it will be used
- for both.
+ The output will be duplicated into the specified variables and also onto
+ standard output or standard error analogous to the ``tee`` Unix command.
-``OUTPUT_QUIET``, ``ERROR_QUIET``
- The standard output or standard error results will be quietly ignored.
+.. note::
+ If more than one ``OUTPUT_*`` or ``ERROR_*`` option is given for the
+ same pipe the precedence is *not specified*.
+ If no ``OUTPUT_*`` or ``ERROR_*`` options are given the output will
+ be shared with the corresponding pipes of the CMake process itself.
``COMMAND_ECHO <where>``
.. versionadded:: 3.15
@@ -126,17 +155,6 @@ Options:
Accept ``UTF-8`` spelling for consistency with the
`UTF-8 RFC <https://www.ietf.org/rfc/rfc3629>`_ naming convention.
-``ECHO_OUTPUT_VARIABLE``, ``ECHO_ERROR_VARIABLE``
- .. versionadded:: 3.18
-
- The standard output or standard error will not be exclusively redirected to
- the configured variables.
-
- The output will be duplicated, it will be sent into the configured variables
- and also on standard output or standard error.
-
- This is analogous to the ``tee`` Unix command.
-
``COMMAND_ERROR_IS_FATAL <ANY|LAST>``
.. versionadded:: 3.19
@@ -151,15 +169,3 @@ Options:
If the last command in the list of commands fails, the
``execute_process()`` command halts with an error. Commands earlier in the
list will not cause a fatal error.
-
-If more than one ``OUTPUT_*`` or ``ERROR_*`` option is given for the
-same pipe the precedence is not specified.
-If no ``OUTPUT_*`` or ``ERROR_*`` options are given the output will
-be shared with the corresponding pipes of the CMake process itself.
-
-The :command:`execute_process` command is a newer more powerful version of
-:command:`exec_program`, but the old command has been kept for compatibility.
-Both commands run while CMake is processing the project prior to build
-system generation. Use :command:`add_custom_target` and
-:command:`add_custom_command` to create custom commands that run at
-build time.
diff --git a/Help/command/set_property.rst b/Help/command/set_property.rst
index d446a2d..ca19e0c 100644
--- a/Help/command/set_property.rst
+++ b/Help/command/set_property.rst
@@ -90,7 +90,7 @@ It must be one of the following:
for tests created by the :command:`add_test(NAME)` signature.
``CACHE``
- Scope must name zero or more cache existing entries.
+ Scope must name zero or more existing cache entries.
The required ``PROPERTY`` option is immediately followed by the name of
the property to set. Remaining arguments are used to compose the
diff --git a/Help/cpack_gen/archive.rst b/Help/cpack_gen/archive.rst
index 9df3cc4..7f7921d 100644
--- a/Help/cpack_gen/archive.rst
+++ b/Help/cpack_gen/archive.rst
@@ -4,19 +4,19 @@ CPack Archive Generator
CPack generator for packaging files into an archive, which can have
any of the following formats:
- - 7Z - 7zip - (.7z)
- - TBZ2 (.tar.bz2)
- - TGZ (.tar.gz)
- - TXZ (.tar.xz)
- - TZ (.tar.Z)
- - TZST (.tar.zst)
- - ZIP (.zip)
+ - 7Z - 7zip - (``.7z``)
+ - TBZ2 (``.tar.bz2``)
+ - TGZ (``.tar.gz``)
+ - TXZ (``.tar.xz``)
+ - TZ (``.tar.Z``)
+ - TZST (``.tar.zst``)
+ - ZIP (``.zip``)
.. versionadded:: 3.1
- ``7Z`` and ``TXZ`` formats support.
+ 7Z and TXZ formats support.
.. versionadded:: 3.16
- ``TZST`` format support.
+ TZST format support.
When this generator is called from ``CPackSourceConfig.cmake`` (or through
the ``package_source`` target), then the generated archive will contain all
@@ -47,27 +47,34 @@ Variables specific to CPack Archive generator
.. variable:: CPACK_ARCHIVE_FILE_NAME
CPACK_ARCHIVE_<component>_FILE_NAME
- Package file name without extension. The extension is determined from the
- archive format (see list above) and automatically appended to the file name.
- Note that ``<component>`` is all uppercase in the variable name.
+ Package file name without extension.
- The default is ``<CPACK_PACKAGE_FILE_NAME>[-<component>]``, with spaces
- replaced by '-'.
+ :Default: The default is ``<CPACK_PACKAGE_FILE_NAME>[-<component>]``, with spaces
+ replaced by '-'.
+
+ The extension is determined from the archive format (see list above) and
+ automatically appended to the file name. Note that ``<component>`` is all
+ uppercase in the variable name.
.. versionadded:: 3.9
- Per-component ``CPACK_ARCHIVE_<component>_FILE_NAME`` variables.
+ Per-component :variable:`!CPACK_ARCHIVE_<component>_FILE_NAME` variables.
.. variable:: CPACK_ARCHIVE_FILE_EXTENSION
.. versionadded:: 3.25
- Package file extension. Default values are given in the list above.
+ Package file extension.
+
+ :Default: Default values are given in the list above.
.. variable:: CPACK_ARCHIVE_COMPONENT_INSTALL
- Enable component packaging. If enabled (ON), then the archive generator
- creates multiple packages. The default is OFF, which means that a single
- package containing files of all components is generated.
+ Enable component packaging.
+
+ :Default: ``OFF``
+
+ If enabled (``ON``) multiple packages are generated. By default a single package
+ containing files of all components is generated.
Variables used by CPack Archive generator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -75,15 +82,18 @@ Variables used by CPack Archive generator
These variables are used by the Archive generator, but are also available to
CPack generators which are essentially archives at their core. These include:
- - :cpack_gen:`CPack Cygwin Generator`
- - :cpack_gen:`CPack FreeBSD Generator`
+- :cpack_gen:`CPack Cygwin Generator`
+- :cpack_gen:`CPack FreeBSD Generator`
.. variable:: CPACK_ARCHIVE_THREADS
+ The number of threads to use when performing the compression.
+
.. versionadded:: 3.18
- The number of threads to use when performing the compression. If set to
- ``0``, the number of available cores on the machine will be used instead.
+ :Default: ``1``
+
+ If set to ``0``, the number of available cores on the machine will be used instead.
The default is ``1`` which limits compression to a single thread. Note that
not all compression modes support threading in all environments. Currently,
only the XZ compression may support it.
diff --git a/Help/cpack_gen/deb.rst b/Help/cpack_gen/deb.rst
index 1514dbc..705ec9c 100644
--- a/Help/cpack_gen/deb.rst
+++ b/Help/cpack_gen/deb.rst
@@ -8,16 +8,16 @@ Variables specific to CPack Debian (DEB) generator
The CPack DEB generator may be used to create DEB package using :module:`CPack`.
The CPack DEB generator is a :module:`CPack` generator thus it uses the
-``CPACK_XXX`` variables used by :module:`CPack`.
+:variable:`!CPACK_XXX` variables used by :module:`CPack`.
The CPack DEB generator should work on any Linux host but it will produce
better deb package when Debian specific tools ``dpkg-xxx`` are usable on
the build system.
The CPack DEB generator has specific features which are controlled by the
-specifics ``CPACK_DEBIAN_XXX`` variables.
+specifics :variable:`!CPACK_DEBIAN_XXX` variables.
-``CPACK_DEBIAN_<COMPONENT>_XXXX`` variables may be used in order to have
+:variable:`!CPACK_DEBIAN_<COMPONENT>_XXXX` variables may be used in order to have
**component** specific values. Note however that ``<COMPONENT>`` refers to
the **grouping name** written in upper case. It may be either a component name
or a component GROUP name.
@@ -34,10 +34,10 @@ List of CPack DEB generator specific variables:
Enable component packaging for CPackDEB
- * Mandatory : NO
- * Default : OFF
+ :Mandatory: No
+ :Default: ``OFF``
- If enabled (ON) multiple packages are generated. By default a single package
+ If enabled (``ON``) multiple packages are generated. By default a single package
containing files of all components is generated.
.. variable:: CPACK_DEBIAN_PACKAGE_NAME
@@ -46,16 +46,16 @@ List of CPack DEB generator specific variables:
Set Package control field (variable is automatically transformed to lower
case).
- * Mandatory : YES
- * Default :
+ :Mandatory: Yes
+ :Default:
- :variable:`CPACK_PACKAGE_NAME` for non-component based
installations
- - :variable:`CPACK_DEBIAN_PACKAGE_NAME` suffixed with -<COMPONENT>
+ - :variable:`CPACK_DEBIAN_PACKAGE_NAME` suffixed with ``-<COMPONENT>``
for component-based installations.
.. versionadded:: 3.5
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_NAME`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_NAME` variables.
See https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-source
@@ -66,8 +66,8 @@ List of CPack DEB generator specific variables:
Package file name.
- * Mandatory : YES
- * Default : ``<CPACK_PACKAGE_FILE_NAME>[-<component>].deb``
+ :Mandatory: Yes
+ :Default: ``<CPACK_PACKAGE_FILE_NAME>[-<component>].deb``
This may be set to ``DEB-DEFAULT`` to allow the CPack DEB generator to generate
package file name by itself in deb format::
@@ -98,8 +98,8 @@ List of CPack DEB generator specific variables:
The Debian package epoch
- * Mandatory : No
- * Default : -
+ :Mandatory: No
+ :Default: None
Optional number that should be incremented when changing versioning schemas
or fixing mistakes in the version numbers of older packages.
@@ -108,8 +108,8 @@ List of CPack DEB generator specific variables:
The Debian package version
- * Mandatory : YES
- * Default : :variable:`CPACK_PACKAGE_VERSION`
+ :Mandatory: Yes
+ :Default: :variable:`CPACK_PACKAGE_VERSION`
This variable may contain only alphanumerics (A-Za-z0-9) and the characters
. + - ~ (full stop, plus, hyphen, tilde) and should start with a digit. If
@@ -130,8 +130,8 @@ List of CPack DEB generator specific variables:
The Debian package release - Debian revision number.
- * Mandatory : No
- * Default : -
+ :Mandatory: No
+ :Default: None
This is the numbering of the DEB package itself, i.e. the version of the
packaging and not the version of the content (see
@@ -144,20 +144,20 @@ List of CPack DEB generator specific variables:
The Debian package architecture
- * Mandatory : YES
- * Default : Output of ``dpkg --print-architecture`` (or ``i386``
+ :Mandatory: Yes
+ :Default: Output of ``dpkg --print-architecture`` (or ``i386``
if ``dpkg`` is not found)
.. versionadded:: 3.6
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_ARCHITECTURE`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_ARCHITECTURE` variables.
.. variable:: CPACK_DEBIAN_PACKAGE_DEPENDS
CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS
Sets the Debian dependencies of this package.
- * Mandatory : NO
- * Default :
+ :Mandatory: No
+ :Default:
- An empty string for non-component based installations
- :variable:`CPACK_DEBIAN_PACKAGE_DEPENDS` for component-based
@@ -165,7 +165,7 @@ List of CPack DEB generator specific variables:
.. versionadded:: 3.3
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS` variables.
.. note::
@@ -178,7 +178,9 @@ List of CPack DEB generator specific variables:
only the automatically discovered dependencies will be set for this
component.
- Example::
+ Example:
+
+ .. code-block:: cmake
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libc6 (< 2.4)")
@@ -189,23 +191,23 @@ List of CPack DEB generator specific variables:
Sets inter-component dependencies if listed with
:variable:`CPACK_COMPONENT_<compName>_DEPENDS` variables.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_DEBIAN_PACKAGE_MAINTAINER
The Debian package maintainer
- * Mandatory : YES
- * Default : ``CPACK_PACKAGE_CONTACT``
+ :Mandatory: Yes
+ :Default: :variable:`!CPACK_PACKAGE_CONTACT`
.. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION
CPACK_DEBIAN_<COMPONENT>_DESCRIPTION
The Debian package description
- * Mandatory : YES
- * Default :
+ :Mandatory: Yes
+ :Default:
- :variable:`CPACK_DEBIAN_<COMPONENT>_DESCRIPTION` (component
based installers only) if set, or :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set, or
@@ -218,13 +220,13 @@ List of CPack DEB generator specific variables:
line of description as defined in `Debian Policy Manual`_.
.. versionadded:: 3.3
- Per-component ``CPACK_COMPONENT_<compName>_DESCRIPTION`` variables.
+ Per-component :variable:`!CPACK_COMPONENT_<compName>_DESCRIPTION` variables.
.. versionadded:: 3.16
- Per-component ``CPACK_DEBIAN_<COMPONENT>_DESCRIPTION`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_DESCRIPTION` variables.
.. versionadded:: 3.16
- The ``CPACK_PACKAGE_DESCRIPTION_FILE`` variable.
+ The :variable:`!CPACK_PACKAGE_DESCRIPTION_FILE` variable.
.. _Debian Policy Manual: https://www.debian.org/doc/debian-policy/ch-controlfields.html#description
@@ -233,11 +235,11 @@ List of CPack DEB generator specific variables:
Set Section control field e.g. admin, devel, doc, ...
- * Mandatory : YES
- * Default : "devel"
+ :Mandatory: Yes
+ :Default: ``devel``
.. versionadded:: 3.5
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_SECTION`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_SECTION` variables.
See https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
@@ -249,12 +251,10 @@ List of CPack DEB generator specific variables:
The archive format used for creating the Debian package.
- * Mandatory : YES
- * Default : "gnutar"
-
- Possible value is:
+ :Mandatory: Yes
+ :Default: ``gnutar``
- - gnutar
+ Possible value is: ``gnutar``
.. note::
@@ -269,8 +269,8 @@ List of CPack DEB generator specific variables:
The compression used for creating the Debian package.
- * Mandatory : YES
- * Default : "gzip"
+ :Mandatory: Yes
+ :Default: ``gzip``
Possible values are:
@@ -298,11 +298,11 @@ List of CPack DEB generator specific variables:
Set Priority control field e.g. required, important, standard, optional,
extra
- * Mandatory : YES
- * Default : "optional"
+ :Mandatory: Yes
+ :Default: ``optional``
.. versionadded:: 3.5
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_PRIORITY`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_PRIORITY` variables.
See https://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities
@@ -312,11 +312,11 @@ List of CPack DEB generator specific variables:
site from which the original source can be obtained and any additional
upstream documentation or information may be found.
- * Mandatory : NO
- * Default : :variable:`CMAKE_PROJECT_HOMEPAGE_URL`
+ :Mandatory: No
+ :Default: :variable:`CMAKE_PROJECT_HOMEPAGE_URL`
.. versionadded:: 3.12
- The ``CMAKE_PROJECT_HOMEPAGE_URL`` variable.
+ The :variable:`!CMAKE_PROJECT_HOMEPAGE_URL` variable.
.. note::
@@ -329,11 +329,11 @@ List of CPack DEB generator specific variables:
May be set to ON in order to use ``dpkg-shlibdeps`` to generate
better package dependency list.
- * Mandatory : NO
- * Default :
+ :Mandatory: No
+ :Default:
- :variable:`CPACK_DEBIAN_PACKAGE_SHLIBDEPS` if set or
- - OFF
+ - ``OFF``
.. note::
@@ -350,7 +350,7 @@ List of CPack DEB generator specific variables:
shared libraries that could not get resolved otherwise.
.. versionadded:: 3.3
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS` variables.
.. versionadded:: 3.6
Correct handling of ``$ORIGIN`` in :variable:`CMAKE_INSTALL_RPATH`.
@@ -363,8 +363,8 @@ List of CPack DEB generator specific variables:
via its ``-l`` option. These will be searched by ``dpkg-shlibdeps`` in order
to find private shared library dependencies.
- * Mandatory : NO
- * Default :
+ :Mandatory: No
+ :Default: None
.. note::
@@ -377,8 +377,8 @@ List of CPack DEB generator specific variables:
May be set when invoking cpack in order to trace debug information
during the CPack DEB generator run.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_DEBIAN_PACKAGE_PREDEPENDS
CPACK_DEBIAN_<COMPONENT>_PACKAGE_PREDEPENDS
@@ -389,58 +389,58 @@ List of CPack DEB generator specific variables:
before even starting the installation of the package which declares the
pre-dependency.
- * Mandatory : NO
- * Default :
+ :Mandatory: No
+ :Default:
- An empty string for non-component based installations
- :variable:`CPACK_DEBIAN_PACKAGE_PREDEPENDS` for component-based
installations.
.. versionadded:: 3.4
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_PREDEPENDS`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_PREDEPENDS` variables.
See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
.. variable:: CPACK_DEBIAN_PACKAGE_ENHANCES
CPACK_DEBIAN_<COMPONENT>_PACKAGE_ENHANCES
- Sets the `Enhances` field of the Debian package.
+ Sets the ``Enhances`` field of the Debian package.
Similar to :variable:`Suggests <CPACK_DEBIAN_PACKAGE_SUGGESTS>` but works
in the opposite direction: declares that a package can enhance the
functionality of another package.
- * Mandatory : NO
- * Default :
+ :Mandatory: No
+ :Default:
- An empty string for non-component based installations
- :variable:`CPACK_DEBIAN_PACKAGE_ENHANCES` for component-based
installations.
.. versionadded:: 3.4
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_ENHANCES`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_ENHANCES` variables.
See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
.. variable:: CPACK_DEBIAN_PACKAGE_BREAKS
CPACK_DEBIAN_<COMPONENT>_PACKAGE_BREAKS
- Sets the `Breaks` field of the Debian package.
+ Sets the ``Breaks`` field of the Debian package.
When a binary package (P) declares that it breaks other packages (B),
- ``dpkg`` will not allow the package (P) which declares `Breaks` be
+ ``dpkg`` will not allow the package (P) which declares ``Breaks`` be
**unpacked** unless the packages that will be broken (B) are deconfigured
first.
As long as the package (P) is configured, the previously deconfigured
packages (B) cannot be reconfigured again.
- * Mandatory : NO
- * Default :
+ :Mandatory: No
+ :Default:
- An empty string for non-component based installations
- :variable:`CPACK_DEBIAN_PACKAGE_BREAKS` for component-based
installations.
.. versionadded:: 3.4
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_BREAKS`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_BREAKS` variables.
See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-breaks
@@ -452,15 +452,15 @@ List of CPack DEB generator specific variables:
field, ``dpkg`` will not allow them to be unpacked on the system at
the same time.
- * Mandatory : NO
- * Default :
+ :Mandatory: No
+ :Default:
- An empty string for non-component based installations
- :variable:`CPACK_DEBIAN_PACKAGE_CONFLICTS` for component-based
installations.
.. versionadded:: 3.4
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONFLICTS`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONFLICTS` variables.
See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-conflicts
@@ -479,15 +479,15 @@ List of CPack DEB generator specific variables:
A virtual package is one which appears in the `Provides` control field of
another package.
- * Mandatory : NO
- * Default :
+ :Mandatory: No
+ :Default:
- An empty string for non-component based installations
- :variable:`CPACK_DEBIAN_PACKAGE_PROVIDES` for component-based
installations.
.. versionadded:: 3.4
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_PROVIDES`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_PROVIDES` variables.
See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-virtual
@@ -498,34 +498,34 @@ List of CPack DEB generator specific variables:
Packages can declare in their control file that they should overwrite
files in certain other packages, or completely replace other packages.
- * Mandatory : NO
- * Default :
+ :Mandatory: No
+ :Default:
- An empty string for non-component based installations
- :variable:`CPACK_DEBIAN_PACKAGE_REPLACES` for component-based
installations.
.. versionadded:: 3.4
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_REPLACES`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_REPLACES` variables.
See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
.. variable:: CPACK_DEBIAN_PACKAGE_RECOMMENDS
CPACK_DEBIAN_<COMPONENT>_PACKAGE_RECOMMENDS
- Sets the `Recommends` field of the Debian package.
+ Sets the ``Recommends`` field of the Debian package.
Allows packages to declare a strong, but not absolute, dependency on other
packages.
- * Mandatory : NO
- * Default :
+ :Mandatory: No
+ :Default:
- An empty string for non-component based installations
- :variable:`CPACK_DEBIAN_PACKAGE_RECOMMENDS` for component-based
installations.
.. versionadded:: 3.4
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_RECOMMENDS`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_RECOMMENDS` variables.
See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
@@ -535,15 +535,15 @@ List of CPack DEB generator specific variables:
Sets the `Suggests` field of the Debian package.
Allows packages to declare a suggested package install grouping.
- * Mandatory : NO
- * Default :
+ :Mandatory: No
+ :Default:
- An empty string for non-component based installations
- :variable:`CPACK_DEBIAN_PACKAGE_SUGGESTS` for component-based
installations.
.. versionadded:: 3.4
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_SUGGESTS`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_SUGGESTS` variables.
See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
@@ -551,8 +551,8 @@ List of CPack DEB generator specific variables:
.. versionadded:: 3.6
- * Mandatory : NO
- * Default : OFF
+ :Mandatory: No
+ :Default: ``OFF``
Allows to generate shlibs control file automatically. Compatibility is defined by
:variable:`CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY` variable value.
@@ -569,11 +569,11 @@ List of CPack DEB generator specific variables:
Compatibility policy for auto-generated shlibs control file.
- * Mandatory : NO
- * Default : "="
+ :Mandatory: No
+ :Default: ``=``
Defines compatibility policy for auto-generated shlibs control file.
- Possible values: "=", ">="
+ Possible values: ``=``, ``>=``
See https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-sharedlibs-shlibdeps
@@ -584,16 +584,18 @@ List of CPack DEB generator specific variables:
control.tar.gz.
Typical usage is for conffiles, postinst, postrm, prerm.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
- Usage::
+ Usage:
+
+ .. code-block:: cmake
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
"${CMAKE_CURRENT_SOURCE_DIR}/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
.. versionadded:: 3.4
- Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONTROL_EXTRA`` variables.
+ Per-component :variable:`!CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONTROL_EXTRA` variables.
.. variable:: CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION
CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONTROL_STRICT_PERMISSION
@@ -603,10 +605,12 @@ List of CPack DEB generator specific variables:
This variable indicates if the Debian policy on control files should be
strictly followed.
- * Mandatory : NO
- * Default : FALSE
+ :Mandatory: No
+ :Default: ``FALSE``
+
+ Usage:
- Usage::
+ .. code-block:: cmake
set(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION TRUE)
@@ -632,8 +636,8 @@ List of CPack DEB generator specific variables:
source) the source from which the binary has been generated should be
indicated with the field ``Source``.
- * Mandatory : NO
- * Default :
+ :Mandatory: No
+ :Default:
- An empty string for non-component based installations
- :variable:`CPACK_DEBIAN_PACKAGE_SOURCE` for component-based
@@ -660,8 +664,8 @@ Dbgsym packaging has its own set of variables:
Enable generation of dbgsym .ddeb package(s).
- * Mandatory : NO
- * Default : OFF
+ :Mandatory: No
+ :Default: ``OFF``
.. note::
@@ -683,7 +687,7 @@ Building Debian packages on Windows
.. versionadded:: 3.10
To communicate UNIX file permissions from the install stage
-to the CPack DEB generator the "cmake_mode_t" NTFS
+to the CPack DEB generator the ``cmake_mode_t`` NTFS
alternate data stream (ADT) is used.
When a filesystem without ADT support is used only owner read/write
@@ -694,7 +698,7 @@ Reproducible packages
.. versionadded:: 3.13
-The environment variable ``SOURCE_DATE_EPOCH`` may be set to a UNIX
+The environment variable :envvar:`!SOURCE_DATE_EPOCH` may be set to a UNIX
timestamp, defined as the number of seconds, excluding leap seconds,
since 01 Jan 1970 00:00:00 UTC. If set, the CPack DEB generator will
use its value for timestamps in the package.
diff --git a/Help/cpack_gen/dmg.rst b/Help/cpack_gen/dmg.rst
index cba7a00..0bd52ec 100644
--- a/Help/cpack_gen/dmg.rst
+++ b/Help/cpack_gen/dmg.rst
@@ -11,14 +11,19 @@ on macOS:
.. variable:: CPACK_DMG_VOLUME_NAME
- The volume name of the generated disk image. Defaults to
- CPACK_PACKAGE_FILE_NAME.
+ The volume name of the generated disk image.
+
+ :Default: :variable:`CPACK_PACKAGE_FILE_NAME`
.. variable:: CPACK_DMG_FORMAT
- The disk image format. Common values are ``UDRO`` (UDIF read-only), ``UDZO`` (UDIF
+ The disk image format.
+
+ :Default: ``UDZO``
+
+ Common values are ``UDRO`` (UDIF read-only), ``UDZO`` (UDIF
zlib-compressed) or ``UDBZ`` (UDIF bzip2-compressed). Refer to ``hdiutil(1)`` for
- more information on other available formats. Defaults to ``UDZO``.
+ more information on other available formats.
.. variable:: CPACK_DMG_DS_STORE
@@ -41,6 +46,8 @@ on macOS:
.. variable:: CPACK_DMG_BACKGROUND_IMAGE
+ :Default:
+
Path to an image file to be used as the background. This file will be
copied to ``.background``/``background.<ext>``, where ``<ext>`` is the original image file
extension. The background image is installed into the image before
@@ -58,13 +65,15 @@ on macOS:
.. versionadded:: 3.23
+ :Default: ``OFF``
+
Control whether :variable:`CPACK_RESOURCE_FILE_LICENSE`, if set to a
non-default value, is used as the license agreement provided when
- mounting the DMG. If ``CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE`` is
+ mounting the DMG. If :variable:`!CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE` is
not set, :manual:`cpack(1)` defaults to off.
In a CMake project that uses the :module:`CPack` module to generate
- ``CPackConfig.cmake``, ``CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE``
+ ``CPackConfig.cmake``, :variable:`!CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE`
must be explicitly enabled by the project to activate the SLA.
See policy :policy:`CMP0133`.
@@ -82,8 +91,8 @@ on macOS:
Directory where license and menu files for different languages are stored.
Setting this causes CPack to look for a ``<language>.menu.txt`` and
``<language>.license.txt`` or ``<language>.license.rtf`` file for every
- language defined in ``CPACK_DMG_SLA_LANGUAGES``. If both this variable and
- ``CPACK_RESOURCE_FILE_LICENSE`` are set, CPack will only look for the menu
+ language defined in :variable:`CPACK_DMG_SLA_LANGUAGES`. If both this variable and
+ :variable:`CPACK_RESOURCE_FILE_LICENSE` are set, CPack will only look for the menu
files and use the same license file for all languages. If both
``<language>.license.txt`` and ``<language>.license.rtf`` exist, the ``.txt``
file will be used.
@@ -120,17 +129,18 @@ on macOS:
.. versionadded:: 3.17
File name when packaging ``<component>`` as its own DMG
- (``CPACK_COMPONENTS_GROUPING`` set to IGNORE).
+ (:variable:`CPACK_COMPONENTS_GROUPING` set to ``IGNORE``).
- - Default: ``CPACK_PACKAGE_FILE_NAME-<component>``
+ :Default: ``CPACK_PACKAGE_FILE_NAME-<component>``
.. variable:: CPACK_DMG_FILESYSTEM
.. versionadded:: 3.21
+ :Default: ``HFS+``
+
The filesystem format. Common values are ``APFS`` and ``HFS+``.
See ``man hdiutil`` for a full list of supported formats.
- Defaults to ``HFS+``.
.. variable:: CPACK_COMMAND_HDIUTIL
diff --git a/Help/cpack_gen/freebsd.rst b/Help/cpack_gen/freebsd.rst
index faf8c74..e97ba49 100644
--- a/Help/cpack_gen/freebsd.rst
+++ b/Help/cpack_gen/freebsd.rst
@@ -19,7 +19,7 @@ be used on FreeBSD, DragonflyBSD, NetBSD, OpenBSD, but also on Linux or OSX,
depending on the installed package-management tools -- using :module:`CPack`.
The CPack FreeBSD generator is a :module:`CPack` generator and uses the
-``CPACK_XXX`` variables used by :module:`CPack`. It tries to re-use packaging
+:variable:`!CPACK_XXX` variables used by :module:`CPack`. It tries to re-use packaging
information that may already be specified for Debian packages for the
:cpack_gen:`CPack DEB Generator`. It also tries to re-use RPM packaging
information when Debian does not specify.
@@ -28,14 +28,14 @@ The CPack FreeBSD generator should work on any host with libpkg installed. The
packages it produces are specific to the host architecture and ABI.
The CPack FreeBSD generator sets package-metadata through
-``CPACK_FREEBSD_XXX`` variables. The CPack FreeBSD generator, unlike the
+:variable:`!CPACK_FREEBSD_XXX` variables. The CPack FreeBSD generator, unlike the
CPack Deb generator, does not specially support componentized packages; a
single package is created from all the software artifacts created through
CMake.
All of the variables can be set specifically for FreeBSD packaging in
the CPackConfig file or in CMakeLists.txt, but most of them have defaults
-that use general settings (e.g. CMAKE_PROJECT_NAME) or Debian-specific
+that use general settings (e.g. :variable:`CMAKE_PROJECT_NAME`) or Debian-specific
variables when those make sense (e.g. the homepage of an upstream project
is usually unchanged by the flavor of packaging). When there is no Debian
information to fall back on, but the RPM packaging has it, fall back to
@@ -46,8 +46,8 @@ the RPM information (e.g. package license).
Sets the package name (in the package manifest, but also affects the
output filename).
- * Mandatory: YES
- * Default:
+ :Mandatory: Yes
+ :Default:
- :variable:`CPACK_PACKAGE_NAME` (this is always set by CPack itself,
based on CMAKE_PROJECT_NAME).
@@ -57,8 +57,8 @@ the RPM information (e.g. package license).
Sets the package comment. This is the short description displayed by
pkg(8) in standard "pkg info" output.
- * Mandatory: YES
- * Default:
+ :Mandatory: Yes
+ :Default:
- :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` (this is always set
by CPack itself, if nothing else sets it explicitly).
@@ -68,14 +68,14 @@ the RPM information (e.g. package license).
Sets the package description. This is the long description of the package,
given by "pkg info" with a specific package as argument.
- * Mandatory: YES
- * Default:
+ :Mandatory: Yes
+ :Default:
- :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` (this may be set already
for Debian packaging, so it is used as a fallback).
- :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` (this is always set
by CPack itself, if nothing else sets it explicitly).
- - :variable:`PROJECT_DESCRIPTION` (this can be set with the DESCRIPTION
+ - :variable:`PROJECT_DESCRIPTION` (this can be set with the ``DESCRIPTION``
parameter for :command:`project`).
.. variable:: CPACK_FREEBSD_PACKAGE_WWW
@@ -84,15 +84,15 @@ the RPM information (e.g. package license).
site from which the original source can be obtained and any additional
upstream documentation or information may be found.
- * Mandatory: YES
- * Default:
+ :Mandatory: Yes
+ :Default:
- :variable:`CPACK_PACKAGE_HOMEPAGE_URL`, or if that is not set,
- :variable:`CPACK_DEBIAN_PACKAGE_HOMEPAGE` (this may be set already
for Debian packaging, so it is used as a fallback).
.. versionadded:: 3.12
- The ``CPACK_PACKAGE_HOMEPAGE_URL`` variable.
+ The :variable:`!CPACK_PACKAGE_HOMEPAGE_URL` variable.
.. variable:: CPACK_FREEBSD_PACKAGE_LICENSE
@@ -100,8 +100,8 @@ the RPM information (e.g. package license).
be one or more license-identifiers that pkg recognizes as acceptable license
identifiers (e.g. "GPLv2").
- * Mandatory: YES
- * Default:
+ :Mandatory: Yes
+ :Default:
- :variable:`CPACK_RPM_PACKAGE_LICENSE`
@@ -112,24 +112,24 @@ the RPM information (e.g. package license).
Other acceptable values are determined by pkg -- those are "dual" or "multi" --
meaning choice (OR) or simultaneous (AND) application of the licenses.
- * Mandatory: NO
- * Default: single
+ :Mandatory: No
+ :Default: single
.. variable:: CPACK_FREEBSD_PACKAGE_MAINTAINER
- The FreeBSD maintainer (e.g. kde@freebsd.org) of this package.
+ The FreeBSD maintainer (e.g. ``kde@freebsd.org``) of this package.
- * Mandatory: YES
- * Default: none
+ :Mandatory: Yes
+ :Default: none
.. variable:: CPACK_FREEBSD_PACKAGE_ORIGIN
The origin (ports label) of this package; for packages built by CPack
outside of the ports system this is of less importance. The default
- puts the package somewhere under misc/, as a stopgap.
+ puts the package somewhere under ``misc/``, as a stopgap.
- * Mandatory: YES
- * Default: misc/<package name>
+ :Mandatory: Yes
+ :Default: ``misc/<package name>``
.. variable:: CPACK_FREEBSD_PACKAGE_CATEGORIES
@@ -137,15 +137,15 @@ the RPM information (e.g. package license).
from ports). If none is set a single category is determined based on
the package origin.
- * Mandatory: YES
- * Default: derived from ORIGIN
+ :Mandatory: Yes
+ :Default: derived from ``ORIGIN``
.. variable:: CPACK_FREEBSD_PACKAGE_DEPS
A list of package origins that should be added as package dependencies.
- These are in the form <category>/<packagename>, e.g. x11/libkonq.
+ These are in the form ``<category>/<packagename>``, e.g. ``x11/libkonq``.
No version information needs to be provided (this is not included
in the manifest).
- * Mandatory: NO
- * Default: empty
+ :Mandatory: No
+ :Default: empty
diff --git a/Help/cpack_gen/nuget.rst b/Help/cpack_gen/nuget.rst
index 3bf7f84..8ee2816 100644
--- a/Help/cpack_gen/nuget.rst
+++ b/Help/cpack_gen/nuget.rst
@@ -5,11 +5,11 @@ CPack NuGet Generator
When build a NuGet package there is no direct way to control an output
filename due a lack of the corresponding CLI option of NuGet, so there
-is no ``CPACK_NUGET_PACKAGE_FILE_NAME`` variable. To form the output filename
+is no :variable:`!CPACK_NUGET_PACKAGE_FILE_NAME` variable. To form the output filename
NuGet uses the package name and the version according to its built-in rules.
Also, be aware that including a top level directory
-(``CPACK_INCLUDE_TOPLEVEL_DIRECTORY``) is ignored by this generator.
+(:variable:`CPACK_INCLUDE_TOPLEVEL_DIRECTORY`) is ignored by this generator.
Variables specific to CPack NuGet generator
@@ -17,10 +17,10 @@ Variables specific to CPack NuGet generator
The CPack NuGet generator may be used to create NuGet packages using
:module:`CPack`. The CPack NuGet generator is a :module:`CPack` generator thus
-it uses the ``CPACK_XXX`` variables used by :module:`CPack`.
+it uses the :variable:`!CPACK_XXX` variables used by :module:`CPack`.
The CPack NuGet generator has specific features which are controlled by the
-specifics ``CPACK_NUGET_XXX`` variables. In the "one per group" mode
+specifics :variable:`!CPACK_NUGET_XXX` variables. In the "one per group" mode
(see :variable:`CPACK_COMPONENTS_GROUPING`), ``<compName>`` placeholder
in the variables below would contain a group name (uppercased and turned into
a "C" identifier).
@@ -31,8 +31,8 @@ List of CPack NuGet generator specific variables:
Enable component packaging for CPack NuGet generator
- * Mandatory : NO
- * Default : OFF
+ :Mandatory: No
+ :Default: ``OFF``
.. variable:: CPACK_NUGET_PACKAGE_NAME
CPACK_NUGET_<compName>_PACKAGE_NAME
@@ -40,26 +40,27 @@ List of CPack NuGet generator specific variables:
The NUGET package name. ``CPACK_NUGET_PACKAGE_NAME`` is used as the
package ``id`` on nuget.org_
- * Mandatory : YES
- * Default : :variable:`CPACK_PACKAGE_NAME`
+ :Mandatory: Yes
+ :Default: :variable:`CPACK_PACKAGE_NAME`
.. variable:: CPACK_NUGET_PACKAGE_VERSION
CPACK_NUGET_<compName>_PACKAGE_VERSION
The NuGet package version.
- * Mandatory : YES
- * Default : :variable:`CPACK_PACKAGE_VERSION`
+ :Mandatory: Yes
+ :Default: :variable:`CPACK_PACKAGE_VERSION`
.. variable:: CPACK_NUGET_PACKAGE_DESCRIPTION
CPACK_NUGET_<compName>_PACKAGE_DESCRIPTION
A long description of the package for UI display.
- * Mandatory : YES
- * Default :
+ :Mandatory: Yes
+ :Default:
+
- :variable:`CPACK_COMPONENT_<compName>_DESCRIPTION`,
- - ``CPACK_COMPONENT_GROUP_<groupName>_DESCRIPTION``,
+ - :variable:`!CPACK_COMPONENT_GROUP_<groupName>_DESCRIPTION`,
- :variable:`CPACK_PACKAGE_DESCRIPTION`
.. variable:: CPACK_NUGET_PACKAGE_AUTHORS
@@ -70,8 +71,8 @@ List of CPack NuGet generator specific variables:
nuget.org_ and are used to cross-reference packages by the same
authors.
- * Mandatory : YES
- * Default : :variable:`CPACK_PACKAGE_VENDOR`
+ :Mandatory: Yes
+ :Default: :variable:`CPACK_PACKAGE_VENDOR`
.. variable:: CPACK_NUGET_PACKAGE_TITLE
CPACK_NUGET_<compName>_PACKAGE_TITLE
@@ -80,10 +81,11 @@ List of CPack NuGet generator specific variables:
as on nuget.org_ and the Package Manager in Visual Studio. If not
specified, the package ID is used.
- * Mandatory : NO
- * Default :
+ :Mandatory: No
+ :Default:
+
- :variable:`CPACK_COMPONENT_<compName>_DISPLAY_NAME`,
- - ``CPACK_COMPONENT_GROUP_<groupName>_DISPLAY_NAME``
+ - :variable:`!CPACK_COMPONENT_GROUP_<groupName>_DISPLAY_NAME`
.. variable:: CPACK_NUGET_PACKAGE_OWNERS
CPACK_NUGET_<compName>_PACKAGE_OWNERS
@@ -92,8 +94,8 @@ List of CPack NuGet generator specific variables:
on nuget.org_. This is often the same list as in authors,
and is ignored when uploading the package to nuget.org_.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_NUGET_PACKAGE_HOMEPAGE_URL
CPACK_NUGET_<compName>_PACKAGE_HOMEPAGE_URL
@@ -101,8 +103,8 @@ List of CPack NuGet generator specific variables:
An URL for the package's home page, often shown in UI displays as well
as nuget.org_.
- * Mandatory : NO
- * Default : :variable:`CPACK_PACKAGE_HOMEPAGE_URL`
+ :Mandatory: No
+ :Default: :variable:`CPACK_PACKAGE_HOMEPAGE_URL`
.. variable:: CPACK_NUGET_PACKAGE_LICENSEURL
CPACK_NUGET_<compName>_PACKAGE_LICENSEURL
@@ -116,8 +118,8 @@ List of CPack NuGet generator specific variables:
An URL for the package's license, often shown in UI displays as well
as on nuget.org_.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION
CPACK_NUGET_<compName>_PACKAGE_LICENSE_EXPRESSION
@@ -131,24 +133,24 @@ List of CPack NuGet generator specific variables:
``MIT OR BSD-3-Clause``. See the `SPDX specification`_ for guidance
on forming complex license expressions.
- If ``CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME`` is specified,
- ``CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION`` is ignored.
+ If :variable:`CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME` is specified,
+ :variable:`!CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION` is ignored.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME
CPACK_NUGET_<compName>_PACKAGE_LICENSE_FILE_NAME
The package's license file in :file:`.txt` or :file:`.md` format.
- If ``CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME`` is specified,
- ``CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION`` is ignored.
+ If :variable:`!CPACK_NUGET_PACKAGE_LICENSE_FILE_NAME` is specified,
+ :variable:`!CPACK_NUGET_PACKAGE_LICENSE_EXPRESSION` is ignored.
.. versionadded:: 3.20
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_NUGET_PACKAGE_ICONURL
CPACK_NUGET_<compName>_PACKAGE_ICONURL
@@ -159,16 +161,16 @@ List of CPack NuGet generator specific variables:
An URL for a 64x64 image with transparency background to use as the
icon for the package in UI display.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_NUGET_PACKAGE_REQUIRE_LICENSE_ACCEPTANCE
When set to a true value, the user will be prompted to accept the license
before installing the package.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_NUGET_PACKAGE_ICON
CPACK_NUGET_<compName>_PACKAGE_ICON
@@ -178,8 +180,8 @@ List of CPack NuGet generator specific variables:
The filename of a 64x64 image with transparency background to use as the
icon for the package in UI display.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_NUGET_PACKAGE_DESCRIPTION_SUMMARY
CPACK_NUGET_<compName>_PACKAGE_DESCRIPTION_SUMMARY
@@ -187,8 +189,8 @@ List of CPack NuGet generator specific variables:
A short description of the package for UI display. If omitted, a
truncated version of description is used.
- * Mandatory : NO
- * Default : :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
+ :Mandatory: No
+ :Default: :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
.. variable:: CPACK_NUGET_PACKAGE_RELEASE_NOTES
CPACK_NUGET_<compName>_PACKAGE_RELEASE_NOTES
@@ -197,16 +199,16 @@ List of CPack NuGet generator specific variables:
often used in UI like the Updates tab of the Visual Studio Package
Manager in place of the package description.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_NUGET_PACKAGE_COPYRIGHT
CPACK_NUGET_<compName>_PACKAGE_COPYRIGHT
Copyright details for the package.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_NUGET_PACKAGE_LANGUAGE
CPACK_NUGET_<compName>_PACKAGE_LANGUAGE
@@ -215,8 +217,8 @@ List of CPack NuGet generator specific variables:
Locale specifier for the package, for example ``en_CA``.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_NUGET_PACKAGE_TAGS
CPACK_NUGET_<compName>_PACKAGE_TAGS
@@ -225,39 +227,38 @@ List of CPack NuGet generator specific variables:
package and aid discoverability of packages through search and
filtering.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_NUGET_PACKAGE_DEPENDENCIES
CPACK_NUGET_<compName>_PACKAGE_DEPENDENCIES
A list of package dependencies.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_NUGET_PACKAGE_DEPENDENCIES_<dependency>_VERSION
CPACK_NUGET_<compName>_PACKAGE_DEPENDENCIES_<dependency>_VERSION
A `version specification`_ for the particular dependency, where
``<dependency>`` is an item of the dependency list (see above)
- transformed with ``MAKE_C_IDENTIFIER`` function of :command:`string`
- command.
+ transformed with :command:`string(MAKE_C_IDENTIFIER)` command.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: None
.. variable:: CPACK_NUGET_PACKAGE_DEBUG
Enable debug messages while executing CPack NuGet generator.
- * Mandatory : NO
- * Default : OFF
+ :Mandatory: No
+ :Default: ``OFF``
.. _nuget.org: https://www.nuget.org
.. _version specification: https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges
-.. _SPDX license identifier: https://spdx.github.io/spdx-spec/SPDX-license-list
-.. _SPDX specification: https://spdx.github.io/spdx-spec/SPDX-license-expressions
+.. _SPDX license identifier: https://spdx.org/licenses
+.. _SPDX specification: https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions
.. NuGet spec docs https://docs.microsoft.com/en-us/nuget/reference/nuspec
diff --git a/Help/cpack_gen/rpm.rst b/Help/cpack_gen/rpm.rst
index b1e0077..7b91261 100644
--- a/Help/cpack_gen/rpm.rst
+++ b/Help/cpack_gen/rpm.rst
@@ -8,27 +8,27 @@ Variables specific to CPack RPM generator
The CPack RPM generator may be used to create RPM packages using :module:`CPack`.
The CPack RPM generator is a :module:`CPack` generator thus it uses the
-``CPACK_XXX`` variables used by :module:`CPack`.
+:variable:`!CPACK_XXX` variables used by :module:`CPack`.
The CPack RPM generator has specific features which are controlled by the specifics
-``CPACK_RPM_XXX`` variables.
+:variable:`!CPACK_RPM_XXX` variables.
-``CPACK_RPM_<COMPONENT>_XXXX`` variables may be used in order to have
-**component** specific values. Note however that ``<COMPONENT>`` refers to the
+:variable:`!CPACK_RPM_<COMPONENT>_XXXX` variables may be used in order to have
+**component-specific** values. Note however that ``<COMPONENT>`` refers to the
**grouping name** written in upper case. It may be either a component name or
-a component GROUP name. Usually those variables correspond to RPM spec file
+a component GROUP name. Usually, those variables correspond to RPM spec file
entities. One may find information about spec files here
-https://rpm.org/documentation
+https://rpm.org/documentation.
.. versionchanged:: 3.6
`<COMPONENT>` part of variables is preferred to be in upper case (e.g. if
- component is named ``foo`` then use ``CPACK_RPM_FOO_XXXX`` variable name format)
- as is with other ``CPACK_<COMPONENT>_XXXX`` variables.
+ component is named ``foo`` then use :variable:`!CPACK_RPM_FOO_XXXX` variable
+ name format) as is with other :variable:`!CPACK_<COMPONENT>_XXXX` variables.
For the purposes of back compatibility (CMake/CPack version 3.5 and lower)
support for same cased component (e.g. ``fOo`` would be used as
- ``CPACK_RPM_fOo_XXXX``) is still supported for variables defined in older
- versions of CMake/CPack but is not guaranteed for variables that
+ :variable:`!CPACK_RPM_fOo_XXXX`) is still supported for variables defined in
+ older versions of CMake/CPack but is not guaranteed for variables that
will be added in the future. For the sake of back compatibility same cased
component variables also override upper cased versions where both are
present.
@@ -45,8 +45,8 @@ List of CPack RPM generator specific variables:
Enable component packaging for CPack RPM generator
- * Mandatory : NO
- * Default : OFF
+ :Mandatory: No
+ :Default: ``OFF``
If enabled (``ON``) multiple packages are generated. By default
a single package containing files of all components is generated.
@@ -56,22 +56,22 @@ List of CPack RPM generator specific variables:
The RPM package summary.
- * Mandatory : YES
- * Default : :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
+ :Mandatory: Yes
+ :Default: :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`
.. versionadded:: 3.2
- Per-component ``CPACK_RPM_<component>_PACKAGE_SUMMARY`` variables.
+ Per-component :variable:`!CPACK_RPM_<component>_PACKAGE_SUMMARY` variables.
.. variable:: CPACK_RPM_PACKAGE_NAME
CPACK_RPM_<component>_PACKAGE_NAME
The RPM package name.
- * Mandatory : YES
- * Default : :variable:`CPACK_PACKAGE_NAME`
+ :Mandatory: Yes
+ :Default: :variable:`CPACK_PACKAGE_NAME`
.. versionadded:: 3.5
- Per-component ``CPACK_RPM_<component>_PACKAGE_NAME`` variables.
+ Per-component :variable:`!CPACK_RPM_<component>_PACKAGE_NAME` variables.
.. variable:: CPACK_RPM_FILE_NAME
CPACK_RPM_<component>_FILE_NAME
@@ -80,8 +80,8 @@ List of CPack RPM generator specific variables:
Package file name.
- * Mandatory : YES
- * Default : ``<CPACK_PACKAGE_FILE_NAME>[-<component>].rpm`` with spaces
+ :Mandatory: Yes
+ :Default: ``<CPACK_PACKAGE_FILE_NAME>[-<component>].rpm`` with spaces
replaced by '-'
This may be set to ``RPM-DEFAULT`` to allow ``rpmbuild`` tool to generate package
@@ -105,8 +105,8 @@ List of CPack RPM generator specific variables:
Main component that is packaged without component suffix.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
This variable can be set to any component or group name so that component or
group rpm package is generated without component suffix in filename and
@@ -118,8 +118,8 @@ List of CPack RPM generator specific variables:
The RPM package epoch
- * Mandatory : No
- * Default : -
+ :Mandatory: No
+ :Default:
Optional number that should be incremented when changing versioning schemas
or fixing mistakes in the version numbers of older packages.
@@ -128,28 +128,28 @@ List of CPack RPM generator specific variables:
The RPM package version.
- * Mandatory : YES
- * Default : :variable:`CPACK_PACKAGE_VERSION`
+ :Mandatory: Yes
+ :Default: :variable:`CPACK_PACKAGE_VERSION`
.. variable:: CPACK_RPM_PACKAGE_ARCHITECTURE
CPACK_RPM_<component>_PACKAGE_ARCHITECTURE
The RPM package architecture.
- * Mandatory : YES
- * Default : Native architecture output by ``uname -m``
+ :Mandatory: Yes
+ :Default: Native architecture output by ``uname -m``
This may be set to ``noarch`` if you know you are building a ``noarch`` package.
.. versionadded:: 3.3
- Per-component ``CPACK_RPM_<component>_PACKAGE_ARCHITECTURE`` variables.
+ Per-component :variable:`!CPACK_RPM_<component>_PACKAGE_ARCHITECTURE` variables.
.. variable:: CPACK_RPM_PACKAGE_RELEASE
The RPM package release.
- * Mandatory : YES
- * Default : 1
+ :Mandatory: Yes
+ :Default: 1
This is the numbering of the RPM package itself, i.e. the version of the
packaging and not the version of the content (see
@@ -169,8 +169,8 @@ List of CPack RPM generator specific variables:
The dist tag that is added RPM ``Release:`` field.
- * Mandatory : NO
- * Default : OFF
+ :Mandatory: No
+ :Default: ``OFF``
This is the reported ``%{dist}`` tag from the current distribution or empty
``%{dist}`` if RPM macro is not set. If this variable is set then RPM
@@ -180,57 +180,61 @@ List of CPack RPM generator specific variables:
The RPM package license policy.
- * Mandatory : YES
- * Default : "unknown"
+ :Mandatory: Yes
+ :Default: "unknown"
.. variable:: CPACK_RPM_PACKAGE_GROUP
CPACK_RPM_<component>_PACKAGE_GROUP
The RPM package group.
- * Mandatory : YES
- * Default : "unknown"
+ :Mandatory: Yes
+ :Default: "unknown"
.. versionadded:: 3.5
- Per-component ``CPACK_RPM_<component>_PACKAGE_GROUP`` variables.
+ Per-component :variable:`!CPACK_RPM_<component>_PACKAGE_GROUP` variables.
.. variable:: CPACK_RPM_PACKAGE_VENDOR
The RPM package vendor.
- * Mandatory : YES
- * Default : CPACK_PACKAGE_VENDOR if set or "unknown"
+ :Mandatory: Yes
+ :Default: CPACK_PACKAGE_VENDOR if set or "unknown"
.. variable:: CPACK_RPM_PACKAGE_URL
CPACK_RPM_<component>_PACKAGE_URL
The projects URL.
- * Mandatory : NO
- * Default : :variable:`CMAKE_PROJECT_HOMEPAGE_URL`
+ :Mandatory: No
+ :Default: :variable:`CMAKE_PROJECT_HOMEPAGE_URL`
.. versionadded:: 3.12
- The ``CMAKE_PROJECT_HOMEPAGE_URL`` variable.
+ The :variable:`!CMAKE_PROJECT_HOMEPAGE_URL` variable.
.. variable:: CPACK_RPM_PACKAGE_DESCRIPTION
CPACK_RPM_<component>_PACKAGE_DESCRIPTION
RPM package description.
- * Mandatory : YES
- * Default : :variable:`CPACK_COMPONENT_<compName>_DESCRIPTION` (component
- based installers only) if set, :variable:`CPACK_PACKAGE_DESCRIPTION_FILE`
- if set or "no package description available"
+ :Mandatory: Yes
+ :Default:
+
+ - :variable:`CPACK_COMPONENT_<compName>_DESCRIPTION`
+ (component based installers only) if set,
+ - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE`
+ if set, or
+ - ``no package description available``
.. versionadded:: 3.2
- Per-component ``CPACK_RPM_<component>_PACKAGE_DESCRIPTION`` variables.
+ Per-component :variable:`!CPACK_RPM_<component>_PACKAGE_DESCRIPTION` variables.
.. variable:: CPACK_RPM_COMPRESSION_TYPE
RPM compression type.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default: (system default)
May be used to override RPM compression type to be used to build the
RPM. For example some Linux distribution now default to ``lzma`` or ``xz``
@@ -239,18 +243,25 @@ List of CPack RPM generator specific variables:
Possible values are:
- - lzma
- - xz
- - bzip2
- - gzip
+ ``lzma``
+ Lempel–Ziv–Markov chain algorithm
+
+ ``xz``
+ XZ Utils compression
+
+ ``bzip2``
+ bzip2 Burrows–Wheeler algorithm
+
+ ``gzip``
+ GNU Gzip compression
.. variable:: CPACK_RPM_PACKAGE_AUTOREQ
CPACK_RPM_<component>_PACKAGE_AUTOREQ
RPM spec autoreq field.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to enable (``1``, ``yes``) or disable (``0``, ``no``) automatic
shared libraries dependency detection. Dependencies are added to requires list.
@@ -264,8 +275,8 @@ List of CPack RPM generator specific variables:
RPM spec autoprov field.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to enable (``1``, ``yes``) or disable (``0``, ``no``)
automatic listing of shared libraries that are provided by the package.
@@ -280,8 +291,8 @@ List of CPack RPM generator specific variables:
RPM spec autoreqprov field.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
Variable enables/disables autoreq and autoprov at the same time.
See :variable:`CPACK_RPM_PACKAGE_AUTOREQ` and
@@ -296,11 +307,13 @@ List of CPack RPM generator specific variables:
RPM spec requires field.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to set RPM dependencies (requires). Note that you must enclose
- the complete requires string between quotes, for example::
+ the complete requires string between quotes, for example:
+
+ .. code-block:: cmake
set(CPACK_RPM_PACKAGE_REQUIRES "python >= 2.5.0, cmake >= 2.8")
@@ -313,11 +326,13 @@ List of CPack RPM generator specific variables:
RPM spec conflicts field.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to set negative RPM dependencies (conflicts). Note that you must
- enclose the complete requires string between quotes, for example::
+ enclose the complete requires string between quotes, for example:
+
+ .. code-block:: cmake
set(CPACK_RPM_PACKAGE_CONFLICTS "libxml2")
@@ -332,11 +347,13 @@ List of CPack RPM generator specific variables:
RPM spec requires(pre) field.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to set RPM preinstall dependencies (requires(pre)). Note that
- you must enclose the complete requires string between quotes, for example::
+ you must enclose the complete requires string between quotes, for example:
+
+ .. code-block:: cmake
set(CPACK_RPM_PACKAGE_REQUIRES_PRE "shadow-utils, initscripts")
@@ -347,11 +364,13 @@ List of CPack RPM generator specific variables:
RPM spec requires(post) field.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to set RPM postinstall dependencies (requires(post)). Note that
- you must enclose the complete requires string between quotes, for example::
+ you must enclose the complete requires string between quotes, for example:
+
+ .. code-block:: cmake
set(CPACK_RPM_PACKAGE_REQUIRES_POST "shadow-utils, initscripts")
@@ -362,12 +381,14 @@ List of CPack RPM generator specific variables:
RPM spec requires(postun) field.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to set RPM postuninstall dependencies (requires(postun)). Note
that you must enclose the complete requires string between quotes, for
- example::
+ example:
+
+ .. code-block:: cmake
set(CPACK_RPM_PACKAGE_REQUIRES_POSTUN "shadow-utils, initscripts")
@@ -378,11 +399,13 @@ List of CPack RPM generator specific variables:
RPM spec requires(preun) field.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to set RPM preuninstall dependencies (requires(preun)). Note that
- you must enclose the complete requires string between quotes, for example::
+ you must enclose the complete requires string between quotes, for example:
+
+ .. code-block:: cmake
set(CPACK_RPM_PACKAGE_REQUIRES_PREUN "shadow-utils, initscripts")
@@ -391,8 +414,8 @@ List of CPack RPM generator specific variables:
RPM spec suggest field.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to set weak RPM dependencies (suggests). If ``rpmbuild`` doesn't
support the ``Suggests`` tag, CPack will emit a warning and ignore this
@@ -404,8 +427,8 @@ List of CPack RPM generator specific variables:
RPM spec provides field.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to set RPM dependencies (provides). The provided package list
of an RPM file could be printed with::
@@ -417,8 +440,8 @@ List of CPack RPM generator specific variables:
RPM spec obsoletes field.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to set RPM packages that are obsoleted by this one.
@@ -426,8 +449,8 @@ List of CPack RPM generator specific variables:
build a relocatable RPM.
- * Mandatory : NO
- * Default : CPACK_PACKAGE_RELOCATABLE
+ :Mandatory: No
+ :Default: CPACK_PACKAGE_RELOCATABLE
If this variable is set to TRUE or ON, the CPack RPM generator will try
to build a relocatable RPM package. A relocatable RPM may
@@ -442,11 +465,10 @@ List of CPack RPM generator specific variables:
.. variable:: CPACK_RPM_SPEC_INSTALL_POST
- Deprecated - use :variable:`CPACK_RPM_SPEC_MORE_DEFINE` instead.
+ .. deprecated:: 2.8.12 Use :variable:`CPACK_RPM_SPEC_MORE_DEFINE` instead.
- * Mandatory : NO
- * Default : -
- * Deprecated: YES
+ :Mandatory: No
+ :Default:
May be used to override the ``__spec_install_post`` section within the
generated spec file. This affects the install step during package creation,
@@ -458,12 +480,14 @@ List of CPack RPM generator specific variables:
RPM extended spec definitions lines.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to add any ``%define`` lines to the generated spec file. An
example of its use is to prevent stripping of executables (but note that
- this may also disable other default post install processing)::
+ this may also disable other default post install processing):
+
+ .. code-block:: cmake
set(CPACK_RPM_SPEC_MORE_DEFINE "%define __spec_install_post /bin/true")
@@ -471,8 +495,8 @@ List of CPack RPM generator specific variables:
Toggle CPack RPM generator debug output.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be set when invoking cpack in order to trace debug information
during CPack RPM run. For example you may launch CPack like this::
@@ -484,8 +508,8 @@ List of CPack RPM generator specific variables:
A user provided spec file.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be set by the user in order to specify a USER binary spec file
to be used by the CPack RPM generator instead of generating the file.
@@ -495,8 +519,8 @@ List of CPack RPM generator specific variables:
Spec file template.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
If set CPack will generate a template for USER specified binary
spec file and stop with an error. For example launch CPack like this::
@@ -513,23 +537,23 @@ List of CPack RPM generator specific variables:
Path to file containing pre install/uninstall/transaction script.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to embed a pre installation/uninstallation/transaction script in the spec file.
The referred script file (or both) will be read and directly
put after the ``%pre`` or ``%preun`` section
If :variable:`CPACK_RPM_COMPONENT_INSTALL` is set to ON the install/uninstall/transaction
script for each component can be overridden with
- ``CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE``,
- ``CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE``, and
- ``CPACK_RPM_<COMPONENT>_PRE_TRANS_SCRIPT_FILE``
+ :variable:`!CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE`,
+ :variable:`!CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE`, and
+ :variable:`!CPACK_RPM_<COMPONENT>_PRE_TRANS_SCRIPT_FILE`
One may verify which scriptlet has been included with::
rpm -qp --scripts package.rpm
.. versionadded:: 3.18
- The ``CPACK_RPM_PRE_TRANS_SCRIPT_FILE`` variable.
+ The :variable:`!CPACK_RPM_PRE_TRANS_SCRIPT_FILE` variable.
.. variable:: CPACK_RPM_POST_INSTALL_SCRIPT_FILE
CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
@@ -537,35 +561,35 @@ List of CPack RPM generator specific variables:
Path to file containing post install/uninstall/transaction script.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to embed a post installation/uninstallation/transaction script in the spec file.
The referred script file (or both) will be read and directly
put after the ``%post`` or ``%postun`` section.
If :variable:`CPACK_RPM_COMPONENT_INSTALL` is set to ON the install/uninstall/transaction
script for each component can be overridden with
- ``CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE``,
- ``CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE``, and
- ``CPACK_RPM_<COMPONENT>_POST_TRANS_SCRIPT_FILE``
+ :variable:`!CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE`,
+ :variable:`!CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE`, and
+ :variable:`!CPACK_RPM_<COMPONENT>_POST_TRANS_SCRIPT_FILE`
One may verify which scriptlet has been included with::
rpm -qp --scripts package.rpm
.. versionadded:: 3.18
- The ``CPACK_RPM_POST_TRANS_SCRIPT_FILE`` variable.
+ The :variable:`!CPACK_RPM_POST_TRANS_SCRIPT_FILE` variable.
.. variable:: CPACK_RPM_USER_FILELIST
CPACK_RPM_<COMPONENT>_USER_FILELIST
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to explicitly specify ``%(<directive>)`` file line
in the spec file. Like ``%config(noreplace)`` or any other directive
that be found in the ``%files`` section. Since
the CPack RPM generator is generating the list of files (and directories) the
- user specified files of the ``CPACK_RPM_<COMPONENT>_USER_FILELIST`` list will
+ user specified files of the :variable:`!CPACK_RPM_<COMPONENT>_USER_FILELIST` list will
be removed from the generated list. If referring to directories do
not add a trailing slash.
@@ -577,8 +601,8 @@ List of CPack RPM generator specific variables:
RPM changelog file.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to embed a changelog in the spec file.
The referred file will be read and directly put after the ``%changelog``
@@ -588,10 +612,20 @@ List of CPack RPM generator specific variables:
list of path to be excluded.
- * Mandatory : NO
- * Default : /etc /etc/init.d /usr /usr/bin /usr/include /usr/lib
- /usr/libx32 /usr/lib64 /usr/share /usr/share/aclocal
- /usr/share/doc
+ :Mandatory: No
+ :Default:
+ The following paths are excluded by default:
+ - ``/etc``
+ - ``/etc/init.d``
+ - ``/usr``
+ - ``/usr/bin``
+ - ``/usr/include``
+ - ``/usr/lib``
+ - ``/usr/libx32``
+ - ``/usr/lib64``
+ - ``/usr/share``
+ - ``/usr/share/aclocal``
+ - ``/usr/share/doc``
May be used to exclude path (directories or files) from the auto-generated
list of paths discovered by CPack RPM. The default value contains a
@@ -607,8 +641,8 @@ List of CPack RPM generator specific variables:
additional list of path to be excluded.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to add more exclude path (directories or files) from the initial
default list of excluded paths. See
@@ -620,8 +654,8 @@ List of CPack RPM generator specific variables:
Packages relocation paths list.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to specify more than one relocation path per relocatable RPM.
Variable contains a list of relocation paths that if relative are prefixed
@@ -637,7 +671,7 @@ List of CPack RPM generator specific variables:
no files/directories/symbolic links on any of the provided prefix locations.
Packages that either do not contain any relocation paths or contain
files/directories/symbolic links that are outside relocation paths print
- out an ``AUTHOR_WARNING`` that RPM will be partially relocatable.
+ out an :command:`AUTHOR_WARNING <message>` that RPM will be partially relocatable.
.. variable:: CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX
@@ -645,8 +679,8 @@ List of CPack RPM generator specific variables:
Per component relocation path install prefix.
- * Mandatory : NO
- * Default : CPACK_PACKAGING_INSTALL_PREFIX
+ :Mandatory: No
+ :Default: :variable:`CPACK_PACKAGING_INSTALL_PREFIX`
May be used to set per component :variable:`CPACK_PACKAGING_INSTALL_PREFIX`
for relocatable RPM packages.
@@ -658,19 +692,33 @@ List of CPack RPM generator specific variables:
Removal of default install prefix from relocation paths list.
- * Mandatory : NO
- * Default : CPACK_PACKAGING_INSTALL_PREFIX or CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX
- are treated as one of relocation paths
+ :Mandatory: No
+ :Default: :variable:`CPACK_PACKAGING_INSTALL_PREFIX` or
+ :variable:`CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX`
+ are treated as one of relocation paths
- May be used to remove CPACK_PACKAGING_INSTALL_PREFIX and CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX
+ May be used to remove :variable:`CPACK_PACKAGING_INSTALL_PREFIX` and
+ :variable:`CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX`
from relocatable RPM prefix paths.
.. variable:: CPACK_RPM_ADDITIONAL_MAN_DIRS
.. versionadded:: 3.3
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
+ Regular expressions that are added by default were taken from ``brp-compress`` RPM macro:
+ - ``/usr/man/man.*``
+ - ``/usr/man/.*/man.*``
+ - ``/usr/info.*``
+ - ``/usr/share/man/man.*``
+ - ``/usr/share/man/.*/man.*``
+ - ``/usr/share/info.*``
+ - ``/usr/kerberos/man.*``
+ - ``/usr/X11R6/man/man.*``
+ - ``/usr/lib/perl5/man/man.*``
+ - ``/usr/share/doc/.*/man/man.*``
+ - ``/usr/lib/.*/man/man.*``
May be used to set additional man dirs that could potentially be compressed
by brp-compress RPM macro. Variable content must be a list of regular
@@ -679,21 +727,6 @@ List of CPack RPM generator specific variables:
present in brp-compress RPM script and that brp-compress script must be
added to RPM configuration by the operating system.
- Regular expressions that are added by default were taken from brp-compress
- RPM macro:
-
- - /usr/man/man.*
- - /usr/man/.*/man.*
- - /usr/info.*
- - /usr/share/man/man.*
- - /usr/share/man/.*/man.*
- - /usr/share/info.*
- - /usr/kerberos/man.*
- - /usr/X11R6/man/man.*
- - /usr/lib/perl5/man/man.*
- - /usr/share/doc/.*/man/man.*
- - /usr/lib/.*/man/man.*
-
.. variable:: CPACK_RPM_DEFAULT_USER
CPACK_RPM_<compName>_DEFAULT_USER
@@ -701,11 +734,11 @@ List of CPack RPM generator specific variables:
default user ownership of RPM content
- * Mandatory : NO
- * Default : root
+ :Mandatory: No
+ :Default: ``root``
Value should be user name and not UID.
- Note that <compName> must be in upper-case.
+ Note that ``<compName>`` must be in upper-case.
.. variable:: CPACK_RPM_DEFAULT_GROUP
CPACK_RPM_<compName>_DEFAULT_GROUP
@@ -714,11 +747,11 @@ List of CPack RPM generator specific variables:
default group ownership of RPM content
- * Mandatory : NO
- * Default : root
+ :Mandatory: No
+ :Default: root
Value should be group name and not GID.
- Note that <compName> must be in upper-case.
+ Note that ``<compName>`` must be in upper-case.
.. variable:: CPACK_RPM_DEFAULT_FILE_PERMISSIONS
CPACK_RPM_<compName>_DEFAULT_FILE_PERMISSIONS
@@ -727,23 +760,23 @@ List of CPack RPM generator specific variables:
default permissions used for packaged files
- * Mandatory : NO
- * Default : - (system default)
+ :Mandatory: No
+ :Default: (system default)
- Accepted values are lists with ``PERMISSIONS``. Valid permissions
+ Accepted values are lists with PERMISSIONS. Valid permissions
are:
- - OWNER_READ
- - OWNER_WRITE
- - OWNER_EXECUTE
- - GROUP_READ
- - GROUP_WRITE
- - GROUP_EXECUTE
- - WORLD_READ
- - WORLD_WRITE
- - WORLD_EXECUTE
+ - ``OWNER_READ``
+ - ``OWNER_WRITE``
+ - ``OWNER_EXECUTE``
+ - ``GROUP_READ``
+ - ``GROUP_WRITE``
+ - ``GROUP_EXECUTE``
+ - ``WORLD_READ``
+ - ``WORLD_WRITE``
+ - ``WORLD_EXECUTE``
- Note that <compName> must be in upper-case.
+ Note that ``<compName>`` must be in upper-case.
.. variable:: CPACK_RPM_DEFAULT_DIR_PERMISSIONS
CPACK_RPM_<compName>_DEFAULT_DIR_PERMISSIONS
@@ -752,12 +785,12 @@ List of CPack RPM generator specific variables:
default permissions used for packaged directories
- * Mandatory : NO
- * Default : - (system default)
+ :Mandatory: No
+ :Default: (system default)
Accepted values are lists with PERMISSIONS. Valid permissions
are the same as for :variable:`CPACK_RPM_DEFAULT_FILE_PERMISSIONS`.
- Note that <compName> must be in upper-case.
+ Note that ``<compName>`` must be in upper-case.
.. variable:: CPACK_RPM_INSTALL_WITH_EXEC
@@ -765,8 +798,8 @@ List of CPack RPM generator specific variables:
force execute permissions on programs and shared libraries
- * Mandatory : NO
- * Default : - (system default)
+ :Mandatory: No
+ :Default: (system default)
Force set owner, group and world execute permissions on programs and shared
libraries. This can be used for creating valid rpm packages on systems such
@@ -782,7 +815,9 @@ Packaging of Symbolic Links
.. versionadded:: 3.3
-The CPack RPM generator supports packaging of symbolic links::
+The CPack RPM generator supports packaging of symbolic links:
+
+.. code-block:: cmake
execute_process(COMMAND ${CMAKE_COMMAND}
-E create_symlink <relative_path_location> <symlink_name>)
@@ -832,8 +867,8 @@ Debuginfo RPM packaging has its own set of variables:
Enable generation of debuginfo RPM package(s).
- * Mandatory : NO
- * Default : OFF
+ :Mandatory: No
+ :Default: ``OFF``
.. note::
@@ -855,8 +890,8 @@ Debuginfo RPM packaging has its own set of variables:
Provides locations of root directories of source files from which binaries
were built.
- * Mandatory : YES if :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is set
- * Default : -
+ :Mandatory: Yes if :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is set
+ :Default:
.. note::
@@ -873,15 +908,15 @@ Debuginfo RPM packaging has its own set of variables:
Prefix of location where sources will be placed during package installation.
- * Mandatory : YES if :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is set
- * Default : "/usr/src/debug/<CPACK_PACKAGE_FILE_NAME>" and
- for component packaging "/usr/src/debug/<CPACK_PACKAGE_FILE_NAME>-<component>"
+ :Mandatory: Yes if :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is set
+ :Default: ``/usr/src/debug/${CPACK_PACKAGE_FILE_NAME}`` and
+ for component packaging ``/usr/src/debug/${CPACK_PACKAGE_FILE_NAME}-<component>``
.. note::
Each source path prefix is additionally suffixed by ``src_<index>`` where
index is index of the path used from :variable:`CPACK_BUILD_SOURCE_DIRS`
- variable. This produces ``<CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX>/src_<index>``
+ variable. This produces ``${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_<index>``
replacement path.
Limitation is that replaced path part must be shorter or of equal
length than the length of its replacement. If that is not the case either
@@ -892,8 +927,12 @@ Debuginfo RPM packaging has its own set of variables:
Directories containing sources that should be excluded from debuginfo packages.
- * Mandatory : NO
- * Default : "/usr /usr/src /usr/src/debug"
+ :Mandatory: No
+ :Default:
+ The following paths are excluded by default:
+ - ``/usr``
+ - ``/usr/src``
+ - ``/usr/src/debug``
Listed paths are owned by other RPM packages and should therefore not be
deleted on debuginfo package uninstallation.
@@ -903,8 +942,8 @@ Debuginfo RPM packaging has its own set of variables:
Paths that should be appended to :variable:`CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS`
for exclusion.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
.. variable:: CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE
@@ -912,8 +951,8 @@ Debuginfo RPM packaging has its own set of variables:
Create a single debuginfo package even if components packaging is set.
- * Mandatory : NO
- * Default : OFF
+ :Mandatory: No
+ :Default: ``OFF``
When this variable is enabled it produces a single debuginfo package even if
component packaging is enabled.
@@ -935,8 +974,8 @@ Debuginfo RPM packaging has its own set of variables:
Debuginfo package file name.
- * Mandatory : NO
- * Default : rpmbuild tool generated package file name
+ :Mandatory: No
+ :Default: rpmbuild tool generated package file name
Alternatively provided debuginfo package file name must end with ``.rpm``
suffix and should differ from file names of other generated packages.
@@ -1003,8 +1042,8 @@ Source RPM packaging has its own set of variables:
Should the content be packaged as a source rpm (default is binary rpm).
- * Mandatory : NO
- * Default : OFF
+ :Mandatory: No
+ :Default: ``OFF``
.. note::
@@ -1016,27 +1055,29 @@ Source RPM packaging has its own set of variables:
Additional command-line parameters provided to :manual:`cmake(1)` executable.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
.. variable:: CPACK_RPM_SOURCE_PKG_PACKAGING_INSTALL_PREFIX
Packaging install prefix that would be provided in :variable:`CPACK_PACKAGING_INSTALL_PREFIX`
variable for producing binary RPM packages.
- * Mandatory : YES
- * Default : "/"
+ :Mandatory: Yes
+ :Default: ``/``
.. variable:: CPACK_RPM_BUILDREQUIRES
List of source rpm build dependencies.
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to set source RPM build dependencies (BuildRequires). Note that
you must enclose the complete build requirements string between quotes, for
- example::
+ example:
+
+ .. code-block:: cmake
set(CPACK_RPM_BUILDREQUIRES "python >= 2.5.0, cmake >= 2.8")
@@ -1044,11 +1085,13 @@ Source RPM packaging has its own set of variables:
.. versionadded:: 3.22
- * Mandatory : NO
- * Default : -
+ :Mandatory: No
+ :Default:
May be used to keep the dependency generator from scanning specific files
or directories for dependencies. Note that you can use a regular
- expression that matches all of the directories or files, for example::
+ expression that matches all of the directories or files, for example:
+
+ .. code-block:: cmake
set(CPACK_RPM_REQUIRES_EXCLUDE_FROM "bin/libqsqloci.*\\.so.*")
diff --git a/Help/guide/using-dependencies/index.rst b/Help/guide/using-dependencies/index.rst
index bb519ad..8b270aa 100644
--- a/Help/guide/using-dependencies/index.rst
+++ b/Help/guide/using-dependencies/index.rst
@@ -277,7 +277,7 @@ for more):
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
- GIT_TAG de6fe184a9ac1a06895cdd1c9b437f0a0bdf14ad # v2.13.4
+ GIT_TAG 605a34765aa5d5ecbf476b4598a862ada971b0cc # v3.0.1
)
FetchContent_MakeAvailable(googletest Catch2)
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 23d8256..8564e7c 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -226,6 +226,8 @@ Variables that Change Behavior
/variable/CMAKE_INSTALL_MESSAGE
/variable/CMAKE_INSTALL_PREFIX
/variable/CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
+ /variable/CMAKE_KATE_FILES_MODE
+ /variable/CMAKE_KATE_MAKE_ARGUMENTS
/variable/CMAKE_LIBRARY_PATH
/variable/CMAKE_LINK_DIRECTORIES_BEFORE
/variable/CMAKE_LINK_LIBRARIES_ONLY_TARGETS
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 9f77562..e48ecd9 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -1080,10 +1080,6 @@ Available commands are:
situations instead. Use ``--`` to stop interpreting options and treat all
remaining arguments as paths, even if they start with ``-``.
-.. option:: server
-
- Launch :manual:`cmake-server(7)` mode.
-
.. option:: sleep <number>...
.. versionadded:: 3.0
diff --git a/Help/variable/CMAKE_KATE_FILES_MODE.rst b/Help/variable/CMAKE_KATE_FILES_MODE.rst
new file mode 100644
index 0000000..195c15d
--- /dev/null
+++ b/Help/variable/CMAKE_KATE_FILES_MODE.rst
@@ -0,0 +1,20 @@
+CMAKE_KATE_FILES_MODE
+---------------------
+
+.. versionadded:: 3.27
+
+This cache variable is used by the Kate project generator and controls
+to what mode the ``files`` entry in the project file will be set. See
+:manual:`cmake-generators(7)`.
+
+Possible values are ``AUTO``, ``SVN``, ``GIT``, ``HG``, ``FOSSIL`` and ``LIST``.
+
+When set to ``LIST``, CMake will put the list of source files known to CMake
+in the project file.
+When set to ``SVN``, ``GIT``, ``HG`` or ``FOSSIL``, CMake will set
+the generated project accordingly to Subversion, git, Mercurial
+or Fossil, and Kate will then use the respective command line tool to
+retrieve the list of files in the project.
+When unset or set to ``AUTO``, CMake will try to detect whether the
+source directory is part of a git or svn checkout or not, and put the
+respective entry into the project file.
diff --git a/Help/variable/CMAKE_KATE_MAKE_ARGUMENTS.rst b/Help/variable/CMAKE_KATE_MAKE_ARGUMENTS.rst
new file mode 100644
index 0000000..c830332
--- /dev/null
+++ b/Help/variable/CMAKE_KATE_MAKE_ARGUMENTS.rst
@@ -0,0 +1,11 @@
+CMAKE_KATE_MAKE_ARGUMENTS
+-------------------------
+
+.. versionadded:: 3.0
+
+This cache variable is used by the Kate project generator. See
+:manual:`cmake-generators(7)`.
+
+This variable holds arguments which are used when Kate invokes the make
+tool. By default it is initialized to hold flags to enable parallel builds
+(using -j typically).
diff --git a/Modules/CMakeFindKate.cmake b/Modules/CMakeFindKate.cmake
index 9aaf6e5..521bc5c 100644
--- a/Modules/CMakeFindKate.cmake
+++ b/Modules/CMakeFindKate.cmake
@@ -3,7 +3,7 @@
# This file is included in CMakeSystemSpecificInformation.cmake if
-# the Eclipse CDT4 extra generator has been selected.
+# the Kate extra generator has been selected.
# Try to find out how many CPUs we have and set the -j argument for make accordingly
@@ -17,5 +17,9 @@ if("${_CMAKE_KATE_PROCESSOR_COUNT}" GREATER 1 AND CMAKE_HOST_UNIX AND "${CMA
set(_CMAKE_KATE_INITIAL_MAKE_ARGS "-j${_CMAKE_KATE_PROCESSOR_COUNT}")
endif()
-# This variable is used by the Eclipse generator and appended to the make invocation commands.
+# This variable is used by the Kate generator and appended to the make invocation commands.
set(CMAKE_KATE_MAKE_ARGUMENTS "${_CMAKE_KATE_INITIAL_MAKE_ARGS}" CACHE STRING "Additional command line arguments when Kate invokes make. Enter e.g. -j<some_number> to get parallel builds")
+
+
+set(CMAKE_KATE_FILES_MODE "AUTO" CACHE STRING "Option to override the version control detection and force a mode for the Kate project.")
+set_property(CACHE CMAKE_KATE_FILES_MODE PROPERTY STRINGS "AUTO;SVN;GIT;LIST")
diff --git a/Modules/CTestTargets.cmake b/Modules/CTestTargets.cmake
index b91b48e..99ef8e5 100644
--- a/Modules/CTestTargets.cmake
+++ b/Modules/CTestTargets.cmake
@@ -41,7 +41,7 @@ set(__conf_types "")
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_isMultiConfig)
# We need to pass the configuration type on the test command line.
- set(__conf_types -C "${CMAKE_CFG_INTDIR}")
+ set(__conf_types -C "$<CONFIG>")
endif()
# Add convenience targets. Do this at most once in case of nested
diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake
index e134329..8dcc1d5 100644
--- a/Modules/CheckFortranSourceCompiles.cmake
+++ b/Modules/CheckFortranSourceCompiles.cmake
@@ -19,18 +19,22 @@ Check if given Fortran source compiles and links into an executable.
)
Checks that the source supplied in ``<code>`` can be compiled as a Fortran
- source file and linked as an executable. The ``<code>`` must be a Fortran program
- containing at least an ``end`` statement--for example:
+ source file and linked as an executable. The ``<code>`` must be a Fortran
+ ``program``.
.. code-block:: cmake
- check_fortran_source_compiles("character :: b; error stop b; end" F2018ESTOPOK SRC_EXT F90)
+ check_fortran_source_compiles("program test
+ error stop
+ end program"
+ HAVE_ERROR_STOP
+ SRC_EXT .F90)
This command can help avoid costly build processes when a compiler lacks support
for a necessary feature, or a particular vendor library is not compatible with
the Fortran compiler version being used. This generate-time check may advise the
user of such before the main build process. See also the
- :command:`check_fortran_source_runs` command to actually run the compiled code.
+ :command:`check_fortran_source_runs` command to run the compiled code.
The result will be stored in the internal cache
variable ``<resultVar>``, with a boolean true value for success and boolean
diff --git a/Modules/CheckFortranSourceRuns.cmake b/Modules/CheckFortranSourceRuns.cmake
index 28f713f..985c765 100644
--- a/Modules/CheckFortranSourceRuns.cmake
+++ b/Modules/CheckFortranSourceRuns.cmake
@@ -18,12 +18,16 @@ subsequently be run.
[SRC_EXT <extension>])
Check that the source supplied in ``<code>`` can be compiled as a Fortran source
- file, linked as an executable and then run. The ``<code>`` must be a Fortran program
- containing at least an ``end`` statement--for example:
+ file, linked as an executable and then run. The ``<code>`` must be a Fortran
+ ``program``.
.. code-block:: cmake
- check_fortran_source_runs("real :: x[*]; call co_sum(x); end" F2018coarrayOK)
+ check_fortran_source_runs("program test
+ real :: x[*]
+ call co_sum(x)
+ end program"
+ HAVE_COARRAY)
This command can help avoid costly build processes when a compiler lacks support
for a necessary feature, or a particular vendor library is not compatible with
diff --git a/Modules/CheckSourceCompiles.cmake b/Modules/CheckSourceCompiles.cmake
index ad74c3c..9788798 100644
--- a/Modules/CheckSourceCompiles.cmake
+++ b/Modules/CheckSourceCompiles.cmake
@@ -19,17 +19,34 @@ Check if given source compiles and links into an executable.
[SRC_EXT <extension>])
Check that the source supplied in ``<code>`` can be compiled as a source
- file for the requested language and linked as an executable (so it must
- contain at least a ``main()`` function). The result will be stored in the
- internal cache variable specified by ``<resultVar>``, with a boolean true
- value for success and boolean false for failure. If ``FAIL_REGEX`` is
- provided, then failure is determined by checking if anything in the output
- matches any of the specified regular expressions.
+ file for the requested language and linked as an executable. The result
+ will be stored in the internal cache variable specified by ``<resultVar>``,
+ with a boolean true value for success and boolean false for failure. If
+ ``FAIL_REGEX`` is provided, then failure is determined by checking if
+ anything in the compiler output matches any of the specified regular
+ expressions.
By default, the test source file will be given a file extension that matches
the requested language. The ``SRC_EXT`` option can be used to override this
with ``.<extension>`` instead.
+ The ``<code>`` must contain a valid main program. For example:
+
+ .. code-block:: cmake
+
+ check_source_compiles(C
+ "#include <stdlib.h>
+ #include <stdnoreturn.h>
+ noreturn void f(){ exit(0); }
+ int main(void) { f(); return 1; }"
+ HAVE_NORETURN)
+
+ check_source_compiles(Fortran
+ "program test
+ error stop
+ end program"
+ HAVE_ERROR_STOP)
+
The underlying check is performed by the :command:`try_compile` command. The
compile and link commands can be influenced by setting any of the following
variables prior to calling ``check_source_compiles()``:
@@ -73,7 +90,6 @@ Check if given source compiles and links into an executable.
#]=======================================================================]
-
include_guard(GLOBAL)
include(Internal/CheckSourceCompiles)
diff --git a/Modules/CheckSourceRuns.cmake b/Modules/CheckSourceRuns.cmake
index 8f1cf01..e2fa579 100644
--- a/Modules/CheckSourceRuns.cmake
+++ b/Modules/CheckSourceRuns.cmake
@@ -20,22 +20,40 @@ subsequently be run.
Check that the source supplied in ``<code>`` can be compiled as a source
file for the requested language, linked as an executable and then run.
- The ``<code>`` must contain at least a ``main()`` function. If the ``<code>``
- could be built and run successfully, the internal cache variable specified by
- ``<resultVar>`` will be set to 1, otherwise it will be set to an value that
- evaluates to boolean false (e.g. an empty string or an error message).
+ If the ``<code>`` could be built and run successfully, the internal cache variable
+ specified by ``<resultVar>`` will be set to 1, otherwise it will be set to
+ a value that evaluates to boolean false (e.g. an empty string or an error
+ message).
By default, the test source file will be given a file extension that matches
the requested language. The ``SRC_EXT`` option can be used to override this
with ``.<extension>`` instead.
+ The ``<code>`` must contain a valid main program. For example:
+
+ .. code-block:: cmake
+
+ check_source_runs(C
+ "#include <stdlib.h>
+ #include <stdnoreturn.h>
+ noreturn void f(){ exit(0); }
+ int main(void) { f(); return 1; }"
+ HAVE_NORETURN)
+
+ check_source_runs(Fortran
+ "program test
+ real :: x[*]
+ call co_sum(x)
+ end program"
+ HAVE_COARRAY)
+
The underlying check is performed by the :command:`try_run` command. The
compile and link commands can be influenced by setting any of the following
- variables prior to calling ``check_objc_source_runs()``:
+ variables prior to calling ``check_source_runs()``:
``CMAKE_REQUIRED_FLAGS``
Additional flags to pass to the compiler. Note that the contents of
- :variable:`CMAKE_OBJC_FLAGS <CMAKE_<LANG>_FLAGS>` and its associated
+ :variable:`CMAKE_<LANG>_FLAGS <CMAKE_<LANG>_FLAGS>` and its associated
configuration-specific variable are automatically added to the compiler
command before the contents of ``CMAKE_REQUIRED_FLAGS``.
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake
index b59b38c..6c544fd 100644
--- a/Modules/Compiler/Clang.cmake
+++ b/Modules/Compiler/Clang.cmake
@@ -80,7 +80,7 @@ else()
set(CMAKE_${lang}_COMPILE_OPTIONS_IPO "-flto")
endif()
- if(ANDROID AND CMAKE_ANDROID_NDK_VERSION VERSION_LESS "22")
+ if(ANDROID AND NOT CMAKE_ANDROID_NDK_VERSION VERSION_GREATER_EQUAL "22")
# https://github.com/android-ndk/ndk/issues/242
set(CMAKE_${lang}_LINK_OPTIONS_IPO "-fuse-ld=gold")
endif()
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 3752ceb..18068cb 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -2091,13 +2091,7 @@ function(_ep_get_configuration_subdir_genex suffix_var)
set(suffix "")
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_isMultiConfig)
- if(CMAKE_GENERATOR STREQUAL "Xcode")
- # The Xcode generator does not support per-config sources,
- # so use the underlying build system's placeholder instead.
- set(suffix "/${CMAKE_CFG_INTDIR}")
- else()
- set(suffix "/$<CONFIG>")
- endif()
+ set(suffix "/$<CONFIG>")
endif()
set(${suffix_var} "${suffix}" PARENT_SCOPE)
endfunction()
diff --git a/Modules/FetchContent.cmake b/Modules/FetchContent.cmake
index 9c828b4..8afb9bc 100644
--- a/Modules/FetchContent.cmake
+++ b/Modules/FetchContent.cmake
@@ -762,7 +762,7 @@ frameworks are available to the main build:
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
- GIT_TAG de6fe184a9ac1a06895cdd1c9b437f0a0bdf14ad # v2.13.4
+ GIT_TAG 605a34765aa5d5ecbf476b4598a862ada971b0cc # v3.0.1
)
# After the following call, the CMake targets defined by googletest and
@@ -796,7 +796,7 @@ to the declared details and leaving
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
- GIT_TAG de6fe184a9ac1a06895cdd1c9b437f0a0bdf14ad # v2.13.4
+ GIT_TAG 605a34765aa5d5ecbf476b4598a862ada971b0cc # v3.0.1
FIND_PACKAGE_ARGS
)
@@ -831,7 +831,7 @@ details:
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
- GIT_TAG de6fe184a9ac1a06895cdd1c9b437f0a0bdf14ad # v2.13.4
+ GIT_TAG 605a34765aa5d5ecbf476b4598a862ada971b0cc # v3.0.1
OVERRIDE_FIND_PACKAGE
)
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake
index cd44cc6..c3b6bc3 100644
--- a/Modules/FindCUDAToolkit.cmake
+++ b/Modules/FindCUDAToolkit.cmake
@@ -1122,7 +1122,7 @@ if(CUDAToolkit_FOUND)
_CUDAToolkit_find_and_add_import_lib(nvrtc_builtins DEPS cuda_driver)
_CUDAToolkit_find_and_add_import_lib(nvrtc DEPS nvrtc_builtins nvJitLink)
if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.5.0)
- _CUDAToolkit_find_and_add_import_lib(nvrtc_builtins_static DEPS cuda_driver)
+ _CUDAToolkit_find_and_add_import_lib(nvrtc_builtins_static ALT nvrtc-builtins_static DEPS cuda_driver)
_CUDAToolkit_find_and_add_import_lib(nvrtc_static DEPS nvrtc_builtins_static nvptxcompiler_static nvJitLink_static)
endif()
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 78b1919..f876f43 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -118,9 +118,14 @@ macro(_OpenSSL_test_and_find_dependencies ssl_library crypto_library)
("${crypto_library}" MATCHES "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$")))
set(_OpenSSL_has_dependencies TRUE)
unset(_OpenSSL_has_dependency_zlib)
- if(_OPENSSL_LIBRARIES)
+ if(OPENSSL_USE_STATIC_LIBS)
+ set(_OpenSSL_libs "${_OPENSSL_STATIC_LIBRARIES}")
+ else()
+ set(_OpenSSL_libs "${_OPENSSL_LIBRARIES}")
+ endif()
+ if(_OpenSSL_libs)
unset(_OpenSSL_has_dependency_dl)
- foreach(_OPENSSL_DEP_LIB IN LISTS _OPENSSL_LIBRARIES)
+ foreach(_OPENSSL_DEP_LIB IN LISTS _OpenSSL_libs)
if (_OPENSSL_DEP_LIB STREQUAL "ssl" OR _OPENSSL_DEP_LIB STREQUAL "crypto")
# ignoring: these are the targets
elseif(_OPENSSL_DEP_LIB STREQUAL CMAKE_DL_LIBS)
@@ -137,6 +142,7 @@ macro(_OpenSSL_test_and_find_dependencies ssl_library crypto_library)
set(_OpenSSL_has_dependency_dl TRUE)
find_package(Threads)
endif()
+ unset(_OpenSSL_libs)
else()
set(_OpenSSL_has_dependencies FALSE)
endif()
diff --git a/Modules/Platform/Android.cmake b/Modules/Platform/Android.cmake
index d0f686c..0530988 100644
--- a/Modules/Platform/Android.cmake
+++ b/Modules/Platform/Android.cmake
@@ -39,6 +39,8 @@ endif()
# Commonly used Android toolchain files that pre-date CMake upstream support
# set CMAKE_SYSTEM_VERSION to 1. Avoid interfering with them.
if(CMAKE_SYSTEM_VERSION EQUAL 1)
+ # The NDK legacy toolchain file provides its version number.
+ set(CMAKE_ANDROID_NDK_VERSION ${ANDROID_NDK_MAJOR}.${ANDROID_NDK_MINOR})
return()
endif()
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 9699b09..d82dd37 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 26)
-set(CMake_VERSION_PATCH 20230207)
+set(CMake_VERSION_PATCH 20230208)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/Modules/CMakeBuildUtilities.cmake b/Source/Modules/CMakeBuildUtilities.cmake
index 5cfb0e7..3dc099f 100644
--- a/Source/Modules/CMakeBuildUtilities.cmake
+++ b/Source/Modules/CMakeBuildUtilities.cmake
@@ -54,7 +54,6 @@ if(BUILD_TESTING)
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestProcess "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsC "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsCxx "${kwsys_folder}")
- CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestSharedForward "${kwsys_folder}")
endif()
#---------------------------------------------------------------------
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index ad8fb8b..ff688a4 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -289,28 +289,28 @@ cmComputeLinkInformation::cmComputeLinkInformation(
// Get options needed to link libraries.
if (cmValue flag = this->Makefile->GetDefinition(
- "CMAKE_" + this->LinkLanguage + "_LINK_LIBRARY_FLAG")) {
+ cmStrCat("CMAKE_", this->LinkLanguage, "_LINK_LIBRARY_FLAG"))) {
this->LibLinkFlag = *flag;
} else {
this->LibLinkFlag =
this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FLAG");
}
if (cmValue flag = this->Makefile->GetDefinition(
- "CMAKE_" + this->LinkLanguage + "_LINK_LIBRARY_FILE_FLAG")) {
+ cmStrCat("CMAKE_", this->LinkLanguage, "_LINK_LIBRARY_FILE_FLAG"))) {
this->LibLinkFileFlag = *flag;
} else {
this->LibLinkFileFlag =
this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FILE_FLAG");
}
if (cmValue suffix = this->Makefile->GetDefinition(
- "CMAKE_" + this->LinkLanguage + "_LINK_LIBRARY_SUFFIX")) {
+ cmStrCat("CMAKE_", this->LinkLanguage, "_LINK_LIBRARY_SUFFIX"))) {
this->LibLinkSuffix = *suffix;
} else {
this->LibLinkSuffix =
this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_SUFFIX");
}
if (cmValue flag = this->Makefile->GetDefinition(
- "CMAKE_" + this->LinkLanguage + "_LINK_OBJECT_FILE_FLAG")) {
+ cmStrCat("CMAKE_", this->LinkLanguage, "_LINK_OBJECT_FILE_FLAG"))) {
this->ObjLinkFileFlag = *flag;
} else {
this->ObjLinkFileFlag =
@@ -325,7 +325,7 @@ cmComputeLinkInformation::cmComputeLinkInformation(
: "SHARED_LIBRARY");
std::string rtVar =
cmStrCat("CMAKE_", tType, "_RUNTIME_", this->LinkLanguage, "_FLAG");
- std::string rtSepVar = rtVar + "_SEP";
+ std::string rtSepVar = cmStrCat(rtVar, "_SEP");
this->RuntimeFlag = this->Makefile->GetSafeDefinition(rtVar);
this->RuntimeSep = this->Makefile->GetSafeDefinition(rtSepVar);
this->RuntimeAlways = (this->Makefile->GetSafeDefinition(
@@ -1070,8 +1070,8 @@ void cmComputeLinkInformation::AddRuntimeLinkLibrary(std::string const& lang)
if (runtimeLibrary.empty()) {
return;
}
- if (cmValue runtimeLinkOptions = this->Makefile->GetDefinition(
- "CMAKE_" + lang + "_RUNTIME_LIBRARY_LINK_OPTIONS_" + runtimeLibrary)) {
+ if (cmValue runtimeLinkOptions = this->Makefile->GetDefinition(cmStrCat(
+ "CMAKE_", lang, "_RUNTIME_LIBRARY_LINK_OPTIONS_", runtimeLibrary))) {
std::vector<std::string> libsVec = cmExpandedList(*runtimeLinkOptions);
for (std::string const& i : libsVec) {
if (!cm::contains(this->ImplicitLinkLibs, i)) {
@@ -1399,10 +1399,9 @@ void cmComputeLinkInformation::ComputeItemParserInfo()
reg = "^(";
for (std::string const& p : this->LinkPrefixes) {
reg += p;
- reg += "|";
+ reg += '|';
}
- reg += ")";
- reg += "([^/:]*)";
+ reg += ")([^/:]*)";
// Create a regex to match any library name.
std::string reg_any = cmStrCat(reg, libext);
@@ -1479,14 +1478,14 @@ std::string cmComputeLinkInformation::CreateExtensionRegex(
}
// Finish the list.
- libext += ")";
+ libext += ')';
// Add an optional OpenBSD-style version or major.minor.version component.
if (this->OpenBSD || type == LinkShared) {
libext += "(\\.[0-9]+)*";
}
- libext += "$";
+ libext += '$';
return libext;
}
@@ -1697,7 +1696,8 @@ bool cmComputeLinkInformation::CheckImplicitDirItem(LinkEntry const& entry)
case cmPolicies::WARN:
if (this->CMP0060Warn) {
// Print the warning at most once for this item.
- std::string const& wid = "CMP0060-WARNING-GIVEN-" + item.Value;
+ std::string const& wid =
+ cmStrCat("CMP0060-WARNING-GIVEN-", item.Value);
if (!this->CMakeInstance->GetPropertyAsBool(wid)) {
this->CMakeInstance->SetProperty(wid, "1");
this->CMP0060WarnItems.insert(item.Value);
@@ -1859,8 +1859,8 @@ void cmComputeLinkInformation::AddFrameworkItem(LinkEntry const& entry)
: cmGlobalGenerator::FrameworkFormat::Extended);
if (!fwDescriptor) {
std::ostringstream e;
- e << "Could not parse framework path \"" << item << "\" "
- << "linked by target " << this->Target->GetName() << ".";
+ e << "Could not parse framework path \"" << item << "\" linked by target "
+ << this->Target->GetName() << '.';
cmSystemTools::Error(e.str());
return;
}
@@ -1994,9 +1994,9 @@ void cmComputeLinkInformation::HandleBadFullItem(LinkEntry const& entry,
std::ostringstream w;
/* clang-format off */
w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0008) << "\n"
- << "Target \"" << this->Target->GetName() << "\" links to item\n"
- << " " << item << "\n"
- << "which is a full-path but not a valid library file name.";
+ "Target \"" << this->Target->GetName() << "\" links to item\n"
+ " " << item << "\n"
+ "which is a full-path but not a valid library file name.";
/* clang-format on */
this->CMakeInstance->IssueMessage(MessageType::AUTHOR_WARNING, w.str(),
this->Target->GetBacktrace());
@@ -2014,9 +2014,9 @@ void cmComputeLinkInformation::HandleBadFullItem(LinkEntry const& entry,
std::ostringstream e;
/* clang-format off */
e << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0008) << "\n"
- << "Target \"" << this->Target->GetName() << "\" links to item\n"
- << " " << item << "\n"
- << "which is a full-path but not a valid library file name.";
+ "Target \"" << this->Target->GetName() << "\" links to item\n"
+ " " << item << "\n"
+ "which is a full-path but not a valid library file name.";
/* clang-format on */
this->CMakeInstance->IssueMessage(MessageType::FATAL_ERROR, e.str(),
this->Target->GetBacktrace());
@@ -2055,7 +2055,7 @@ bool cmComputeLinkInformation::FinishLinkerSearchDirectories()
case cmPolicies::REQUIRED_IF_USED:
case cmPolicies::REQUIRED_ALWAYS: {
std::ostringstream e;
- e << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0003) << "\n";
+ e << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0003) << '\n';
this->PrintLinkPolicyDiagnosis(e);
this->CMakeInstance->IssueMessage(MessageType::FATAL_ERROR, e.str(),
this->Target->GetBacktrace());
@@ -2075,18 +2075,17 @@ void cmComputeLinkInformation::PrintLinkPolicyDiagnosis(std::ostream& os)
// Tell the user what to do.
/* clang-format off */
os << "Policy CMP0003 should be set before this line. "
- << "Add code such as\n"
- << " if(COMMAND cmake_policy)\n"
- << " cmake_policy(SET CMP0003 NEW)\n"
- << " endif(COMMAND cmake_policy)\n"
- << "as early as possible but after the most recent call to "
- << "cmake_minimum_required or cmake_policy(VERSION). ";
+ "Add code such as\n"
+ " if(COMMAND cmake_policy)\n"
+ " cmake_policy(SET CMP0003 NEW)\n"
+ " endif(COMMAND cmake_policy)\n"
+ "as early as possible but after the most recent call to "
+ "cmake_minimum_required or cmake_policy(VERSION). ";
/* clang-format on */
// List the items that might need the old-style paths.
os << "This warning appears because target \"" << this->Target->GetName()
- << "\" "
- << "links to some libraries for which the linker must search:\n";
+ << "\" links to some libraries for which the linker must search:\n";
{
// Format the list of unknown items to be as short as possible while
// still fitting in the allowed width (a true solution would be the
@@ -2099,7 +2098,7 @@ void cmComputeLinkInformation::PrintLinkPolicyDiagnosis(std::ostream& os)
// output the current line and reset it. Note that the separator
// is either " " or ", " which is always 2 characters.
if (!line.empty() && (line.size() + i.size() + 2) > max_size) {
- os << line << "\n";
+ os << line << '\n';
sep = " ";
line.clear();
}
@@ -2109,7 +2108,7 @@ void cmComputeLinkInformation::PrintLinkPolicyDiagnosis(std::ostream& os)
sep = ", ";
}
if (!line.empty()) {
- os << line << "\n";
+ os << line << '\n';
}
}
@@ -2118,17 +2117,17 @@ void cmComputeLinkInformation::PrintLinkPolicyDiagnosis(std::ostream& os)
std::set<std::string> emitted;
for (std::string const& i : this->OldLinkDirItems) {
if (emitted.insert(cmSystemTools::GetFilenamePath(i)).second) {
- os << " " << i << "\n";
+ os << " " << i << '\n';
}
}
// Explain.
os << "CMake is adding directories in the second list to the linker "
- << "search path in case they are needed to find libraries from the "
- << "first list (for backwards compatibility with CMake 2.4). "
- << "Set policy CMP0003 to OLD or NEW to enable or disable this "
- << "behavior explicitly. "
- << "Run \"cmake --help-policy CMP0003\" for more information.";
+ "search path in case they are needed to find libraries from the "
+ "first list (for backwards compatibility with CMake 2.4). "
+ "Set policy CMP0003 to OLD or NEW to enable or disable this "
+ "behavior explicitly. "
+ "Run \"cmake --help-policy CMP0003\" for more information.";
}
void cmComputeLinkInformation::LoadImplicitLinkInfo()
@@ -2144,7 +2143,7 @@ void cmComputeLinkInformation::LoadImplicitLinkInfo()
if (cmValue libraryArch =
this->Makefile->GetDefinition("CMAKE_LIBRARY_ARCHITECTURE")) {
for (std::string const& i : implicitDirVec) {
- this->ImplicitLinkDirs.insert(i + "/" + *libraryArch);
+ this->ImplicitLinkDirs.insert(cmStrCat(i, '/', *libraryArch));
}
}
@@ -2400,10 +2399,11 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
cmGeneratorTarget::LinkClosure const* lc =
this->Target->GetLinkClosure(this->Config);
for (std::string const& li : lc->Languages) {
- std::string useVar =
- "CMAKE_" + li + "_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH";
+ std::string useVar = cmStrCat(
+ "CMAKE_", li, "_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH");
if (this->Makefile->IsOn(useVar)) {
- std::string dirVar = "CMAKE_" + li + "_IMPLICIT_LINK_DIRECTORIES";
+ std::string dirVar =
+ cmStrCat("CMAKE_", li, "_IMPLICIT_LINK_DIRECTORIES");
if (cmValue dirs = this->Makefile->GetDefinition(dirVar)) {
cmCLI_ExpandListUnique(*dirs, runtimeDirs, emitted);
}
diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx
index 68c65bb..5b63996 100644
--- a/Source/cmCustomCommand.cxx
+++ b/Source/cmCustomCommand.cxx
@@ -7,6 +7,8 @@
#include <cmext/algorithm>
+#include "cmStateSnapshot.h"
+
const std::vector<std::string>& cmCustomCommand::GetOutputs() const
{
return this->Outputs;
@@ -182,14 +184,19 @@ void cmCustomCommand::SetJobPool(const std::string& job_pool)
this->JobPool = job_pool;
}
-cmPolicies::PolicyStatus cmCustomCommand::GetCMP0116Status() const
-{
- return this->CMP0116Status;
-}
+#define DEFINE_CC_POLICY_ACCESSOR(P) \
+ cmPolicies::PolicyStatus cmCustomCommand::Get##P##Status() const \
+ { \
+ return this->P##Status; \
+ }
+CM_FOR_EACH_CUSTOM_COMMAND_POLICY(DEFINE_CC_POLICY_ACCESSOR)
+#undef DEFINE_CC_POLICY_ACCESSOR
-void cmCustomCommand::SetCMP0116Status(cmPolicies::PolicyStatus cmp0116)
+void cmCustomCommand::RecordPolicyValues(const cmStateSnapshot& snapshot)
{
- this->CMP0116Status = cmp0116;
+#define SET_CC_POLICY(P) this->P##Status = snapshot.GetPolicy(cmPolicies::P);
+ CM_FOR_EACH_CUSTOM_COMMAND_POLICY(SET_CC_POLICY)
+#undef SET_CC_POLICY
}
const std::string& cmCustomCommand::GetTarget() const
diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h
index 5533847..3671ad9 100644
--- a/Source/cmCustomCommand.h
+++ b/Source/cmCustomCommand.h
@@ -17,6 +17,8 @@ class cmImplicitDependsList
{
};
+class cmStateSnapshot;
+
/** \class cmCustomCommand
* \brief A class to encapsulate a custom command
*
@@ -108,9 +110,13 @@ public:
const std::string& GetJobPool() const;
void SetJobPool(const std::string& job_pool);
- /** Set/Get the CMP0116 status (used by the Ninja generator) */
- cmPolicies::PolicyStatus GetCMP0116Status() const;
- void SetCMP0116Status(cmPolicies::PolicyStatus cmp0116);
+#define DECLARE_CC_POLICY_ACCESSOR(P) \
+ cmPolicies::PolicyStatus Get##P##Status() const;
+ CM_FOR_EACH_CUSTOM_COMMAND_POLICY(DECLARE_CC_POLICY_ACCESSOR)
+#undef DECLARE_CC_POLICY_ACCESSOR
+
+ /** Record policy values from state snapshot */
+ void RecordPolicyValues(const cmStateSnapshot& snapshot);
/** Set/Get the associated target */
const std::string& GetTarget() const;
@@ -135,5 +141,11 @@ private:
bool CommandExpandLists = false;
bool StdPipesUTF8 = false;
bool HasMainDependency_ = false;
- cmPolicies::PolicyStatus CMP0116Status = cmPolicies::WARN;
+
+// Policies are NEW for synthesized custom commands, and set by cmMakefile for
+// user-created custom commands.
+#define DECLARE_CC_POLICY_FIELD(P) \
+ cmPolicies::PolicyStatus P##Status = cmPolicies::NEW;
+ CM_FOR_EACH_CUSTOM_COMMAND_POLICY(DECLARE_CC_POLICY_FIELD)
+#undef DECLARE_CC_POLICY_FIELD
};
diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx
index eec43c4..0d0b513 100644
--- a/Source/cmExtraKateGenerator.cxx
+++ b/Source/cmExtraKateGenerator.cxx
@@ -8,6 +8,7 @@
#include <set>
#include <vector>
+#include "cmCMakePath.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
@@ -220,17 +221,58 @@ void cmExtraKateGenerator::CreateDummyKateProjectFile(
std::string cmExtraKateGenerator::GenerateFilesString(
const cmLocalGenerator& lg) const
{
- std::string s = cmStrCat(lg.GetSourceDirectory(), "/.git");
- if (cmSystemTools::FileExists(s)) {
- return "\"git\": 1 ";
+ const cmMakefile* mf = lg.GetMakefile();
+ std::string mode =
+ cmSystemTools::UpperCase(mf->GetSafeDefinition("CMAKE_KATE_FILES_MODE"));
+ static const std::string gitString = "\"git\": 1 ";
+ static const std::string svnString = "\"svn\": 1 ";
+ static const std::string hgString = "\"hg\": 1 ";
+ static const std::string fossilString = "\"fossil\": 1 ";
+
+ if (mode == "SVN") {
+ return svnString;
}
-
- s = cmStrCat(lg.GetSourceDirectory(), "/.svn");
- if (cmSystemTools::FileExists(s)) {
- return "\"svn\": 1 ";
+ if (mode == "GIT") {
+ return gitString;
+ }
+ if (mode == "HG") {
+ return hgString;
}
+ if (mode == "FOSSIL") {
+ return fossilString;
+ }
+
+ // check for the VCS files except when "forced" to "FILES" mode:
+ if (mode != "LIST") {
+ cmCMakePath startDir(lg.GetSourceDirectory(), cmCMakePath::auto_format);
+ // move the directories up to the root directory to see whether we are in
+ // a subdir of a svn, git, hg or fossil checkout
+ for (;;) {
+ std::string s = startDir.String() + "/.git";
+ if (cmSystemTools::FileExists(s)) {
+ return gitString;
+ }
+
+ s = startDir.String() + "/.svn";
+ if (cmSystemTools::FileExists(s)) {
+ return svnString;
+ }
- s = cmStrCat(lg.GetSourceDirectory(), '/');
+ s = startDir.String() + "/.hg";
+ if (cmSystemTools::FileExists(s)) {
+ return hgString;
+ }
+ s = startDir.String() + "/.fslckout";
+ if (cmSystemTools::FileExists(s)) {
+ return fossilString;
+ }
+
+ if (!startDir.HasRelativePath()) { // have we reached the root dir ?
+ break;
+ }
+ startDir = startDir.GetParentPath();
+ }
+ }
std::set<std::string> files;
std::string tmp;
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 4cfec22..492f848 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2911,7 +2911,7 @@ void cmGlobalGenerator::AddGlobalTarget_Install(
singleLine.push_back(cfgArg);
cfgArg = "-DEFFECTIVE_PLATFORM_NAME=$(EFFECTIVE_PLATFORM_NAME)";
} else {
- cfgArg += *mf->GetDefinition("CMAKE_CFG_INTDIR");
+ cfgArg += this->GetCMakeCFGIntDir();
}
singleLine.push_back(cfgArg);
}
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index 3da15f6..b1f2b4a 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -22,7 +22,6 @@
#include "cmLocalGhsMultiGenerator.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
-#include "cmPolicies.h"
#include "cmSourceFile.h"
#include "cmState.h"
#include "cmStateTypes.h"
@@ -717,7 +716,6 @@ bool cmGlobalGhsMultiGenerator::AddCheckTarget()
cc->SetDepends(listFiles);
cc->SetCommandLines(commandLines);
cc->SetComment("Checking Build System");
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetStdPipesUTF8(true);
@@ -747,7 +745,6 @@ void cmGlobalGhsMultiGenerator::AddAllTarget()
// Use no actual command lines so that the target itself is not
// considered always out of date.
auto cc = cm::make_unique<cmCustomCommand>();
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetComment("Build all projects");
cmTarget* allBuild = gen[0]->AddUtilityCommand(this->GetAllTargetName(),
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 93aa30a..b5e1529 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -318,12 +318,6 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
}
}
- if (build.Variables.count("dyndep") > 0) {
- // The ninja 'cleandead' operation does not account for outputs
- // discovered by 'dyndep' bindings. Avoid removing them.
- this->DisableCleandead = true;
- }
-
os << buildStr << arguments << assignments << "\n";
}
@@ -591,7 +585,6 @@ void cmGlobalNinjaGenerator::Generate()
this->InitOutputPathPrefix();
this->TargetAll = this->NinjaOutputPath("all");
this->CMakeCacheFile = this->NinjaOutputPath("CMakeCache.txt");
- this->DisableCleandead = false;
this->DiagnosedCxxModuleNinjaSupport = false;
this->ClangTidyExportFixesDirs.clear();
this->ClangTidyExportFixesFiles.clear();
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 1436c83..6d23e89 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -596,7 +596,6 @@ private:
std::string OutputPathPrefix;
std::string TargetAll;
std::string CMakeCacheFile;
- bool DisableCleandead = false;
struct ByConfig
{
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 647fc2d..2e2c8b6 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -169,7 +169,6 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
cm::static_reference_cast<cmLocalVisualStudio7Generator>(generators[0]);
auto cc = cm::make_unique<cmCustomCommand>();
- cc->SetCMP0116Status(cmPolicies::NEW);
cmTarget* tgt = lg.AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, false,
std::move(cc));
@@ -225,7 +224,6 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
cc->SetByproducts(byproducts);
cc->SetCommandLines(verifyCommandLines);
cc->SetComment("Checking File Globs");
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetStdPipesUTF8(stdPipesUTF8);
lg.AddCustomCommandToTarget(CMAKE_CHECK_BUILD_SYSTEM_TARGET,
cmCustomCommandType::PRE_BUILD,
@@ -260,7 +258,6 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
cc->SetDepends(listFiles);
cc->SetCommandLines(commandLines);
cc->SetComment("Checking Build System");
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetStdPipesUTF8(stdPipesUTF8);
if (cmSourceFile* file =
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 31f6f77..cd0fb18 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -201,7 +201,6 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets()
// Use no actual command lines so that the target itself is not
// considered always out of date.
auto cc = cm::make_unique<cmCustomCommand>();
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetComment("Build all projects");
cmTarget* allBuild =
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index f91879e..ed1de16 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -615,7 +615,6 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
auto cc = cm::make_unique<cmCustomCommand>();
cc->SetCommandLines(
cmMakeSingleCommandLine({ "echo", "Build all projects" }));
- cc->SetCMP0116Status(cmPolicies::NEW);
cmTarget* allbuild =
root->AddUtilityCommand("ALL_BUILD", true, std::move(cc));
@@ -655,7 +654,6 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
cmSystemTools::ReplaceString(file, "\\ ", " ");
cc = cm::make_unique<cmCustomCommand>();
cc->SetCommandLines(cmMakeSingleCommandLine({ "make", "-f", file }));
- cc->SetCMP0116Status(cmPolicies::NEW);
cmTarget* check = root->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET,
true, std::move(cc));
@@ -687,7 +685,6 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
cc->SetCommandLines(legacyDependHelperCommandLines);
cc->SetComment("Depend check for xcode");
cc->SetWorkingDirectory(legacyDependHelperDir.c_str());
- cc->SetCMP0116Status(cmPolicies::NEW);
gen->AddCustomCommandToTarget(
target->GetName(), cmCustomCommandType::POST_BUILD, std::move(cc),
cmObjectLibraryCommands::Accept);
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 75ec694..c2138ee 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -827,13 +827,18 @@ cmStateSnapshot cmLocalGenerator::GetStateSnapshot() const
return this->Makefile->GetStateSnapshot();
}
-cmValue cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target,
- const std::string& prop)
+std::string cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target,
+ const std::string& prop,
+ const std::string& config)
{
+ cmValue value = this->Makefile->GetProperty(prop);
if (target) {
- return target->GetProperty(prop);
+ value = target->GetProperty(prop);
+ }
+ if (value) {
+ return cmGeneratorExpression::Evaluate(*value, this, config, target);
}
- return this->Makefile->GetProperty(prop);
+ return "";
}
std::string cmLocalGenerator::ConvertToIncludeReference(
@@ -2841,7 +2846,6 @@ void cmLocalGenerator::CopyPchCompilePdb(
auto cc = cm::make_unique<cmCustomCommand>();
cc->SetCommandLines(commandLines);
cc->SetComment(no_message);
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetStdPipesUTF8(true);
if (this->GetGlobalGenerator()->IsVisualStudio()) {
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 20f23de..bda82bc 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -532,7 +532,9 @@ public:
void CreateEvaluationFileOutputs(const std::string& config);
void ProcessEvaluationFiles(std::vector<std::string>& generatedFiles);
- cmValue GetRuleLauncher(cmGeneratorTarget* target, const std::string& prop);
+ std::string GetRuleLauncher(cmGeneratorTarget* target,
+ const std::string& prop,
+ const std::string& config);
protected:
// The default implementation converts to a Windows shortpath to
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 7172d34..56a41b1 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1003,7 +1003,9 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
std::string launcher;
// Short-circuit if there is no launcher.
- cmValue val = this->GetRuleLauncher(target, "RULE_LAUNCH_CUSTOM");
+ std::string val = this->GetRuleLauncher(
+ target, "RULE_LAUNCH_CUSTOM",
+ this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
if (cmNonempty(val)) {
// Expand rule variables referenced in the given launcher command.
cmRulePlaceholderExpander::RuleVariables vars;
@@ -1022,7 +1024,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
}
vars.Output = output.c_str();
- launcher = *val;
+ launcher = val;
rulePlaceholderExpander->ExpandRuleVariables(this, launcher, vars);
if (!launcher.empty()) {
launcher += " ";
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index ded1647..6806a5b 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -141,7 +141,6 @@ void cmLocalVisualStudio7Generator::FixGlobalTargets()
cc->SetOutputs(force);
cc->SetCommandLines(force_commands);
cc->SetComment(" ");
- cc->SetCMP0116Status(cmPolicies::NEW);
if (cmSourceFile* file =
this->AddCustomCommandToOutput(std::move(cc), true)) {
l->AddSource(file->ResolveFullPath());
@@ -269,7 +268,6 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
cc->SetDepends(listFiles);
cc->SetCommandLines(commandLines);
cc->SetComment(comment.c_str());
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetStdPipesUTF8(true);
this->AddCustomCommandToOutput(std::move(cc), true);
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index aef369e..0ad0e6e 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1117,7 +1117,7 @@ cmTarget* cmMakefile::AddCustomCommandToTarget(
// Always create the byproduct sources and mark them generated.
this->CreateGeneratedOutputs(byproducts);
- cc->SetCMP0116Status(this->GetPolicyStatus(cmPolicies::CMP0116));
+ cc->RecordPolicyValues(this->GetStateSnapshot());
// Dispatch command creation to allow generator expressions in outputs.
this->AddGeneratorAction(
@@ -1156,7 +1156,7 @@ void cmMakefile::AddCustomCommandToOutput(
this->CreateGeneratedOutputs(outputs);
this->CreateGeneratedOutputs(byproducts);
- cc->SetCMP0116Status(this->GetPolicyStatus(cmPolicies::CMP0116));
+ cc->RecordPolicyValues(this->GetStateSnapshot());
// Dispatch command creation to allow generator expressions in outputs.
this->AddGeneratorAction(
@@ -1274,7 +1274,7 @@ cmTarget* cmMakefile::AddUtilityCommand(const std::string& utilityName,
// Always create the byproduct sources and mark them generated.
this->CreateGeneratedOutputs(byproducts);
- cc->SetCMP0116Status(this->GetPolicyStatus(cmPolicies::CMP0116));
+ cc->RecordPolicyValues(this->GetStateSnapshot());
// Dispatch command creation to allow generator expressions in outputs.
this->AddGeneratorAction(
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index e53d28c..41daa5a 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -222,10 +222,11 @@ void cmMakefileExecutableTargetGenerator::WriteNvidiaDeviceExecutableRule(
std::string launcher;
- cmValue val = this->LocalGenerator->GetRuleLauncher(this->GeneratorTarget,
- "RULE_LAUNCH_LINK");
+ std::string val = this->LocalGenerator->GetRuleLauncher(
+ this->GeneratorTarget, "RULE_LAUNCH_LINK",
+ this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
@@ -587,10 +588,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
std::string launcher;
- cmValue val = this->LocalGenerator->GetRuleLauncher(this->GeneratorTarget,
- "RULE_LAUNCH_LINK");
+ std::string val = this->LocalGenerator->GetRuleLauncher(
+ this->GeneratorTarget, "RULE_LAUNCH_LINK",
+ this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 9669293..cb567ff 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -362,10 +362,11 @@ void cmMakefileLibraryTargetGenerator::WriteNvidiaDeviceLibraryRules(
vars.TargetCompilePDB = targetOutPathCompilePDB.c_str();
std::string launcher;
- cmValue val = this->LocalGenerator->GetRuleLauncher(this->GeneratorTarget,
- "RULE_LAUNCH_LINK");
+ std::string val = this->LocalGenerator->GetRuleLauncher(
+ this->GeneratorTarget, "RULE_LAUNCH_LINK",
+ this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
@@ -808,10 +809,11 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
}
std::string launcher;
- cmValue val = this->LocalGenerator->GetRuleLauncher(this->GeneratorTarget,
- "RULE_LAUNCH_LINK");
+ std::string val = this->LocalGenerator->GetRuleLauncher(
+ this->GeneratorTarget, "RULE_LAUNCH_LINK",
+ this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 6612595..2b817c3 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1167,10 +1167,11 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
std::string launcher;
{
- cmValue val = this->LocalGenerator->GetRuleLauncher(
- this->GeneratorTarget, "RULE_LAUNCH_COMPILE");
+ std::string val = this->LocalGenerator->GetRuleLauncher(
+ this->GeneratorTarget, "RULE_LAUNCH_COMPILE",
+ this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
}
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index a1633ca..45a4dda 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -263,10 +263,10 @@ void cmNinjaNormalTargetGenerator::WriteNvidiaDeviceLinkRule(
vars.LanguageCompileFlags = "$LANGUAGE_COMPILE_FLAGS";
std::string launcher;
- cmValue val = this->GetLocalGenerator()->GetRuleLauncher(
- this->GetGeneratorTarget(), "RULE_LAUNCH_LINK");
+ std::string val = this->GetLocalGenerator()->GetRuleLauncher(
+ this->GetGeneratorTarget(), "RULE_LAUNCH_LINK", config);
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
@@ -458,10 +458,10 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile,
}
std::string launcher;
- cmValue val = this->GetLocalGenerator()->GetRuleLauncher(
- this->GetGeneratorTarget(), "RULE_LAUNCH_LINK");
+ std::string val = this->GetLocalGenerator()->GetRuleLauncher(
+ this->GetGeneratorTarget(), "RULE_LAUNCH_LINK", config);
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index b77a363..cea58b7 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -670,10 +670,10 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
cmLocalGenerator::SHELL);
std::string launcher;
- cmValue val = this->GetLocalGenerator()->GetRuleLauncher(
- this->GetGeneratorTarget(), "RULE_LAUNCH_COMPILE");
+ std::string val = this->GetLocalGenerator()->GetRuleLauncher(
+ this->GetGeneratorTarget(), "RULE_LAUNCH_COMPILE", config);
if (cmNonempty(val)) {
- launcher = cmStrCat(*val, ' ');
+ launcher = cmStrCat(val, ' ');
}
std::string const cmakeCmd =
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index fa24f57..568eca3 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -474,6 +474,8 @@ class cmMakefile;
F(CMP0131) \
F(CMP0142)
+#define CM_FOR_EACH_CUSTOM_COMMAND_POLICY(F) F(CMP0116)
+
/** \class cmPolicies
* \brief Handles changes in CMake behavior and policies
*
diff --git a/Source/cmQtAutoGenGlobalInitializer.cxx b/Source/cmQtAutoGenGlobalInitializer.cxx
index b7ea7d6..9e3fe7f 100644
--- a/Source/cmQtAutoGenGlobalInitializer.cxx
+++ b/Source/cmQtAutoGenGlobalInitializer.cxx
@@ -13,7 +13,6 @@
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
-#include "cmPolicies.h"
#include "cmProcessOutput.h"
#include "cmQtAutoGen.h"
#include "cmQtAutoGenInitializer.h"
@@ -173,7 +172,6 @@ void cmQtAutoGenGlobalInitializer::GetOrCreateGlobalTarget(
// Create utility target
auto cc = cm::make_unique<cmCustomCommand>();
cc->SetWorkingDirectory(makefile->GetHomeOutputDirectory().c_str());
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetComment(comment.c_str());
cmTarget* target = localGen->AddUtilityCommand(name, true, std::move(cc));
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 66e591e..410330a 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -1238,7 +1238,6 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
cc->SetDepends(uicDependencies);
cc->SetComment("");
cc->SetWorkingDirectory(this->Dir.Work.c_str());
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetStdPipesUTF8(stdPipesUTF8);
this->LocalGen->AddCustomCommandToOutput(std::move(cc));
@@ -1332,7 +1331,6 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
cc->SetByproducts(timestampTargetProvides);
cc->SetDepends(dependencies);
cc->SetCommandLines(timestampTargetCommandLines);
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cmTarget* timestampTarget = this->LocalGen->AddUtilityCommand(
timestampTargetName, true, std::move(cc));
@@ -1371,7 +1369,6 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
cc->SetCommandLines(commandLines);
cc->SetComment(autogenComment.c_str());
cc->SetWorkingDirectory(this->Dir.Work.c_str());
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetDepfile(this->AutogenTarget.DepFile);
cc->SetStdPipesUTF8(stdPipesUTF8);
@@ -1391,7 +1388,6 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
cc->SetByproducts(autogenByproducts);
cc->SetDepends(dependencies);
cc->SetCommandLines(commandLines);
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetEscapeOldStyle(false);
cc->SetComment(autogenComment.c_str());
cmTarget* autogenTarget = this->LocalGen->AddUtilityCommand(
@@ -1472,7 +1468,6 @@ bool cmQtAutoGenInitializer::InitRccTargets()
auto cc = cm::make_unique<cmCustomCommand>();
cc->SetWorkingDirectory(this->Dir.Work.c_str());
cc->SetCommandLines(commandLines);
- cc->SetCMP0116Status(cmPolicies::NEW);
cc->SetComment(ccComment.c_str());
cc->SetStdPipesUTF8(true);
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx
index 683c18f..b7af859 100644
--- a/Source/cmQtAutoMocUic.cxx
+++ b/Source/cmQtAutoMocUic.cxx
@@ -1756,7 +1756,7 @@ bool cmQtAutoMocUicT::JobProbeDepsMocT::Probe(MappingT const& mapping,
if (this->MocConst().SettingsChanged) {
if (reason != nullptr) {
*reason = cmStrCat("Generating ", this->MessagePath(outputFile),
- ", because the uic settings changed, from ",
+ ", because the moc settings changed, from ",
this->MessagePath(sourceFile));
}
return true;
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 468ff73..dbf961d 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -964,7 +964,7 @@ void cmake::SetArgs(const std::vector<std::string>& args)
return true;
};
- auto ToolsetLamda = [&](std::string const& value, cmake* state) -> bool {
+ auto ToolsetLambda = [&](std::string const& value, cmake* state) -> bool {
if (haveToolset) {
cmSystemTools::Error("Multiple -T options not allowed");
return false;
@@ -1016,7 +1016,7 @@ void cmake::SetArgs(const std::vector<std::string>& args)
CommandArgument::RequiresSeparator::No, PlatformLambda },
CommandArgument{ "-T", "No toolset specified for -T",
CommandArgument::Values::One,
- CommandArgument::RequiresSeparator::No, ToolsetLamda },
+ CommandArgument::RequiresSeparator::No, ToolsetLambda },
CommandArgument{ "--toolchain", "No file specified for --toolchain",
CommandArgument::Values::One, IgnoreAndTrueLambda },
CommandArgument{ "--install-prefix",
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index af02f7f..c8ce900 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -630,7 +630,7 @@ endif()
# Build a list of classes and headers we need to implement the
# selected components. Initialize with required components.
set(KWSYS_CLASSES)
-set(KWSYS_H_FILES Configure SharedForward)
+set(KWSYS_H_FILES Configure)
set(KWSYS_HXX_FILES Configure String)
# Add selected C++ classes.
@@ -1038,6 +1038,10 @@ if(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
set_property(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY CXX_INCLUDE_WHAT_YOU_USE "")
set_property(TARGET ${KWSYS_NAMESPACE}TestsCxx PROPERTY LABELS ${KWSYS_LABELS_EXE})
target_link_libraries(${KWSYS_NAMESPACE}TestsCxx ${KWSYS_TARGET_LINK})
+ get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+ if(_isMultiConfig)
+ set_property(TARGET ${KWSYS_NAMESPACE}TestsCxx APPEND PROPERTY COMPILE_DEFINITIONS BUILD_CONFIG="$<CONFIG>")
+ endif()
set(TEST_SYSTEMTOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(TEST_SYSTEMTOOLS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
@@ -1118,16 +1122,6 @@ if(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
endif()
set_property(SOURCE testProcess.c PROPERTY COMPILE_FLAGS "${testProcess_COMPILE_FLAGS}")
- # Test SharedForward
- configure_file(${PROJECT_SOURCE_DIR}/testSharedForward.c.in
- ${PROJECT_BINARY_DIR}/testSharedForward.c @ONLY IMMEDIATE)
- add_executable(${KWSYS_NAMESPACE}TestSharedForward
- ${PROJECT_BINARY_DIR}/testSharedForward.c)
- set_property(TARGET ${KWSYS_NAMESPACE}TestSharedForward PROPERTY LABELS ${KWSYS_LABELS_EXE})
- add_dependencies(${KWSYS_NAMESPACE}TestSharedForward ${KWSYS_TARGET_C_LINK})
- add_test(kwsys.testSharedForward ${EXEC_DIR}/${KWSYS_NAMESPACE}TestSharedForward 1)
- set_property(TEST kwsys.testSharedForward PROPERTY LABELS ${KWSYS_LABELS_TEST})
-
# Configure some test properties.
if(KWSYS_STANDALONE)
# We expect test to fail
diff --git a/Source/kwsys/SharedForward.h.in b/Source/kwsys/SharedForward.h.in
deleted file mode 100644
index d6ae75c..0000000
--- a/Source/kwsys/SharedForward.h.in
+++ /dev/null
@@ -1,873 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
- file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
-#ifndef @KWSYS_NAMESPACE@_SharedForward_h
-# define @KWSYS_NAMESPACE@_SharedForward_h
-
-/*
- This header is used to create a forwarding executable sets up the
- shared library search path and replaces itself with a real
- executable. This is useful when creating installations on UNIX with
- shared libraries that will run from any install directory. Typical
- usage:
-
- #if defined(CMAKE_INTDIR)
- # define CONFIG_DIR_PRE CMAKE_INTDIR "/"
- # define CONFIG_DIR_POST "/" CMAKE_INTDIR
- #else
- # define CONFIG_DIR_PRE ""
- # define CONFIG_DIR_POST ""
- #endif
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_DIR_BUILD "/path/to/foo-build/bin"
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_BUILD "." CONFIG_DIR_POST
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_INSTALL "../lib/foo-1.2"
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_BUILD CONFIG_DIR_PRE "foo-real"
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_INSTALL
- "../lib/foo-1.2/foo-real"
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_COMMAND "--command"
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_PRINT "--print"
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_LDD "--ldd"
- #if defined(CMAKE_INTDIR)
- # define @KWSYS_NAMESPACE@_SHARED_FORWARD_CONFIG_NAME CMAKE_INTDIR
- #endif
- #include <@KWSYS_NAMESPACE@/SharedForward.h>
- int main(int argc, char** argv)
- {
- return @KWSYS_NAMESPACE@_shared_forward_to_real(argc, argv);
- }
-
- Specify search and executable paths relative to the forwarding
- executable location or as full paths. Include no trailing slash.
- In the case of a multi-configuration build, when CMAKE_INTDIR is
- defined, the DIR_BUILD setting should point at the directory above
- the executable (the one containing the per-configuration
- subdirectory specified by CMAKE_INTDIR). Then PATH_BUILD entries
- and EXE_BUILD should be specified relative to this location and use
- CMAKE_INTDIR as necessary. In the above example imagine appending
- the PATH_BUILD or EXE_BUILD setting to the DIR_BUILD setting. The
- result should form a valid path with per-configuration subdirectory.
-
- Additional paths may be specified in the PATH_BUILD and PATH_INSTALL
- variables by using comma-separated strings. For example:
-
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_BUILD \
- "." CONFIG_DIR_POST, "/path/to/bar-build" CONFIG_DIR_POST
- #define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_INSTALL \
- "../lib/foo-1.2", "../lib/bar-4.5"
-
- See the comments below for specific explanations of each macro.
-*/
-
-/* Disable -Wcast-qual warnings since they are too hard to fix in a
- cross-platform way. */
-# if defined(__clang__) && defined(__has_warning)
-# if __has_warning("-Wcast-qual")
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wcast-qual"
-# endif
-# endif
-
-/* Full path to the directory in which this executable is built. Do
- not include a trailing slash. */
-# if !defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_DIR_BUILD)
-# error "Must define @KWSYS_NAMESPACE@_SHARED_FORWARD_DIR_BUILD"
-# endif
-# if !defined(KWSYS_SHARED_FORWARD_DIR_BUILD)
-# define KWSYS_SHARED_FORWARD_DIR_BUILD \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_DIR_BUILD
-# endif
-
-/* Library search path for build tree. */
-# if !defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_BUILD)
-# error "Must define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_BUILD"
-# endif
-# if !defined(KWSYS_SHARED_FORWARD_PATH_BUILD)
-# define KWSYS_SHARED_FORWARD_PATH_BUILD \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_BUILD
-# endif
-
-/* Library search path for install tree. */
-# if !defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_INSTALL)
-# error "Must define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_INSTALL"
-# endif
-# if !defined(KWSYS_SHARED_FORWARD_PATH_INSTALL)
-# define KWSYS_SHARED_FORWARD_PATH_INSTALL \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_INSTALL
-# endif
-
-/* The real executable to which to forward in the build tree. */
-# if !defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_BUILD)
-# error "Must define @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_BUILD"
-# endif
-# if !defined(KWSYS_SHARED_FORWARD_EXE_BUILD)
-# define KWSYS_SHARED_FORWARD_EXE_BUILD \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_BUILD
-# endif
-
-/* The real executable to which to forward in the install tree. */
-# if !defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_INSTALL)
-# error "Must define @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_INSTALL"
-# endif
-# if !defined(KWSYS_SHARED_FORWARD_EXE_INSTALL)
-# define KWSYS_SHARED_FORWARD_EXE_INSTALL \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_INSTALL
-# endif
-
-/* The configuration name with which this executable was built (Debug/Release).
- */
-# if defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_CONFIG_NAME)
-# define KWSYS_SHARED_FORWARD_CONFIG_NAME \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_CONFIG_NAME
-# else
-# undef KWSYS_SHARED_FORWARD_CONFIG_NAME
-# endif
-
-/* Create command line option to replace executable. */
-# if defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_COMMAND)
-# if !defined(KWSYS_SHARED_FORWARD_OPTION_COMMAND)
-# define KWSYS_SHARED_FORWARD_OPTION_COMMAND \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_COMMAND
-# endif
-# else
-# undef KWSYS_SHARED_FORWARD_OPTION_COMMAND
-# endif
-
-/* Create command line option to print environment setting and exit. */
-# if defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_PRINT)
-# if !defined(KWSYS_SHARED_FORWARD_OPTION_PRINT)
-# define KWSYS_SHARED_FORWARD_OPTION_PRINT \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_PRINT
-# endif
-# else
-# undef KWSYS_SHARED_FORWARD_OPTION_PRINT
-# endif
-
-/* Create command line option to run ldd or equivalent. */
-# if defined(@KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_LDD)
-# if !defined(KWSYS_SHARED_FORWARD_OPTION_LDD)
-# define KWSYS_SHARED_FORWARD_OPTION_LDD \
- @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_LDD
-# endif
-# else
-# undef KWSYS_SHARED_FORWARD_OPTION_LDD
-# endif
-
-/* Include needed system headers. */
-
-# include <errno.h>
-# include <limits.h>
-# include <stddef.h> /* size_t */
-# include <stdio.h>
-# include <stdlib.h>
-# include <string.h>
-
-# if defined(_WIN32) && !defined(__CYGWIN__)
-# include <windows.h>
-
-# include <io.h>
-# include <process.h>
-# define KWSYS_SHARED_FORWARD_ESCAPE_ARGV /* re-escape argv for execvp */
-# else
-# include <sys/stat.h>
-# include <unistd.h>
-# endif
-
-/* Configuration for this platform. */
-
-/* The path separator for this platform. */
-# if defined(_WIN32) && !defined(__CYGWIN__)
-# define KWSYS_SHARED_FORWARD_PATH_SEP ';'
-# define KWSYS_SHARED_FORWARD_PATH_SLASH '\\'
-# else
-# define KWSYS_SHARED_FORWARD_PATH_SEP ':'
-# define KWSYS_SHARED_FORWARD_PATH_SLASH '/'
-# endif
-static const char kwsys_shared_forward_path_sep[2] = {
- KWSYS_SHARED_FORWARD_PATH_SEP, 0
-};
-static const char kwsys_shared_forward_path_slash[2] = {
- KWSYS_SHARED_FORWARD_PATH_SLASH, 0
-};
-
-/* The maximum length of a file name. */
-# if defined(PATH_MAX)
-# define KWSYS_SHARED_FORWARD_MAXPATH PATH_MAX
-# elif defined(MAXPATHLEN)
-# define KWSYS_SHARED_FORWARD_MAXPATH MAXPATHLEN
-# else
-# define KWSYS_SHARED_FORWARD_MAXPATH 16384
-# endif
-
-/* Select the environment variable holding the shared library runtime
- search path for this platform and build configuration. Also select
- ldd command equivalent. */
-
-/* Linux */
-# if defined(__linux)
-# define KWSYS_SHARED_FORWARD_LDD "ldd"
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
-
-/* FreeBSD */
-# elif defined(__FreeBSD__)
-# define KWSYS_SHARED_FORWARD_LDD "ldd"
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
-
-/* OpenBSD */
-# elif defined(__OpenBSD__)
-# define KWSYS_SHARED_FORWARD_LDD "ldd"
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
-
-/* OS X */
-# elif defined(__APPLE__)
-# define KWSYS_SHARED_FORWARD_LDD "otool", "-L"
-# define KWSYS_SHARED_FORWARD_LDD_N 2
-# define KWSYS_SHARED_FORWARD_LDPATH "DYLD_LIBRARY_PATH"
-
-/* AIX */
-# elif defined(_AIX)
-# define KWSYS_SHARED_FORWARD_LDD "dump", "-H"
-# define KWSYS_SHARED_FORWARD_LDD_N 2
-# define KWSYS_SHARED_FORWARD_LDPATH "LIBPATH"
-
-/* SUN */
-# elif defined(__sun)
-# define KWSYS_SHARED_FORWARD_LDD "ldd"
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# include <sys/isa_defs.h>
-# if defined(_ILP32)
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
-# elif defined(_LP64)
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH_64"
-# endif
-
-/* HP-UX */
-# elif defined(__hpux)
-# define KWSYS_SHARED_FORWARD_LDD "chatr"
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# if defined(__LP64__)
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
-# else
-# define KWSYS_SHARED_FORWARD_LDPATH "SHLIB_PATH"
-# endif
-
-/* SGI MIPS */
-# elif defined(__sgi) && defined(_MIPS_SIM)
-# define KWSYS_SHARED_FORWARD_LDD "ldd"
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# if _MIPS_SIM == _ABIO32
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
-# elif _MIPS_SIM == _ABIN32
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARYN32_PATH"
-# elif _MIPS_SIM == _ABI64
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY64_PATH"
-# endif
-
-/* Cygwin */
-# elif defined(__CYGWIN__)
-# define KWSYS_SHARED_FORWARD_LDD \
- "cygcheck" /* TODO: cygwin 1.7 has ldd \
- */
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# define KWSYS_SHARED_FORWARD_LDPATH "PATH"
-
-/* Windows */
-# elif defined(_WIN32)
-# define KWSYS_SHARED_FORWARD_LDPATH "PATH"
-
-/* Guess on this unknown system. */
-# else
-# define KWSYS_SHARED_FORWARD_LDD "ldd"
-# define KWSYS_SHARED_FORWARD_LDD_N 1
-# define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY_PATH"
-# endif
-
-# ifdef KWSYS_SHARED_FORWARD_ESCAPE_ARGV
-typedef struct kwsys_sf_arg_info_s
-{
- const char* arg;
- int size;
- int quote;
-} kwsys_sf_arg_info;
-
-static kwsys_sf_arg_info kwsys_sf_get_arg_info(const char* in)
-{
- /* Initialize information. */
- kwsys_sf_arg_info info;
-
- /* String iterator. */
- const char* c;
-
- /* Keep track of how many backslashes have been encountered in a row. */
- int windows_backslashes = 0;
-
- /* Start with the length of the original argument, plus one for
- either a terminating null or a separating space. */
- info.arg = in;
- info.size = (int)strlen(in) + 1;
- info.quote = 0;
-
- /* Scan the string for characters that require escaping or quoting. */
- for (c = in; *c; ++c) {
- /* Check whether this character needs quotes. */
- if (strchr(" \t?'#&<>|^", *c)) {
- info.quote = 1;
- }
-
- /* On Windows only backslashes and double-quotes need escaping. */
- if (*c == '\\') {
- /* Found a backslash. It may need to be escaped later. */
- ++windows_backslashes;
- } else if (*c == '"') {
- /* Found a double-quote. We need to escape it and all
- immediately preceding backslashes. */
- info.size += windows_backslashes + 1;
- windows_backslashes = 0;
- } else {
- /* Found another character. This eliminates the possibility
- that any immediately preceding backslashes will be
- escaped. */
- windows_backslashes = 0;
- }
- }
-
- /* Check whether the argument needs surrounding quotes. */
- if (info.quote) {
- /* Surrounding quotes are needed. Allocate space for them. */
- info.size += 2;
-
- /* We must escape all ending backslashes when quoting on windows. */
- info.size += windows_backslashes;
- }
-
- return info;
-}
-
-static char* kwsys_sf_get_arg(kwsys_sf_arg_info info, char* out)
-{
- /* String iterator. */
- const char* c;
-
- /* Keep track of how many backslashes have been encountered in a row. */
- int windows_backslashes = 0;
-
- /* Whether the argument must be quoted. */
- if (info.quote) {
- /* Add the opening quote for this argument. */
- *out++ = '"';
- }
-
- /* Scan the string for characters that require escaping or quoting. */
- for (c = info.arg; *c; ++c) {
- /* On Windows only backslashes and double-quotes need escaping. */
- if (*c == '\\') {
- /* Found a backslash. It may need to be escaped later. */
- ++windows_backslashes;
- } else if (*c == '"') {
- /* Found a double-quote. Escape all immediately preceding
- backslashes. */
- while (windows_backslashes > 0) {
- --windows_backslashes;
- *out++ = '\\';
- }
-
- /* Add the backslash to escape the double-quote. */
- *out++ = '\\';
- } else {
- /* We encountered a normal character. This eliminates any
- escaping needed for preceding backslashes. */
- windows_backslashes = 0;
- }
-
- /* Store this character. */
- *out++ = *c;
- }
-
- if (info.quote) {
- /* Add enough backslashes to escape any trailing ones. */
- while (windows_backslashes > 0) {
- --windows_backslashes;
- *out++ = '\\';
- }
-
- /* Add the closing quote for this argument. */
- *out++ = '"';
- }
-
- /* Store a terminating null without incrementing. */
- *out = 0;
-
- return out;
-}
-# endif
-
-/* Function to convert a logical or relative path to a physical full path. */
-static int kwsys_shared_forward_realpath(const char* in_path, char* out_path)
-{
-# if defined(_WIN32) && !defined(__CYGWIN__)
- /* Implementation for Windows. */
- DWORD n =
- GetFullPathNameA(in_path, KWSYS_SHARED_FORWARD_MAXPATH, out_path, 0);
- return n > 0 && n <= KWSYS_SHARED_FORWARD_MAXPATH;
-# else
- /* Implementation for UNIX. */
- return realpath(in_path, out_path) != 0;
-# endif
-}
-
-static int kwsys_shared_forward_samepath(const char* file1, const char* file2)
-{
-# if defined(_WIN32)
- int result = 0;
- HANDLE h1 = CreateFileA(file1, GENERIC_READ, FILE_SHARE_READ, NULL,
- OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
- HANDLE h2 = CreateFileA(file2, GENERIC_READ, FILE_SHARE_READ, NULL,
- OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
- if (h1 != INVALID_HANDLE_VALUE && h2 != INVALID_HANDLE_VALUE) {
- BY_HANDLE_FILE_INFORMATION fi1;
- BY_HANDLE_FILE_INFORMATION fi2;
- GetFileInformationByHandle(h1, &fi1);
- GetFileInformationByHandle(h2, &fi2);
- result = (fi1.dwVolumeSerialNumber == fi2.dwVolumeSerialNumber &&
- fi1.nFileIndexHigh == fi2.nFileIndexHigh &&
- fi1.nFileIndexLow == fi2.nFileIndexLow);
- }
- CloseHandle(h1);
- CloseHandle(h2);
- return result;
-# else
- struct stat fs1, fs2;
- return (stat(file1, &fs1) == 0 && stat(file2, &fs2) == 0 &&
- memcmp(&fs2.st_dev, &fs1.st_dev, sizeof(fs1.st_dev)) == 0 &&
- memcmp(&fs2.st_ino, &fs1.st_ino, sizeof(fs1.st_ino)) == 0 &&
- fs2.st_size == fs1.st_size);
-# endif
-}
-
-/* Function to report a system error message. */
-static void kwsys_shared_forward_strerror(char* message)
-{
-# if defined(_WIN32) && !defined(__CYGWIN__)
- /* Implementation for Windows. */
- DWORD original = GetLastError();
- DWORD length =
- FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
- 0, original, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- message, KWSYS_SHARED_FORWARD_MAXPATH, 0);
- if (length < 1 || length > KWSYS_SHARED_FORWARD_MAXPATH) {
- /* FormatMessage failed. Use a default message. */
- snprintf(message, KWSYS_SHARED_FORWARD_MAXPATH,
- "Error 0x%lX (FormatMessage failed with error 0x%lX)", original,
- GetLastError());
- }
-# else
- /* Implementation for UNIX. */
- strcpy(message, strerror(errno));
-# endif
-}
-
-/* Functions to execute a child process. */
-static void kwsys_shared_forward_execvp(const char* cmd,
- char const* const* argv)
-{
-# ifdef KWSYS_SHARED_FORWARD_ESCAPE_ARGV
- /* Count the number of arguments. */
- int argc = 0;
- {
- char const* const* argvc;
- for (argvc = argv; *argvc; ++argvc, ++argc) {
- }
- }
-
- /* Create the escaped arguments. */
- {
- char** nargv = (char**)malloc((argc + 1) * sizeof(char*));
- int i;
- for (i = 0; i < argc; ++i) {
- kwsys_sf_arg_info info = kwsys_sf_get_arg_info(argv[i]);
- nargv[i] = (char*)malloc(info.size);
- kwsys_sf_get_arg(info, nargv[i]);
- }
- nargv[argc] = 0;
-
- /* Replace the command line to be used. */
- argv = (char const* const*)nargv;
- }
-# endif
-
-/* Invoke the child process. */
-# if defined(_MSC_VER)
- _execvp(cmd, argv);
-# elif defined(__MINGW32__) && !defined(__MINGW64__)
- execvp(cmd, argv);
-# else
- execvp(cmd, (char* const*)argv);
-# endif
-}
-
-/* Function to get the directory containing the given file or directory. */
-static void kwsys_shared_forward_dirname(const char* begin, char* result)
-{
- /* Find the location of the last slash. */
- int last_slash_index = -1;
- const char* end = begin + strlen(begin);
- for (; begin <= end && last_slash_index < 0; --end) {
- if (*end == '/' || *end == '\\') {
- last_slash_index = (int)(end - begin);
- }
- }
-
- /* Handle each case of the index of the last slash. */
- if (last_slash_index < 0) {
- /* No slashes. */
- strcpy(result, ".");
- } else if (last_slash_index == 0) {
- /* Only one leading slash. */
- strcpy(result, kwsys_shared_forward_path_slash);
- }
-# if defined(_WIN32)
- else if (last_slash_index == 2 && begin[1] == ':') {
- /* Only one leading drive letter and slash. */
- strncpy(result, begin, (size_t)last_slash_index);
- result[last_slash_index] = KWSYS_SHARED_FORWARD_PATH_SLASH;
- result[last_slash_index + 1] = 0;
- }
-# endif
- else {
- /* A non-leading slash. */
- strncpy(result, begin, (size_t)last_slash_index);
- result[last_slash_index] = 0;
- }
-}
-
-/* Function to check if a file exists and is executable. */
-static int kwsys_shared_forward_is_executable(const char* f)
-{
-# if defined(_MSC_VER)
-# define KWSYS_SHARED_FORWARD_ACCESS _access
-# else
-# define KWSYS_SHARED_FORWARD_ACCESS access
-# endif
-# if defined(X_OK)
-# define KWSYS_SHARED_FORWARD_ACCESS_OK X_OK
-# else
-# define KWSYS_SHARED_FORWARD_ACCESS_OK 04
-# endif
- if (KWSYS_SHARED_FORWARD_ACCESS(f, KWSYS_SHARED_FORWARD_ACCESS_OK) == 0) {
- return 1;
- } else {
- return 0;
- }
-}
-
-/* Function to locate the executable currently running. */
-static int kwsys_shared_forward_self_path(const char* argv0, char* result)
-{
- /* Check whether argv0 has a slash. */
- int has_slash = 0;
- const char* p = argv0;
- for (; *p && !has_slash; ++p) {
- if (*p == '/' || *p == '\\') {
- has_slash = 1;
- }
- }
-
- if (has_slash) {
- /* There is a slash. Use the dirname of the given location. */
- kwsys_shared_forward_dirname(argv0, result);
- return 1;
- } else {
- /* There is no slash. Search the PATH for the executable. */
- const char* path = getenv("PATH");
- const char* begin = path;
- const char* end = begin + (begin ? strlen(begin) : 0);
- const char* first = begin;
- while (first != end) {
- /* Store the end of this path entry. */
- const char* last;
-
- /* Skip all path separators. */
- for (; *first && *first == KWSYS_SHARED_FORWARD_PATH_SEP; ++first)
- ;
-
- /* Find the next separator. */
- for (last = first; *last && *last != KWSYS_SHARED_FORWARD_PATH_SEP;
- ++last)
- ;
-
- /* If we got a non-empty directory, look for the executable there. */
- if (first < last) {
- /* Determine the length without trailing slash. */
- size_t length = (size_t)(last - first);
- if (*(last - 1) == '/' || *(last - 1) == '\\') {
- --length;
- }
-
- /* Construct the name of the executable in this location. */
- strncpy(result, first, length);
- result[length] = KWSYS_SHARED_FORWARD_PATH_SLASH;
- strcpy(result + (length) + 1, argv0);
-
- /* Check if it exists and is executable. */
- if (kwsys_shared_forward_is_executable(result)) {
- /* Found it. */
- result[length] = 0;
- return 1;
- }
- }
-
- /* Move to the next directory in the path. */
- first = last;
- }
- }
-
- /* We could not find the executable. */
- return 0;
-}
-
-/* Function to convert a specified path to a full path. If it is not
- already full, it is taken relative to the self path. */
-static int kwsys_shared_forward_fullpath(const char* self_path,
- const char* in_path, char* result,
- const char* desc)
-{
- /* Check the specified path type. */
- if (in_path[0] == '/') {
- /* Already a full path. */
- strcpy(result, in_path);
- }
-# if defined(_WIN32)
- else if (in_path[0] && in_path[1] == ':') {
- /* Already a full path. */
- strcpy(result, in_path);
- }
-# endif
- else {
- /* Relative to self path. */
- char temp_path[KWSYS_SHARED_FORWARD_MAXPATH];
- strcpy(temp_path, self_path);
- strcat(temp_path, kwsys_shared_forward_path_slash);
- strcat(temp_path, in_path);
- if (!kwsys_shared_forward_realpath(temp_path, result)) {
- if (desc) {
- char msgbuf[KWSYS_SHARED_FORWARD_MAXPATH];
- kwsys_shared_forward_strerror(msgbuf);
- fprintf(stderr, "Error converting %s \"%s\" to real path: %s\n", desc,
- temp_path, msgbuf);
- }
- return 0;
- }
- }
- return 1;
-}
-
-/* Function to compute the library search path and executable name
- based on the self path. */
-static int kwsys_shared_forward_get_settings(const char* self_path,
- char* ldpath, char* exe)
-{
- /* Possible search paths. */
- static const char* search_path_build[] = { KWSYS_SHARED_FORWARD_PATH_BUILD,
- 0 };
- static const char* search_path_install[] = {
- KWSYS_SHARED_FORWARD_PATH_INSTALL, 0
- };
-
- /* Chosen paths. */
- const char** search_path;
- const char* exe_path;
-
-/* Get the real name of the build and self paths. */
-# if defined(KWSYS_SHARED_FORWARD_CONFIG_NAME)
- char build_path[] =
- KWSYS_SHARED_FORWARD_DIR_BUILD "/" KWSYS_SHARED_FORWARD_CONFIG_NAME;
- char self_path_logical[KWSYS_SHARED_FORWARD_MAXPATH];
-# else
- char build_path[] = KWSYS_SHARED_FORWARD_DIR_BUILD;
- const char* self_path_logical = self_path;
-# endif
- char build_path_real[KWSYS_SHARED_FORWARD_MAXPATH];
- char self_path_real[KWSYS_SHARED_FORWARD_MAXPATH];
- if (!kwsys_shared_forward_realpath(self_path, self_path_real)) {
- char msgbuf[KWSYS_SHARED_FORWARD_MAXPATH];
- kwsys_shared_forward_strerror(msgbuf);
- fprintf(stderr, "Error converting self path \"%s\" to real path: %s\n",
- self_path, msgbuf);
- return 0;
- }
-
- /* Check whether we are running in the build tree or an install tree. */
- if (kwsys_shared_forward_realpath(build_path, build_path_real) &&
- kwsys_shared_forward_samepath(self_path_real, build_path_real)) {
- /* Running in build tree. Use the build path and exe. */
- search_path = search_path_build;
-# if defined(_WIN32)
- exe_path = KWSYS_SHARED_FORWARD_EXE_BUILD ".exe";
-# else
- exe_path = KWSYS_SHARED_FORWARD_EXE_BUILD;
-# endif
-
-# if defined(KWSYS_SHARED_FORWARD_CONFIG_NAME)
- /* Remove the configuration directory from self_path. */
- kwsys_shared_forward_dirname(self_path, self_path_logical);
-# endif
- } else {
- /* Running in install tree. Use the install path and exe. */
- search_path = search_path_install;
-# if defined(_WIN32)
- exe_path = KWSYS_SHARED_FORWARD_EXE_INSTALL ".exe";
-# else
- exe_path = KWSYS_SHARED_FORWARD_EXE_INSTALL;
-# endif
-
-# if defined(KWSYS_SHARED_FORWARD_CONFIG_NAME)
- /* Use the original self path directory. */
- strcpy(self_path_logical, self_path);
-# endif
- }
-
- /* Construct the runtime search path. */
- {
- const char** dir;
- for (dir = search_path; *dir; ++dir) {
- /* Add separator between path components. */
- if (dir != search_path) {
- strcat(ldpath, kwsys_shared_forward_path_sep);
- }
-
- /* Add this path component. */
- if (!kwsys_shared_forward_fullpath(self_path_logical, *dir,
- ldpath + strlen(ldpath),
- "runtime path entry")) {
- return 0;
- }
- }
- }
-
- /* Construct the executable location. */
- if (!kwsys_shared_forward_fullpath(self_path_logical, exe_path, exe,
- "executable file")) {
- return 0;
- }
- return 1;
-}
-
-/* Function to print why execution of a command line failed. */
-static void kwsys_shared_forward_print_failure(char const* const* argv)
-{
- char msg[KWSYS_SHARED_FORWARD_MAXPATH];
- char const* const* arg = argv;
- kwsys_shared_forward_strerror(msg);
- fprintf(stderr, "Error running");
- for (; *arg; ++arg) {
- fprintf(stderr, " \"%s\"", *arg);
- }
- fprintf(stderr, ": %s\n", msg);
-}
-
-/* Static storage space to store the updated environment variable. */
-static char kwsys_shared_forward_ldpath[65535] =
- KWSYS_SHARED_FORWARD_LDPATH "=";
-
-/* Main driver function to be called from main. */
-static int @KWSYS_NAMESPACE@_shared_forward_to_real(int argc, char** argv_in)
-{
- char const** argv = (char const**)argv_in;
- /* Get the directory containing this executable. */
- char self_path[KWSYS_SHARED_FORWARD_MAXPATH];
- if (kwsys_shared_forward_self_path(argv[0], self_path)) {
- /* Found this executable. Use it to get the library directory. */
- char exe[KWSYS_SHARED_FORWARD_MAXPATH];
- if (kwsys_shared_forward_get_settings(self_path,
- kwsys_shared_forward_ldpath, exe)) {
- /* Append the old runtime search path. */
- const char* old_ldpath = getenv(KWSYS_SHARED_FORWARD_LDPATH);
- if (old_ldpath) {
- strcat(kwsys_shared_forward_ldpath, kwsys_shared_forward_path_sep);
- strcat(kwsys_shared_forward_ldpath, old_ldpath);
- }
-
- /* Store the environment variable. */
- putenv(kwsys_shared_forward_ldpath);
-
-# if defined(KWSYS_SHARED_FORWARD_OPTION_COMMAND)
- /* Look for the command line replacement option. */
- if (argc > 1 &&
- strcmp(argv[1], KWSYS_SHARED_FORWARD_OPTION_COMMAND) == 0) {
- if (argc > 2) {
- /* Use the command line given. */
- strcpy(exe, argv[2]);
- argv += 2;
- argc -= 2;
- } else {
- /* The option was not given an executable. */
- fprintf(stderr,
- "Option " KWSYS_SHARED_FORWARD_OPTION_COMMAND
- " must be followed by a command line.\n");
- return 1;
- }
- }
-# endif
-
-# if defined(KWSYS_SHARED_FORWARD_OPTION_PRINT)
- /* Look for the print command line option. */
- if (argc > 1 &&
- strcmp(argv[1], KWSYS_SHARED_FORWARD_OPTION_PRINT) == 0) {
- fprintf(stdout, "%s\n", kwsys_shared_forward_ldpath);
- fprintf(stdout, "%s\n", exe);
- return 0;
- }
-# endif
-
-# if defined(KWSYS_SHARED_FORWARD_OPTION_LDD)
- /* Look for the ldd command line option. */
- if (argc > 1 && strcmp(argv[1], KWSYS_SHARED_FORWARD_OPTION_LDD) == 0) {
-# if defined(KWSYS_SHARED_FORWARD_LDD)
- /* Use the named ldd-like executable and arguments. */
- char const* ldd_argv[] = { KWSYS_SHARED_FORWARD_LDD, 0, 0 };
- ldd_argv[KWSYS_SHARED_FORWARD_LDD_N] = exe;
- kwsys_shared_forward_execvp(ldd_argv[0], ldd_argv);
-
- /* Report why execution failed. */
- kwsys_shared_forward_print_failure(ldd_argv);
- return 1;
-# else
- /* We have no ldd-like executable available on this platform. */
- fprintf(stderr, "No ldd-like tool is known to this executable.\n");
- return 1;
-# endif
- }
-# endif
-
- /* Replace this process with the real executable. */
- argv[0] = exe;
- kwsys_shared_forward_execvp(argv[0], argv);
-
- /* Report why execution failed. */
- kwsys_shared_forward_print_failure(argv);
- } else {
- /* Could not convert self path to the library directory. */
- }
- } else {
- /* Could not find this executable. */
- fprintf(stderr, "Error locating executable \"%s\".\n", argv[0]);
- }
-
- /* Avoid unused argument warning. */
- (void)argc;
-
- /* Exit with failure. */
- return 1;
-}
-
-/* Restore warning stack. */
-# if defined(__clang__) && defined(__has_warning)
-# if __has_warning("-Wcast-qual")
-# pragma clang diagnostic pop
-# endif
-# endif
-
-#else
-# error "@KWSYS_NAMESPACE@/SharedForward.h should be included only once."
-#endif
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index a3ab51a..6cdd5a3 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -3418,9 +3418,7 @@ bool SystemTools::SplitProgramPath(const std::string& in_name,
}
bool SystemTools::FindProgramPath(const char* argv0, std::string& pathOut,
- std::string& errorMsg, const char* exeName,
- const char* buildDir,
- const char* installPrefix)
+ std::string& errorMsg)
{
std::vector<std::string> failures;
std::string self = argv0 ? argv0 : "";
@@ -3428,34 +3426,9 @@ bool SystemTools::FindProgramPath(const char* argv0, std::string& pathOut,
SystemTools::ConvertToUnixSlashes(self);
self = SystemTools::FindProgram(self);
if (!SystemTools::FileIsExecutable(self)) {
- if (buildDir) {
- std::string intdir = ".";
-#ifdef CMAKE_INTDIR
- intdir = CMAKE_INTDIR;
-#endif
- self = buildDir;
- self += "/bin/";
- self += intdir;
- self += "/";
- self += exeName;
- self += SystemTools::GetExecutableExtension();
- }
- }
- if (installPrefix) {
- if (!SystemTools::FileIsExecutable(self)) {
- failures.push_back(self);
- self = installPrefix;
- self += "/bin/";
- self += exeName;
- }
- }
- if (!SystemTools::FileIsExecutable(self)) {
failures.push_back(self);
std::ostringstream msg;
msg << "Can not find the command line program ";
- if (exeName) {
- msg << exeName;
- }
msg << "\n";
if (argv0) {
msg << " argv[0] = \"" << argv0 << "\"\n";
diff --git a/Source/kwsys/SystemTools.hxx.in b/Source/kwsys/SystemTools.hxx.in
index 56b65fd..729928e 100644
--- a/Source/kwsys/SystemTools.hxx.in
+++ b/Source/kwsys/SystemTools.hxx.in
@@ -395,10 +395,7 @@ public:
* installPrefix is a possibly null pointer to the install directory.
*/
static bool FindProgramPath(const char* argv0, std::string& pathOut,
- std::string& errorMsg,
- const char* exeName = nullptr,
- const char* buildDir = nullptr,
- const char* installPrefix = nullptr);
+ std::string& errorMsg);
/**
* Given a path to a file or directory, convert it to a full path.
diff --git a/Source/kwsys/testDynamicLoader.cxx b/Source/kwsys/testDynamicLoader.cxx
index 806c01a..a5095a5 100644
--- a/Source/kwsys/testDynamicLoader.cxx
+++ b/Source/kwsys/testDynamicLoader.cxx
@@ -53,9 +53,9 @@ static std::string GetLibName(const char* lname, const char* subdir = nullptr)
slname += "/";
slname += subdir;
}
-#ifdef CMAKE_INTDIR
+#ifdef BUILD_CONFIG
slname += "/";
- slname += CMAKE_INTDIR;
+ slname += BUILD_CONFIG;
#endif
slname += "/";
slname += kwsys::DynamicLoader::LibPrefix();
diff --git a/Source/kwsys/testSharedForward.c.in b/Source/kwsys/testSharedForward.c.in
deleted file mode 100644
index e909458..0000000
--- a/Source/kwsys/testSharedForward.c.in
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
- file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
-#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
-/* NOLINTNEXTLINE(bugprone-reserved-identifier) */
-# define _XOPEN_SOURCE 600
-#endif
-#if defined(CMAKE_INTDIR)
-# define CONFIG_DIR_PRE CMAKE_INTDIR "/"
-# define CONFIG_DIR_POST "/" CMAKE_INTDIR
-#else
-# define CONFIG_DIR_PRE ""
-# define CONFIG_DIR_POST ""
-#endif
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_DIR_BUILD "@EXEC_DIR@"
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_BUILD "." CONFIG_DIR_POST
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_PATH_INSTALL 0
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_BUILD \
- CONFIG_DIR_PRE "@KWSYS_NAMESPACE@TestProcess"
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_EXE_INSTALL \
- "@KWSYS_NAMESPACE@TestProcess"
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_COMMAND "--command"
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_PRINT "--print"
-#define @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_LDD "--ldd"
-#if defined(CMAKE_INTDIR)
-# define @KWSYS_NAMESPACE@_SHARED_FORWARD_CONFIG_NAME CMAKE_INTDIR
-#endif
-#include <@KWSYS_NAMESPACE@/SharedForward.h>
-int main(int argc, char** argv)
-{
- return @KWSYS_NAMESPACE@_shared_forward_to_real(argc, argv);
-}
diff --git a/Tests/CMakeLib/testVisualStudioSlnParser.cxx b/Tests/CMakeLib/testVisualStudioSlnParser.cxx
index c1bf3d4..3485bac 100644
--- a/Tests/CMakeLib/testVisualStudioSlnParser.cxx
+++ b/Tests/CMakeLib/testVisualStudioSlnParser.cxx
@@ -80,7 +80,6 @@ int testVisualStudioSlnParser(int, char*[])
"cmsysProcessFwd9x",
"cmsysTestDynload",
"cmsysTestProcess",
- "cmsysTestSharedForward",
"cmsysTestsC",
"cmsysTestsCxx",
"cmsys_c",
diff --git a/Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file b/Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file
index 395b953..1f148fc 100644
--- a/Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file
+++ b/Tests/CMakeLib/testVisualStudioSlnParser_data/valid.sln-file
@@ -21,7 +21,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ALL_BUILD", "ALL_BUILD.vcxp
{29D5FCAF-20D0-4DEF-8529-F035C249E996} = {29D5FCAF-20D0-4DEF-8529-F035C249E996}
{A0421DCA-AC3E-42D0-94AC-379A21A1E591} = {A0421DCA-AC3E-42D0-94AC-379A21A1E591}
{C6AF7E57-CE57-4462-AE1D-BF520701480E} = {C6AF7E57-CE57-4462-AE1D-BF520701480E}
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7} = {F2CAAAB3-9568-4284-B8E3-13955183A6D7}
{D8294E4A-03C5-43D7-AE35-15603F502DC0} = {D8294E4A-03C5-43D7-AE35-15603F502DC0}
{A4921D15-411F-436A-B6F3-F8381652A8E1} = {A4921D15-411F-436A-B6F3-F8381652A8E1}
{60BEB3AF-B4EF-4363-8747-C40177BC2D9C} = {60BEB3AF-B4EF-4363-8747-C40177BC2D9C}
@@ -220,12 +219,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmsysTestProcess", "Source\
{60BEB3AF-B4EF-4363-8747-C40177BC2D9C} = {60BEB3AF-B4EF-4363-8747-C40177BC2D9C}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmsysTestSharedForward", "Source\kwsys\cmsysTestSharedForward.vcxproj", "{F2CAAAB3-9568-4284-B8E3-13955183A6D7}"
- ProjectSection(ProjectDependencies) = postProject
- {90BC31D7-A3E8-4F04-8049-2236C239A044} = {90BC31D7-A3E8-4F04-8049-2236C239A044}
- {60BEB3AF-B4EF-4363-8747-C40177BC2D9C} = {60BEB3AF-B4EF-4363-8747-C40177BC2D9C}
- EndProjectSection
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmsysTestsC", "Source\kwsys\cmsysTestsC.vcxproj", "{D8294E4A-03C5-43D7-AE35-15603F502DC0}"
ProjectSection(ProjectDependencies) = postProject
{90BC31D7-A3E8-4F04-8049-2236C239A044} = {90BC31D7-A3E8-4F04-8049-2236C239A044}
@@ -528,14 +521,6 @@ Global
{C6AF7E57-CE57-4462-AE1D-BF520701480E}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{C6AF7E57-CE57-4462-AE1D-BF520701480E}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{C6AF7E57-CE57-4462-AE1D-BF520701480E}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.Debug|x64.ActiveCfg = Debug|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.Debug|x64.Build.0 = Debug|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.Release|x64.ActiveCfg = Release|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.Release|x64.Build.0 = Release|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{D8294E4A-03C5-43D7-AE35-15603F502DC0}.Debug|x64.ActiveCfg = Debug|x64
{D8294E4A-03C5-43D7-AE35-15603F502DC0}.Debug|x64.Build.0 = Debug|x64
{D8294E4A-03C5-43D7-AE35-15603F502DC0}.Release|x64.ActiveCfg = Release|x64
@@ -667,7 +652,6 @@ Global
{29D5FCAF-20D0-4DEF-8529-F035C249E996} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54}
{A0421DCA-AC3E-42D0-94AC-379A21A1E591} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54}
{C6AF7E57-CE57-4462-AE1D-BF520701480E} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54}
- {F2CAAAB3-9568-4284-B8E3-13955183A6D7} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54}
{D8294E4A-03C5-43D7-AE35-15603F502DC0} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54}
{A4921D15-411F-436A-B6F3-F8381652A8E1} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54}
{60BEB3AF-B4EF-4363-8747-C40177BC2D9C} = {EF1DFA45-6F7A-4760-8EB5-69A8A221FC54}
diff --git a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/importable.cxx b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/importable.cxx
index e0b1872..8dfc41b 100644
--- a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/importable.cxx
+++ b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/importable.cxx
@@ -1,6 +1,8 @@
export module importable;
+extern "C++" {
int forwarding();
+}
export int from_import()
{
diff --git a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/importable.cxx b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/importable.cxx
index e0b1872..8dfc41b 100644
--- a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/importable.cxx
+++ b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/importable.cxx
@@ -1,6 +1,8 @@
export module importable;
+extern "C++" {
int forwarding();
+}
export int from_import()
{
diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-build/importable.cxx b/Tests/RunCMake/CXXModules/examples/export-interface-build/importable.cxx
index e0b1872..8dfc41b 100644
--- a/Tests/RunCMake/CXXModules/examples/export-interface-build/importable.cxx
+++ b/Tests/RunCMake/CXXModules/examples/export-interface-build/importable.cxx
@@ -1,6 +1,8 @@
export module importable;
+extern "C++" {
int forwarding();
+}
export int from_import()
{
diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-install/importable.cxx b/Tests/RunCMake/CXXModules/examples/export-interface-install/importable.cxx
index e0b1872..8dfc41b 100644
--- a/Tests/RunCMake/CXXModules/examples/export-interface-install/importable.cxx
+++ b/Tests/RunCMake/CXXModules/examples/export-interface-install/importable.cxx
@@ -1,6 +1,8 @@
export module importable;
+extern "C++" {
int forwarding();
+}
export int from_import()
{
diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/importable.cxx b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/importable.cxx
index e0b1872..8dfc41b 100644
--- a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/importable.cxx
+++ b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/importable.cxx
@@ -1,6 +1,8 @@
export module importable;
+extern "C++" {
int forwarding();
+}
export int from_import()
{
diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/importable.cxx b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/importable.cxx
index e0b1872..8dfc41b 100644
--- a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/importable.cxx
+++ b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/importable.cxx
@@ -1,6 +1,8 @@
export module importable;
+extern "C++" {
int forwarding();
+}
export int from_import()
{
diff --git a/Tests/RunCMake/add_custom_command/WorkingDirectory.cmake b/Tests/RunCMake/add_custom_command/WorkingDirectory.cmake
index 65b7250..d8a5d86 100644
--- a/Tests/RunCMake/add_custom_command/WorkingDirectory.cmake
+++ b/Tests/RunCMake/add_custom_command/WorkingDirectory.cmake
@@ -2,7 +2,7 @@ add_custom_target(mkdir COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURR
add_custom_command(
OUTPUT out.txt
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/PrintDir.cmake
- WORKING_DIRECTORY ${CMAKE_CFG_INTDIR}
+ WORKING_DIRECTORY $<CONFIG>
)
set_property(SOURCE out.txt PROPERTY SYMBOLIC 1)
add_custom_target(drive ALL DEPENDS out.txt)
diff --git a/Tests/RunCMake/add_link_options/LINKER_expansion-list.cmake b/Tests/RunCMake/add_link_options/LINKER_expansion-list.cmake
index c77b43c..f7c551d 100644
--- a/Tests/RunCMake/add_link_options/LINKER_expansion-list.cmake
+++ b/Tests/RunCMake/add_link_options/LINKER_expansion-list.cmake
@@ -11,7 +11,7 @@ string(REPLACE "${CMAKE_END_TEMP_FILE}" "" CMAKE_C_CREATE_SHARED_LIBRARY "${CMAK
add_library(example SHARED LinkOptionsLib.c)
# use LAUNCH facility to dump linker command
-set_property(TARGET example PROPERTY RULE_LAUNCH_LINK "\"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/dump${CMAKE_EXECUTABLE_SUFFIX}\"")
+set_property(TARGET example PROPERTY RULE_LAUNCH_LINK "\"$<TARGET_FILE:dump>\"")
add_dependencies (example dump)