forked from owensgroup/SlabHash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
126 lines (102 loc) · 3.92 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
cmake_minimum_required (VERSION 3.8 FATAL_ERROR)
project (SlabHash)
find_package(CUDA 12.1 REQUIRED)
option(CMAKE_VERBOSE_MAKEFILE ON)
option(DGTEST, "DGTEST" ON)
set(CUDA_NVCC_FLAGS -std=c++11)
set (CMAKE_CXX_STANDARD 11)
set(CMAKE_CUDA_HOST_COMPILER /usr/bin/gcc-10)
if (CUDA_VERBOSE_PTXAS)
set(VERBOSE_PTXAS --ptxas-options=-v)
endif (CUDA_VERBOSE_PTXAS)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(GENCODE_SM30
-gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_30,code=compute_30)
set(GENCODE_SM35
-gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_35,code=compute_35)
set(GENCODE_SM37
-gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_37,code=compute_37)
set(GENCODE_SM50
-gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_50,code=compute_50)
set(GENCODE_SM60
-gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_60,code=compute_60)
set(GENCODE_SM61
-gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_61,code=compute_61)
set(GENCODE_SM70
-gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_70,code=compute_70)
set(GENCODE_SM71
-gencode=arch=compute_71,code=sm_71 -gencode=arch=compute_71,code=compute_71)
set(GENCODE_SM75
-gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_75,code=compute_75)
set(GENCODE_SM86
-gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_86,code=compute_86)
set(GENCODE_SM87
-gencode=arch=compute_87,code=sm_87 -gencode=arch=compute_87,code=compute_87)
set(GENCODE_SM89
-gencode=arch=compute_89,code=sm_89 -gencode=arch=compute_89,code=compute_89)
set(GENCODE_SM90
-gencode=arch=compute_90,code=sm_90 -gencode=arch=compute_90,code=compute_90)
option(SLABHASH_GENCODE_SM30 "GENCODE_SM30" OFF)
option(SLABHASH_GENCODE_SM35 "GENCODE_SM35" OFF)
option(SLABHASH_GENCODE_SM37 "GENCODE_SM37" OFF)
option(SLABHASH_GENCODE_SM50 "GENCODE_SM50" OFF)
option(SLABHASH_GENCODE_SM60 "GENCODE_SM60" OFF)
option(SLABHASH_GENCODE_SM61 "GENCODE_SM61" OFF)
option(SLABHASH_GENCODE_SM70 "GENCODE_SM70" OFF)
option(SLABHASH_GENCODE_SM71 "GENCODE_SM71" OFF)
option(SLABHASH_GENCODE_SM75 "GENCODE_SM75" OFF)
option(SLABHASH_GENCODE_SM86 "GENCODE_SM86" ON)
option(SLABHASH_GENCODE_SM87 "GENCODE_SM87" OFF)
option(SLABHASH_GENCODE_SM89 "GENCODE_SM89" OFF)
option(SLABHASH_GENCODE_SM90 "GENCODE_SM90" OFF)
if (SLABHASH_GENCODE_SM30)
set(GENCODE ${GENCODE} ${GENCODE_SM30})
endif(SLABHASH_GENCODE_SM30)
if (SLABHASH_GENCODE_SM35)
set(GENCODE ${GENCODE} ${GENCODE_SM35})
endif(SLABHASH_GENCODE_SM35)
if (SLABHASH_GENCODE_SM37)
set(GENCODE ${GENCODE} ${GENCODE_SM37})
endif(SLABHASH_GENCODE_SM37)
if (SLABHASH_GENCODE_SM50)
set(GENCODE ${GENCODE} ${GENCODE_SM50})
endif(SLABHASH_GENCODE_SM50)
if (SLABHASH_GENCODE_SM60)
set(GENCODE ${GENCODE} ${GENCODE_SM60})
endif(SLABHASH_GENCODE_SM60)
if (SLABHASH_GENCODE_SM61)
set(GENCODE ${GENCODE} ${GENCODE_SM61})
endif(SLABHASH_GENCODE_SM61)
if (SLABHASH_GENCODE_SM70)
set(GENCODE ${GENCODE} ${GENCODE_SM70})
endif(SLABHASH_GENCODE_SM70)
if(SLABHASH_GENCODE_SM71)
set(GENCODE ${GENCODE} ${GENCODE_SM71})
endif(SLABHASH_GENCODE_SM71)
if(SLABHASH_GENCODE_SM75)
set(GENCODE ${GENCODE} ${GENCODE_SM75})
endif(SLABHASH_GENCODE_SM75)
if(SLABHASH_GENCODE_SM86)
set(GENCODE ${GENCODE} ${GENCODE_SM86})
endif(SLABHASH_GENCODE_SM86)
if(SLABHASH_GENCODE_SM87)
set(GENCODE ${GENCODE} ${GENCODE_SM87})
endif(SLABHASH_GENCODE_SM87)
if(SLABHASH_GENCODE_SM89)
set(GENCODE ${GENCODE} ${GENCODE_SM89})
endif(SLABHASH_GENCODE_SM89)
if(SLABHASH_GENCODE_SM90)
set(GENCODE ${GENCODE} ${GENCODE_SM90})
endif(SLABHASH_GENCODE_SM90)
include_directories(SlabAlloc/src)
include_directories(src src/concurrent)
include_directories(ThirdParty/rapidjson/include)
include_directories(ThirdParty/googletest/googletest)
include_directories(ThirdParty/googletest/googletest/include)
add_subdirectory(ThirdParty/googletest/googletest)
add_subdirectory(test)
add_subdirectory(bench)
if (DGTEST)
enable_testing()
endif()