summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2023-04-20 17:08:38 -0400
committerBrad King <brad.king@kitware.com>2023-04-26 10:19:59 -0400
commit1d6c34366112f66b2d263c2aab587ddfa6ee85ae (patch)
treeb11cac465b37add6881f18d59cea07c25370b26e
parent32c3dbbee8a9b2005b4040761efec622fa822f28 (diff)
downloadcmake-1d6c34366112f66b2d263c2aab587ddfa6ee85ae.tar.gz
FindCUDAToolkit: Add missing static library dependencies on pthread and libdl
Discourse-topic: https://discourse.cmake.org/t/7946
-rw-r--r--Modules/FindCUDAToolkit.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake
index fcafe65b6e..ace7db1a35 100644
--- a/Modules/FindCUDAToolkit.cmake
+++ b/Modules/FindCUDAToolkit.cmake
@@ -1028,7 +1028,11 @@ if(CUDAToolkit_FOUND)
endif()
_CUDAToolkit_find_and_add_import_lib(culibos) # it's a static library
- foreach (cuda_lib cublasLt cufft curand nppc nvjpeg)
+ foreach (cuda_lib cublasLt cufft nvjpeg)
+ _CUDAToolkit_find_and_add_import_lib(${cuda_lib})
+ _CUDAToolkit_find_and_add_import_lib(${cuda_lib}_static DEPS cudart_static_deps culibos)
+ endforeach()
+ foreach (cuda_lib curand nppc)
_CUDAToolkit_find_and_add_import_lib(${cuda_lib})
_CUDAToolkit_find_and_add_import_lib(${cuda_lib}_static DEPS culibos)
endforeach()