From 8711231739fa738a9ece02cb15b037b72b429fc0 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Wed, 5 Apr 2023 09:38:11 -0400 Subject: FindCUDAToolkit: nvptxcompiler_static correctly specify dependencies Avoids linking to `Threads::Threads` on non-unix systems where it isn't needed. In addition ensures that dlopen symbols are resolved. --- Modules/FindCUDAToolkit.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake index c3b6bc3..6f7ae43 100644 --- a/Modules/FindCUDAToolkit.cmake +++ b/Modules/FindCUDAToolkit.cmake @@ -1109,7 +1109,7 @@ if(CUDAToolkit_FOUND) if(NOT TARGET CUDA::nvptxcompiler_static) _CUDAToolkit_find_and_add_import_lib(nvptxcompiler_static DEPS cuda_driver) if(TARGET CUDA::nvptxcompiler_static) - target_link_libraries(CUDA::nvptxcompiler_static INTERFACE Threads::Threads) + target_link_libraries(CUDA::nvptxcompiler_static INTERFACE CUDA::cudart_static_deps) endif() endif() endif() -- cgit v0.12