summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeGenericSystem.cmake6
-rw-r--r--Modules/CPack.cmake23
-rw-r--r--Modules/Compiler/Clang-CUDA.cmake15
-rw-r--r--Modules/ExternalProject.cmake4
-rw-r--r--Modules/ExternalProject/gitupdate.cmake.in2
-rw-r--r--Modules/Internal/CPack/CPackRPM.cmake2
-rw-r--r--Modules/Platform/Apple-Apple-Swift.cmake14
-rw-r--r--Modules/Platform/Apple-NVIDIA-CUDA.cmake14
-rw-r--r--Modules/Platform/Darwin.cmake13
9 files changed, 85 insertions, 8 deletions
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index 649b6f7..6e75fac 100644
--- a/Modules/CMakeGenericSystem.cmake
+++ b/Modules/CMakeGenericSystem.cmake
@@ -24,6 +24,12 @@ set(CMAKE_DL_LIBS "dl")
set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
+# Define feature "DEFAULT" as supported. This special feature generates the
+# default option to link a library
+# This feature is intended to be used in LINK_LIBRARY_OVERRIDE and
+# LINK_LIBRARY_OVERRIDE_<LIBRARY> target properties
+set(CMAKE_LINK_LIBRARY_USING_DEFAULT_SUPPORTED TRUE)
+
set(CMAKE_AUTOGEN_ORIGIN_DEPENDS ON)
set(CMAKE_AUTOMOC_COMPILER_PREDEFINES ON)
if(NOT DEFINED CMAKE_AUTOMOC_PATH_PREFIX)
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 6650f7c..5a22be5 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -304,14 +304,25 @@ installers. The most commonly-used variables are:
By default ``CPACK_THREADS`` is set to ``1``.
- Currently only ``xz`` compression *may* take advantage of multiple cores.
- Other compression methods ignore this value and use only one thread.
+ The following compression methods may take advantage of multiple cores:
+
+ ``xz``
+ Supported if CMake is built with a ``liblzma`` that supports
+ parallel compression.
+
+ .. versionadded:: 3.21
- .. versionadded:: 3.21
+ Official CMake binaries available on ``cmake.org`` now ship
+ with a ``liblzma`` that supports parallel compression.
+ Older versions did not.
- Official CMake binaries available on ``cmake.org`` now ship
- with a ``liblzma`` that supports parallel compression.
- Older versions did not.
+ ``zstd``
+ .. versionadded:: 3.24
+
+ Supported if CMake is built with libarchive 3.6 or higher.
+ Official CMake binaries available on ``cmake.org`` support it.
+
+ Other compression methods ignore this value and use only one thread.
Variables for Source Package Generators
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/Modules/Compiler/Clang-CUDA.cmake b/Modules/Compiler/Clang-CUDA.cmake
index 219897e..e85ec67 100644
--- a/Modules/Compiler/Clang-CUDA.cmake
+++ b/Modules/Compiler/Clang-CUDA.cmake
@@ -38,3 +38,18 @@ set(CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_NONE "")
if(UNIX)
list(APPEND CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_STATIC "rt" "pthread" "dl")
endif()
+
+if(APPLE)
+ # Defines host link features for frameworks
+ set(CMAKE_CUDA_LINK_LIBRARY_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>")
+ set(CMAKE_CUDA_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE)
+
+ set(CMAKE_CUDA_LINK_LIBRARY_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>")
+ set(CMAKE_CUDA_LINK_LIBRARY_USING_NEEDED_FRAMEWORK_SUPPORTED TRUE)
+
+ set(CMAKE_CUDA_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>")
+ set(CMAKE_CUDA_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK_SUPPORTED TRUE)
+
+ set(CMAKE_CUDA_LINK_LIBRARY_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>")
+ set(CMAKE_CUDA_LINK_LIBRARY_USING_WEAK_FRAMEWORK_SUPPORTED TRUE)
+endif()
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 14864d5..292333d 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -353,6 +353,10 @@ External Project Definition
When ``GIT_REMOTE_UPDATE_STRATEGY`` is not present, this is the
default strategy unless the default has been overridden with
``CMAKE_EP_GIT_REMOTE_UPDATE_STRATEGY`` (see below).
+ Note that if the branch specified in ``GIT_TAG`` is different to
+ the upstream branch currently being tracked, it is not safe to
+ perform a rebase. In that situation, ``REBASE`` will silently be
+ treated as ``CHECKOUT`` instead.
``REBASE_CHECKOUT``
Same as ``REBASE`` except if the rebase fails, an annotated tag will
diff --git a/Modules/ExternalProject/gitupdate.cmake.in b/Modules/ExternalProject/gitupdate.cmake.in
index 0de2372..7896f62 100644
--- a/Modules/ExternalProject/gitupdate.cmake.in
+++ b/Modules/ExternalProject/gitupdate.cmake.in
@@ -128,7 +128,7 @@ if(git_update_strategy MATCHES "^REBASE(_CHECKOUT)?$")
else()
execute_process(
- COMMAND "@git_EXECUTABLE@" for-each-ref "--format='%(upstream:short)'" "${current_branch}"
+ COMMAND "@git_EXECUTABLE@" for-each-ref "--format=%(upstream:short)" "${current_branch}"
WORKING_DIRECTORY "@work_dir@"
OUTPUT_VARIABLE upstream_branch
OUTPUT_STRIP_TRAILING_WHITESPACE
diff --git a/Modules/Internal/CPack/CPackRPM.cmake b/Modules/Internal/CPack/CPackRPM.cmake
index c72bf6d..cd631b8 100644
--- a/Modules/Internal/CPack/CPackRPM.cmake
+++ b/Modules/Internal/CPack/CPackRPM.cmake
@@ -790,7 +790,7 @@ function(cpack_rpm_variable_fallback OUTPUT_VAR_NAME)
set(FALLBACK_VAR_NAMES ${ARGN})
foreach(variable_name IN LISTS FALLBACK_VAR_NAMES)
- if(${variable_name})
+ if(DEFINED ${variable_name})
set(${OUTPUT_VAR_NAME} "${${variable_name}}" PARENT_SCOPE)
break()
endif()
diff --git a/Modules/Platform/Apple-Apple-Swift.cmake b/Modules/Platform/Apple-Apple-Swift.cmake
index 7ca3e36..9f604e8 100644
--- a/Modules/Platform/Apple-Apple-Swift.cmake
+++ b/Modules/Platform/Apple-Apple-Swift.cmake
@@ -1 +1,15 @@
set(CMAKE_Swift_SYSROOT_FLAG "-sdk")
+
+
+# Defines host link features for frameworks
+set(CMAKE_Swift_LINK_LIBRARY_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>")
+set(CMAKE_Swift_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE)
+
+set(CMAKE_Swift_LINK_LIBRARY_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>")
+set(CMAKE_Swift_LINK_LIBRARY_USING_NEEDED_FRAMEWORK_SUPPORTED TRUE)
+
+set(CMAKE_Swift_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>")
+set(CMAKE_Swift_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK_SUPPORTED TRUE)
+
+set(CMAKE_Swift_LINK_LIBRARY_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>")
+set(CMAKE_Swift_LINK_LIBRARY_USING_WEAK_FRAMEWORK_SUPPORTED TRUE)
diff --git a/Modules/Platform/Apple-NVIDIA-CUDA.cmake b/Modules/Platform/Apple-NVIDIA-CUDA.cmake
index 35e759a..0b8bbd9 100644
--- a/Modules/Platform/Apple-NVIDIA-CUDA.cmake
+++ b/Modules/Platform/Apple-NVIDIA-CUDA.cmake
@@ -17,3 +17,17 @@ set(CMAKE_SHARED_MODULE_CREATE_CUDA_FLAGS "-shared -Wl,-headerpad_max_install_na
set(CMAKE_CUDA_CREATE_SHARED_LIBRARY "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <CMAKE_SHARED_LIBRARY_CUDA_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>${__IMPLICIT_LINKS}")
set(CMAKE_CUDA_CREATE_SHARED_MODULE "<CMAKE_CUDA_HOST_LINK_LAUNCHER> <CMAKE_SHARED_LIBRARY_CUDA_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>${__IMPLICIT_LINKS}")
+
+
+# Defines host link features for frameworks
+set(CMAKE_CUDA_LINK_LIBRARY_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>")
+set(CMAKE_CUDA_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE)
+
+set(CMAKE_CUDA_LINK_LIBRARY_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>")
+set(CMAKE_CUDA_LINK_LIBRARY_USING_NEEDED_FRAMEWORK_SUPPORTED TRUE)
+
+set(CMAKE_CUDA_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>")
+set(CMAKE_CUDA_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK_SUPPORTED TRUE)
+
+set(CMAKE_CUDA_LINK_LIBRARY_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>")
+set(CMAKE_CUDA_LINK_LIBRARY_USING_WEAK_FRAMEWORK_SUPPORTED TRUE)
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 839dc81..74411e9 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -106,6 +106,19 @@ foreach(lang C CXX Fortran OBJC OBJCXX)
# Set default framework search path flag for languages known to use a
# preprocessor that may find headers in frameworks.
set(CMAKE_${lang}_FRAMEWORK_SEARCH_FLAG -F)
+
+ # Defines link features for frameworks
+ set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>")
+ set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE)
+
+ set(CMAKE_${lang}_LINK_LIBRARY_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>")
+ set(CMAKE_${lang}_LINK_LIBRARY_USING_NEEDED_FRAMEWORK_SUPPORTED TRUE)
+
+ set(CMAKE_${lang}_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>")
+ set(CMAKE_${lang}_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK_SUPPORTED TRUE)
+
+ set(CMAKE_${lang}_LINK_LIBRARY_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>")
+ set(CMAKE_${lang}_LINK_LIBRARY_USING_WEAK_FRAMEWORK_SUPPORTED TRUE)
endforeach()
# default to searching for frameworks first