diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2017-03-23 13:31:25 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2017-03-23 13:44:30 (GMT) |
commit | d40fc8856d3cc3cd40e091d858df4fb1725f1406 (patch) | |
tree | b5110dce215e7ade330a6a13c87026076504eae4 /Tests/Cuda | |
parent | f589e636ebc5d55ac70f4190a86c826e46efcf86 (diff) | |
download | CMake-d40fc8856d3cc3cd40e091d858df4fb1725f1406.zip CMake-d40fc8856d3cc3cd40e091d858df4fb1725f1406.tar.gz CMake-d40fc8856d3cc3cd40e091d858df4fb1725f1406.tar.bz2 |
CUDA: ObjectLibrary test executable now runs on OSX
Diffstat (limited to 'Tests/Cuda')
-rw-r--r-- | Tests/Cuda/ObjectLibrary/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/Cuda/ObjectLibrary/CMakeLists.txt b/Tests/Cuda/ObjectLibrary/CMakeLists.txt index cbe1e67..1d93be7 100644 --- a/Tests/Cuda/ObjectLibrary/CMakeLists.txt +++ b/Tests/Cuda/ObjectLibrary/CMakeLists.txt @@ -10,3 +10,8 @@ add_library(CudaMixedObjectLib OBJECT static.cu static.cpp) add_executable(CudaObjectLibrary main.cpp $<TARGET_OBJECTS:CudaMixedObjectLib>) +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(CudaObjectLibrary PRIVATE -Wl,-rpath,/usr/local/cuda/lib) +endif() |