2017-04-14 19:02:05 +02:00
|
|
|
cmake_minimum_required(VERSION 3.7)
|
2018-10-28 12:09:07 +01:00
|
|
|
project(WithC CUDA C)
|
2017-04-14 19:02:05 +02:00
|
|
|
|
|
|
|
string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
|
|
|
|
|
|
|
|
add_executable(CudaWithC main.c cuda.cu)
|
|
|
|
|
|
|
|
if(APPLE)
|
2018-01-26 17:06:56 +01:00
|
|
|
# Help the static cuda runtime find the driver (libcuda.dyllib) at runtime.
|
|
|
|
set_property(TARGET CudaWithC PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
|
2017-04-14 19:02:05 +02:00
|
|
|
endif()
|