forked from scale-snu/ckks-gpu-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
40 lines (34 loc) · 1.19 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
cmake_minimum_required(VERSION 3.18)
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES 70 72 75 80 86)
endif()
project(DeviceFunctions LANGUAGES CUDA CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/cmake)
find_package(CUDAToolkit REQUIRED)
find_package(Thrust REQUIRED)
add_library(DeviceFunctions SHARED
src/public/DeviceVector.cu
src/public/Context.cu
src/public/CudaHelper.cu
src/public/MultPtxtBatch.cu
src/public/NttImple.cu
)
target_link_directories(DeviceFunctions PUBLIC /usr/local/cuda/lib64)
target_link_libraries(DeviceFunctions
PUBLIC Thrust CUDA::cudart rmm
PRIVATE CUDA::nvToolsExt)
target_include_directories(DeviceFunctions
INTERFACE include
PRIVATE include/public
)
target_compile_features(DeviceFunctions PUBLIC cxx_std_17 cuda_std_17)
target_compile_options(DeviceFunctions PRIVATE
$<$<COMPILE_LANGUAGE:CXX>:-Wall>
$<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=-fopenmp,-Wall>
$<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<CONFIG:DEBUG>>:-G>
$<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<CONFIG:RELWITHDEBINFO>>:-lineinfo>
)
add_subdirectory(unittest)
add_subdirectory(thirdparty)
add_subdirectory(benchmark)