mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 14:40:26 -06:00
Tests/Cuda: Fix missing CUDA static library at runtime on macOS
Suggested-by: Robert Maynard
This commit is contained in:
@@ -38,3 +38,9 @@ target_link_libraries(CudaComplexMixedLib
|
||||
|
||||
add_executable(CudaComplex main.cpp)
|
||||
target_link_libraries(CudaComplex PUBLIC CudaComplexMixedLib)
|
||||
|
||||
if(APPLE)
|
||||
# We need to add the default path to the driver (libcuda.dylib) as an rpath, so that
|
||||
# the static cuda runtime can find it at runtime.
|
||||
target_link_libraries(CudaComplex PRIVATE -Wl,-rpath,/usr/local/cuda/lib)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user