summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2022-02-10 22:57:14 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2022-02-15 09:53:33 (GMT)
commita2cfa2da4f53a5e9c78e6cf7332c6a308ef38af2 (patch)
tree28ddbbd9f07ad92b87fbe439c2ead74041c74f44 /Modules/Compiler
parent40178f3c908795a993148553a04be25748942efc (diff)
downloadCMake-a2cfa2da4f53a5e9c78e6cf7332c6a308ef38af2.zip
CMake-a2cfa2da4f53a5e9c78e6cf7332c6a308ef38af2.tar.gz
CMake-a2cfa2da4f53a5e9c78e6cf7332c6a308ef38af2.tar.bz2
GenEx/LINK_LIBRARY: Add features for framework support on Apple
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/Clang-CUDA.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang-CUDA.cmake b/Modules/Compiler/Clang-CUDA.cmake
index 219897e..44eb35f 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_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>")
+ set(CMAKE_CUDA_LINK_USING_FRAMEWORK_SUPPORTED TRUE)
+
+ set(CMAKE_CUDA_LINK_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>")
+ set(CMAKE_CUDA_LINK_USING_NEEDED_FRAMEWORK_SUPPORTED TRUE)
+
+ set(CMAKE_CUDA_LINK_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>")
+ set(CMAKE_CUDA_LINK_USING_REEXPORT_FRAMEWORK_SUPPORTED TRUE)
+
+ set(CMAKE_CUDA_LINK_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>")
+ set(CMAKE_CUDA_LINK_USING_WEAK_FRAMEWORK_SUPPORTED TRUE)
+endif()