diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2022-02-21 13:57:31 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2022-03-04 15:51:53 (GMT) |
commit | 93a153bc7ffc217181ba56eadc35f1103f902038 (patch) | |
tree | a6d08f2da29ea5175755183dc1539573356db053 | |
parent | a950fd9553cc4a9457bbe701399fce09ed360151 (diff) | |
download | CMake-93a153bc7ffc217181ba56eadc35f1103f902038.zip CMake-93a153bc7ffc217181ba56eadc35f1103f902038.tar.gz CMake-93a153bc7ffc217181ba56eadc35f1103f902038.tar.bz2 |
Genx-LINK_LIBRARY: simplify framework features definitions
-rw-r--r-- | Modules/Compiler/Clang-CUDA.cmake | 15 | ||||
-rw-r--r-- | Modules/Platform/Apple-Apple-Swift.cmake | 14 | ||||
-rw-r--r-- | Modules/Platform/Apple-NVIDIA-CUDA.cmake | 14 | ||||
-rw-r--r-- | Modules/Platform/Darwin.cmake | 26 |
4 files changed, 13 insertions, 56 deletions
diff --git a/Modules/Compiler/Clang-CUDA.cmake b/Modules/Compiler/Clang-CUDA.cmake index e85ec67..219897e 100644 --- a/Modules/Compiler/Clang-CUDA.cmake +++ b/Modules/Compiler/Clang-CUDA.cmake @@ -38,18 +38,3 @@ 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/Platform/Apple-Apple-Swift.cmake b/Modules/Platform/Apple-Apple-Swift.cmake index 9f604e8..7ca3e36 100644 --- a/Modules/Platform/Apple-Apple-Swift.cmake +++ b/Modules/Platform/Apple-Apple-Swift.cmake @@ -1,15 +1 @@ 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 0b8bbd9..35e759a 100644 --- a/Modules/Platform/Apple-NVIDIA-CUDA.cmake +++ b/Modules/Platform/Apple-NVIDIA-CUDA.cmake @@ -17,17 +17,3 @@ 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 74411e9..01419bb 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -103,23 +103,23 @@ foreach(lang C CXX Fortran OBJC OBJCXX) set(CMAKE_${lang}_CREATE_MACOSX_FRAMEWORK "<CMAKE_${lang}_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>") - # 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) +# 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) +endforeach() - # Defines link features for frameworks - set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>") - set(CMAKE_${lang}_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE) +# Defines link features for frameworks +set(CMAKE_LINK_LIBRARY_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>") +set(CMAKE_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_LINK_LIBRARY_USING_NEEDED_FRAMEWORK "LINKER:-needed_framework,<LIBRARY>") +set(CMAKE_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_LINK_LIBRARY_USING_REEXPORT_FRAMEWORK "LINKER:-reexport_framework,<LIBRARY>") +set(CMAKE_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() +set(CMAKE_LINK_LIBRARY_USING_WEAK_FRAMEWORK "LINKER:-weak_framework,<LIBRARY>") +set(CMAKE_LINK_LIBRARY_USING_WEAK_FRAMEWORK_SUPPORTED TRUE) # default to searching for frameworks first if(NOT DEFINED CMAKE_FIND_FRAMEWORK) |