Debian Codegraph @

Tests/CudaOnly/SeparateCompilation/main/CMakeLists.txt

raw
1 add_executable(CudaOnlySeparateCompilation main.cu)
2 target_link_libraries(CudaOnlySeparateCompilation PRIVATE CUDASeparateLibB CUDASeparateLibC)
3 set_target_properties(CudaOnlySeparateCompilation PROPERTIES
4 CUDA_STANDARD 11
5 CUDA_STANDARD_REQUIRED TRUE
6 )
7
8 if(CMAKE_GENERATOR MATCHES "^Visual Studio")
9 # Visual Studio CUDA integration will not perform device linking
10 # on a target that itself does not have GenerateRelocatableDeviceCode
11 # enabled.
12 set_property(TARGET CudaOnlySeparateCompilation PROPERTY CUDA_SEPARABLE_COMPILATION ON)
13 endif()
14
15 if(APPLE)
16 # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime.
17 set_property(TARGET CudaOnlySeparateCompilation PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
18 endif()