-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (40 loc) · 1.3 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
project("CudaIsinIzleyici" LANGUAGES CXX CUDA)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_COMPILER "clang")
include_directories(
"./include/"
)
add_executable(
oneweekend.out
"src/oneweekend/main.cu"
)
add_executable(
nextweek.out
"src/nextweek/main.cu"
)
add_executable(
main_c.out
"src/main.cpp"
)
find_package(CUDA REQUIRED)
#find_package(Thrust REQUIRED)
#thrust_create_target(Thrust)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "-lstdc++ -ldl -ggdb -Wall -Wextra -pedantic -Wextra-tokens")
set(CMAKE_CUDA_FLAGS "-ccbin clang++ -g -gencode arch=compute_50,code=sm_50")
#target_compile_features(main PUBLIC cxx_std_11)
set_target_properties( oneweekend.out
PROPERTIES CUDA_SEPARABLE_COMPILATION ON
)
set_target_properties(oneweekend.out
PROPERTIES LINKER_LANGUAGE CUDA)
set_target_properties( nextweek.out
PROPERTIES CUDA_SEPARABLE_COMPILATION ON
)
set_target_properties(nextweek.out
PROPERTIES LINKER_LANGUAGE CUDA)
install(TARGETS oneweekend.out DESTINATION "${PROJECT_SOURCE_DIR}/bin")
install(TARGETS nextweek.out DESTINATION "${PROJECT_SOURCE_DIR}/bin")
install(TARGETS main_c.out DESTINATION "${PROJECT_SOURCE_DIR}/bin")