summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly/EnableStandard/CMakeLists.txt
blob: 53b913220430c2a2429329e9a2b276a020daff20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

cmake_minimum_required(VERSION 3.7)
project (CudaOnlyEnableStandard CUDA)

#Goal for this example:
#build cuda sources that require C++11 to be enabled.

add_library(CUDAStatic11 STATIC static.cu)
add_library(CUDADynamic11 SHARED shared.cu)

add_executable(CudaOnlyEnableStandard main.cu)
target_link_libraries(CudaOnlyEnableStandard PRIVATE CUDAStatic11 CUDADynamic11)

set_target_properties(CUDAStatic11 CUDADynamic11 PROPERTIES CUDA_STANDARD 11)
set_target_properties(CUDAStatic11 CUDADynamic11 PROPERTIES CUDA_STANDARD_REQUIRED TRUE)