summaryrefslogtreecommitdiffstats
path: root/Tests/Cuda/ProperLinkFlags/CMakeLists.txt
blob: b6e0e394b45c6844002dcfe0b08c9b34d00ab9dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

cmake_minimum_required(VERSION 3.7)
project (ProperLinkFlags CUDA CXX)

#Goal for this example:
#Verify that when we have CXX and CUDA enabled and we link an executable that
#has CUDA and CXX we use the CUDA link flags when doing the device link
#step

#Specify a set of valid CUDA flags and an invalid set of CXX flags ( for CUDA )
#to make sure we don't use the CXX flags when linking CUDA executables
string(APPEND CMAKE_CUDA_FLAGS " -arch=sm_35 --use_fast_math")
set(CMAKE_CXX_FLAGS "-Wall")

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CUDA_STANDARD 11)
add_executable(ProperLinkFlags file1.cu main.cxx)

set_target_properties( ProperLinkFlags
                       PROPERTIES CUDA_SEPARABLE_COMPILATION ON)