[Cmake-commits] CMake branch, master, updated. v3.10.0-583-ge81b7a2
Kitware Robot
kwrobot at kitware.com
Fri Dec 8 09:55:03 EST 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via e81b7a2075b06ef12c3ab175ac4e20eaa50b80b2 (commit)
via ce3874b303a354c242e068497d6662fdcc390a85 (commit)
from 62822ce68a34ca5f4756b0128c7e824eacf5dbbf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e81b7a2075b06ef12c3ab175ac4e20eaa50b80b2
commit e81b7a2075b06ef12c3ab175ac4e20eaa50b80b2
Merge: 62822ce ce3874b
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 8 14:53:29 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Dec 8 09:53:33 2017 -0500
Merge topic 'cuda_darwin_proper_install_names_flags'
ce3874b3 CUDA: Shared libraries on Darwin properly setup @rpath install_names
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1570
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ce3874b303a354c242e068497d6662fdcc390a85
commit ce3874b303a354c242e068497d6662fdcc390a85
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Thu Dec 7 11:31:03 2017 -0500
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Thu Dec 7 11:31:03 2017 -0500
CUDA: Shared libraries on Darwin properly setup @rpath install_names
Shared libraries linked with CUDA now properly setup booth the correct
install_name but also specify headerpad_max_install_names so that the names
can be changed post build.
diff --git a/Modules/Platform/Darwin-NVIDIA-CUDA.cmake b/Modules/Platform/Darwin-NVIDIA-CUDA.cmake
new file mode 100644
index 0000000..bec3948
--- /dev/null
+++ b/Modules/Platform/Darwin-NVIDIA-CUDA.cmake
@@ -0,0 +1,19 @@
+include(Platform/Darwin)
+
+set(__IMPLICT_LINKS )
+foreach(dir ${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES})
+ string(APPEND __IMPLICT_LINKS " -L\"${dir}\"")
+endforeach()
+foreach(lib ${CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES})
+ if(${lib} MATCHES "/")
+ string(APPEND __IMPLICT_LINKS " \"${lib}\"")
+ else()
+ string(APPEND __IMPLICT_LINKS " -l${lib}")
+ endif()
+endforeach()
+
+set(CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS "-shared -Wl,-headerpad_max_install_names")
+set(CMAKE_SHARED_MODULE_CREATE_CUDA_FLAGS "-shared -Wl,-headerpad_max_install_names")
+
+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>${__IMPLICT_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>${__IMPLICT_LINKS}")
-----------------------------------------------------------------------
Summary of changes:
Modules/Platform/Darwin-NVIDIA-CUDA.cmake | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 Modules/Platform/Darwin-NVIDIA-CUDA.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list