-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
65 lines (56 loc) · 1.16 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
57
58
59
60
61
62
63
64
65
cmake_minimum_required(VERSION 3.20)
project(fredholm LANGUAGES C CXX CUDA)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# C++ version and std
if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
# CUDA C++ version and std
if(NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
set(CMAKE_CUDA_SEPARABLE_COMPILATION ON)
endif()
# CUDA Toolkit
find_package(CUDAToolkit REQUIRED)
# cwl
add_subdirectory("cwl/")
# external
add_subdirectory("externals/")
# kernels
add_library(kernels
"src/kernels/bilateral.cu"
"src/kernels/nl-means.cu"
"src/kernels/a-trous.cu"
"src/kernels/nwfr.cu"
)
target_include_directories(kernels PUBLIC
"src/kernels"
)
target_link_libraries(kernels PUBLIC
cwl
sutil
)
# main
add_executable(main "src/main.cpp")
target_link_libraries(main PRIVATE
CUDA::cudart
argparse
stb_image
stb_image_write
sutil
cwl
kernels
)
# test
add_executable(test "src/test.cpp")
target_link_libraries(test PRIVATE
CUDA::cudart
argparse
stb_image
stb_image_write
sutil
cwl
kernels
)