diff options
author | Jamil Appa <jamil.appa@zenotech.com> | 2017-11-03 22:08:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-11-29 16:44:42 (GMT) |
commit | 3726ded116e405d28d7d2bbd0abc1b929ab0adb0 (patch) | |
tree | cf25601ec99f9dd9091c16962912ec9b8973dee0 /Modules/FindCUDA.cmake | |
parent | d802f357d79244ed6d1e3e796162730aabb11205 (diff) | |
download | CMake-3726ded116e405d28d7d2bbd0abc1b929ab0adb0.zip CMake-3726ded116e405d28d7d2bbd0abc1b929ab0adb0.tar.gz CMake-3726ded116e405d28d7d2bbd0abc1b929ab0adb0.tar.bz2 |
FindCUDA: Add cublas device library to separable compilation
Add cublas libraries to separable compilation device link line to
resolve missing symbols when using cublas device library.
Diffstat (limited to 'Modules/FindCUDA.cmake')
-rw-r--r-- | Modules/FindCUDA.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index d177e5e..c907c8b 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -1756,7 +1756,7 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options add_custom_command( OUTPUT ${output_file} DEPENDS ${object_files} - COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} -dlink ${object_files} -o ${output_file} + COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} -dlink ${object_files} ${CUDA_cublas_device_LIBRARY} -o ${output_file} ${flags} COMMENT "Building NVCC intermediate link file ${output_file_relative_path}" COMMAND_EXPAND_LISTS @@ -1769,7 +1769,7 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options PRE_LINK COMMAND ${CMAKE_COMMAND} -E echo "Building NVCC intermediate link file ${output_file_relative_path}" COMMAND ${CMAKE_COMMAND} -E make_directory "${output_file_dir}" - COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} ${flags} -dlink ${object_files} -o "${output_file}" + COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} ${flags} -dlink ${object_files} ${CUDA_cublas_device_LIBRARY} -o "${output_file}" COMMAND_EXPAND_LISTS ${_verbatim} ) |