mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 02:39:48 -06:00
FindCUDAToolkit: Handle toolkits that don't provide nvptxcompiler
Some versions of the CUDA toolkit don't provide any static libraries, and therefore we need to handle that `nvptxcompiler_static` might not be found
This commit is contained in:
@@ -1060,7 +1060,9 @@ if(CUDAToolkit_FOUND)
|
||||
if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.1.0)
|
||||
if(NOT TARGET CUDA::nvptxcompiler_static)
|
||||
_CUDAToolkit_find_and_add_import_lib(nvptxcompiler_static DEPS cuda_driver)
|
||||
target_link_libraries(CUDA::nvptxcompiler_static INTERFACE Threads::Threads)
|
||||
if(TARGET CUDA::nvptxcompiler_static)
|
||||
target_link_libraries(CUDA::nvptxcompiler_static INTERFACE Threads::Threads)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user