blob: 24ff4781ad8554d755544e1be1c6fd102f11d115 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
cmake_minimum_required(VERSION 3.17)
project(SharedRuntimeViaCUDAFlags NONE)
set(CMAKE_CUDA_FLAGS "")
string(APPEND CMAKE_CUDA_FLAGS "-cudart shared")
enable_language(CUDA)
add_executable(CudaOnlySharedRuntimeViaCUDAFlags main.cu)
if(UNIX)
# Help the shared cuda runtime find libcudart as it is not located
# in a default system searched location
set_property(TARGET CudaOnlySharedRuntimeViaCUDAFlags PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
endif()
|