forked from szcompressor/cuSZ
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
34 lines (26 loc) · 1.36 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
cmake_minimum_required(VERSION 3.18)
project(cusz_asap CUDA CXX)
set(CMAKE_CUDA_STANDARD 14)
set(CMAKE_CXX_STANDARD 14)
## This is a feature as of cmake 3.18.
## check `cmake --help-policy CMP0104` for more detail.
## The maximum possible in compatibility can be set in CMakeLists.txt using
## `set(CMAKE_CUDA_ARCHITECTURES 60 61 62 70 72 75 80 86)`.
## For command line, use, for example `cmake -DCMAKE_CUDA_ARCHITECTURES="75" ..`
## to specify CUDA arch.
enable_language(CUDA)
#include_directories(src)
#include_directories(src/pSZ)
## TODO flag only add to a specific library, e.g. suppressing deprecation on CUDA10 cuSPARSE
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --extended-lambda --expt-relaxed-constexpr -Wno-deprecated-declarations")
set(LIB_TYPE STATIC)
add_library(pq ${LIB_TYPE} src/wrapper/extrap_lorenzo.cu src/wrapper/interp_spline3.cu)
add_library(argp ${LIB_TYPE} src/context.cc)
add_library(sp ${LIB_TYPE} src/wrapper/csr11.cu)
target_link_libraries(sp PUBLIC -lcusparse)
add_library(huff ${LIB_TYPE} src/wrapper/huffman_parbook.cu src/wrapper/huffman_coarse.cu)
target_link_libraries(huff PUBLIC -lcusparse -lcuda)
set_target_properties(huff PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
add_library(nvgpusz ${LIB_TYPE} src/default_path.cu src/base_compressor.cu src/sp_path.cu)
add_executable(cusz src/cusz.cu)
target_link_libraries(cusz nvgpusz argp huff sp pq)