summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorJames Sharpe <james.sharpe@zenotech.com>2016-05-25 10:28:39 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-25 13:42:25 (GMT)
commit81e73b7240e3b11b454f01f21bab85b4aa95d6af (patch)
tree808658c2ed8eadc904b179c01e4b942ca7b25b79 /Modules
parent6052e4b3bfe62a8d29ca679affb101c7aec0d219 (diff)
downloadCMake-81e73b7240e3b11b454f01f21bab85b4aa95d6af.zip
CMake-81e73b7240e3b11b454f01f21bab85b4aa95d6af.tar.gz
CMake-81e73b7240e3b11b454f01f21bab85b4aa95d6af.tar.bz2
FindCUDA: Add support for finding the cublas_device library
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindCUDA.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 2979f0f..48bb554 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -549,6 +549,7 @@ macro(cuda_unset_include_and_libraries)
endif()
unset(CUDA_cudart_static_LIBRARY CACHE)
unset(CUDA_cublas_LIBRARY CACHE)
+ unset(CUDA_cublas_device_LIBRARY CACHE)
unset(CUDA_cublasemu_LIBRARY CACHE)
unset(CUDA_cufft_LIBRARY CACHE)
unset(CUDA_cufftemu_LIBRARY CACHE)
@@ -854,6 +855,7 @@ if(NOT CUDA_VERSION VERSION_LESS "3.2")
endif()
endif()
if(CUDA_VERSION VERSION_GREATER "5.0")
+ find_cuda_helper_libs(cublas_device)
# In CUDA 5.5 NPP was splitted onto 3 separate libraries.
find_cuda_helper_libs(nppc)
find_cuda_helper_libs(nppi)
@@ -872,7 +874,7 @@ if (CUDA_BUILD_EMULATION)
set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublasemu_LIBRARY})
else()
set(CUDA_CUFFT_LIBRARIES ${CUDA_cufft_LIBRARY})
- set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublas_LIBRARY})
+ set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublas_LIBRARY} ${CUDA_cublas_device_LIBRARY})
endif()
########################
@@ -1803,7 +1805,7 @@ macro(CUDA_ADD_CUBLAS_TO_TARGET target)
if (CUDA_BUILD_EMULATION)
target_link_libraries(${target} ${CUDA_cublasemu_LIBRARY})
else()
- target_link_libraries(${target} ${CUDA_cublas_LIBRARY})
+ target_link_libraries(${target} ${CUDA_cublas_LIBRARY} ${CUDA_cublas_device_LIBRARY})
endif()
endmacro()