Merge topic 'FindCUDAToolkit-cusparse-deps' into release-3.26

516d807423 FindCUDAToolkit: Add dependency between cusparse and nvJitLink

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8397
This commit is contained in:
Brad King
2023-04-06 13:04:27 +00:00
committed by Kitware Robot

View File

@@ -1022,12 +1022,20 @@ if(CUDAToolkit_FOUND)
endif()
endif()
if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 12.0.0)
_CUDAToolkit_find_and_add_import_lib(nvJitLink)
_CUDAToolkit_find_and_add_import_lib(nvJitLink_static DEPS cudart_static_deps)
endif()
_CUDAToolkit_find_and_add_import_lib(culibos) # it's a static library
foreach (cuda_lib cublasLt cufft curand cusparse nppc nvjpeg)
foreach (cuda_lib cublasLt cufft curand nppc nvjpeg)
_CUDAToolkit_find_and_add_import_lib(${cuda_lib})
_CUDAToolkit_find_and_add_import_lib(${cuda_lib}_static DEPS culibos)
endforeach()
_CUDAToolkit_find_and_add_import_lib(cusparse DEPS nvJitLink)
_CUDAToolkit_find_and_add_import_lib(cusparse_static DEPS nvJitLink_static culibos)
if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.0.0)
# cublas depends on cublasLt
# https://docs.nvidia.com/cuda/archive/11.0/cublas/index.html#static-library
@@ -1114,11 +1122,6 @@ if(CUDAToolkit_FOUND)
endif()
endif()
if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 12.0.0)
_CUDAToolkit_find_and_add_import_lib(nvJitLink DEPS cuda_driver)
_CUDAToolkit_find_and_add_import_lib(nvJitLink_static DEPS cuda_driver)
endif()
_CUDAToolkit_find_and_add_import_lib(nvrtc_builtins DEPS cuda_driver)
_CUDAToolkit_find_and_add_import_lib(nvrtc DEPS nvrtc_builtins nvJitLink)
if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.5.0)