[Cmake-commits] CMake branch, next, updated. v3.6.2-2227-g2b5471b
Brad King
brad.king at kitware.com
Mon Sep 19 14:31:36 EDT 2016
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, next has been updated
via 2b5471bd742db73bc45b97cfdcba9109f5aeda33 (commit)
via e395f3182bfc487cca2d6a9b17d8b2d459fa3935 (commit)
from ae94988166f856e3ef03ba58f16efba93ffa7994 (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=2b5471bd742db73bc45b97cfdcba9109f5aeda33
commit 2b5471bd742db73bc45b97cfdcba9109f5aeda33
Merge: ae94988 e395f31
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 19 14:31:35 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 19 14:31:35 2016 -0400
Merge topic 'cuda_use_cudadevrt_with_separable_compilation' into next
e395f318 FindCUDA: find cudadevrt and link it if CUDA_SEPARABLE_COMPILATION is ON
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e395f3182bfc487cca2d6a9b17d8b2d459fa3935
commit e395f3182bfc487cca2d6a9b17d8b2d459fa3935
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Fri Sep 16 13:34:04 2016 +0200
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Mon Sep 19 13:54:36 2016 -0400
FindCUDA: find cudadevrt and link it if CUDA_SEPARABLE_COMPILATION is ON
Closes: #16317
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 317a9cd..9ef1419 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -303,6 +303,8 @@
# CUDA_ADD_CUBLAS_TO_TARGET macro).
# CUDA_cudart_static_LIBRARY -- Statically linkable cuda runtime library.
# Only available for CUDA version 5.5+
+# CUDA_cudadevrt_LIBRARY -- Device runtime library.
+# Required for separable compilation.
# CUDA_cupti_LIBRARY -- CUDA Profiling Tools Interface library.
# Only available for CUDA version 4.0+.
# CUDA_curand_LIBRARY -- CUDA Random Number Generation library.
@@ -564,6 +566,7 @@ macro(cuda_unset_include_and_libraries)
unset(CUDA_CUDARTEMU_LIBRARY CACHE)
endif()
unset(CUDA_cudart_static_LIBRARY CACHE)
+ unset(CUDA_cudadevrt_LIBRARY CACHE)
unset(CUDA_cublas_LIBRARY CACHE)
unset(CUDA_cublas_device_LIBRARY CACHE)
unset(CUDA_cublasemu_LIBRARY CACHE)
@@ -794,6 +797,10 @@ else()
set(CUDA_USE_STATIC_CUDA_RUNTIME OFF CACHE INTERNAL "")
set(CUDA_CUDART_LIBRARY_VAR CUDA_CUDART_LIBRARY)
endif()
+if(NOT CUDA_VERSION VERSION_LESS "5.0")
+ cuda_find_library_local_first(CUDA_cudadevrt_LIBRARY cudadevrt "\"cudadevrt\" library")
+ mark_as_advanced(CUDA_cudadevrt_LIBRARY)
+endif()
if(CUDA_USE_STATIC_CUDA_RUNTIME)
if(UNIX)
@@ -1714,6 +1721,12 @@ macro(CUDA_ADD_LIBRARY cuda_target)
${CUDA_LIBRARIES}
)
+ if(CUDA_SEPARABLE_COMPILATION)
+ target_link_libraries(${cuda_target}
+ ${CUDA_cudadevrt_LIBRARY}
+ )
+ endif()
+
# We need to set the linker language based on what the expected generated file
# would be. CUDA_C_OR_CXX is computed based on CUDA_HOST_COMPILATION_CPP.
set_target_properties(${cuda_target}
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list