-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
247 lines (220 loc) · 9.56 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
cmake_minimum_required(VERSION 3.16)
project(odyssey)
set(odyssey_VERSION_MAJOR 1)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -std=gnu1x -march=native -Wno-address-of-packed-member \
-Wno-format-truncation -D_GNU_SOURCE -g ")
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O3 -std=gnu2x -flto ")
# -g
# -fno-omit-frame-pointer enable the frame pointer to trace stack
#-fno-inline
#-fsanitize=address -fsanitize=thread
# -fsanitize=address -fno-inline -fno-omit-frame-pointer
set(COMMON_INCLUDE_DIRS
/usr/include/
/usr/include/rdma
/usr/include/infiniband
odlib/incldue
odlib/include/fifo
odlib/include/libhrd
odlib/include/mica
odlib/include/general_util
odlib/include/multicast
odlib/include/network_api
odlib/include/client_api
odlib/include/trace
odlib/include/protocols)
set (PAXOS_INCLUDE_DIRS
paxos/include/cp_top/
paxos/include/cp_netw/
paxos/include/cp_core)
set (KITE_INCLUDE_DIRS
kite/include/kite
kite/include/kite_inline_util)
set(ODLIB_FILES
odlib/src/main/od_main.c
odlib/src/main/od_worker.c
odlib/src/mica/od_kvs.c
odlib/src/main/od_stats.c
#libhrd
odlib/include/libhrd/od_hrd.h
odlib/src/libhrd/od_hrd_util.c
odlib/src/libhrd/od_hrd_conn.c
#mica
odlib/src/mica/od_city.c
odlib/include/mica/od_kvs.h
odlib/include/mica/od_city.h
/usr/include/infiniband/verbs.h
odlib/src/client/od_client.c
odlib/include/general_util/od_generic_macros.h
odlib/include/client_api/od_wrkr_side_calls.h
odlib/include/client_api/od_interface.h
odlib/include/general_util/od_latency_util.h
odlib/include/general_util/od_stats.h
odlib/include/general_util/od_top.h
odlib/include/general_util/od_init_func.h
odlib/include/general_util/od_generic_inline_util.h
odlib/include/general_util/od_init_connect.h
odlib/include/general_util/od_generic_opcodes.h
odlib/include/trace/od_trace_util.h
odlib/include/general_util/od_rdma_gen_util.h
odlib/include/general_util/od_debug_util.h
odlib/include/general_util/od_inline_util.h
odlib/include/general_util/od_sizes.h
odlib/include/general_util/od_config_util.h
odlib/include/multicast/od_multicast.h
odlib/src/multicast/od_multicast.c
odlib/include/network_api/od_network_context.h
odlib/include/fifo/od_fifo.h
odlib/include/network_api/od_netw_func.h
odlib/include/network_api/od_templates.h
odlib/src/network_api/od_init_qp_meta.c
odlib/src/network_api/od_init_ctx.c
odlib/src/network_api/od_main_loop_api.c
odlib/src/trace/od_trace.c
odlib/src/client_api/od_interface.c
odlib/src/client/od_wrkr_side_calls.c
odlib/include/protocols/od_top_prot_sel.h
odlib/include/protocols/od_main_prot_sel.h
odlib/include/protocols/od_wrkr_prot_sel.h
odlib/include/protocols/od_kvs_prot_sel.h
odlib/include/protocols/od_stats_prot_sel.h)
set(KITE_SOURCE_FILES
kite/src/kite/kt_util.c
kite/src/kite/kt_stats.c
kite/include/kite_inline_util/kt_inline_util.h
kite/include/kite/kt_util.h
kite/include/kite/kt_config.h
kite/include/kite/kt_opcodes.h
kite/include/kite_inline_util/kt_generic_util.h
kite/include/kite_inline_util/kt_kvs_util.h
kite/include/kite_inline_util/kt_debug_util.h
kite/include/kite_inline_util/kt_config_util.h
kite/include/kite_inline_util/kt_paxos_util.h
kite/include/kite_inline_util/kt_reserve_stations_util.h
kite/include/kite_inline_util/kt_communication_utility.h
kite/include/kite_inline_util/kt_paxos_generic_util.h
kite/include/kite/kt_messages.h
kite/include/kite/kt_buffer_sizes.h
kite/include/kite/kt_main.h)
set(PAXOS_SOURCE_FILES
paxos/include/cp_netw/cp_main_loop.h
paxos/include/cp_top/cp_init.h
paxos/include/cp_top/cp_config.h
paxos/include/cp_top/cp_opcodes.h
paxos/include/cp_netw/cp_netw_generic_util.h
paxos/include/cp_netw/cp_kvs.h
paxos/include/cp_netw/cp_netw_debug.h
paxos/include/cp_core/cp_core_debug.h
paxos/include/cp_top/cp_messages.h
paxos/include/cp_top/cp_buffer_sizes.h
paxos/src/cp_top/cp_init.c
paxos/src/cp_top/cp_stats.c
paxos/include/cp_core/cp_core_interface.h
paxos/include/cp_core/cp_core_generic_util.h
paxos/src/cp_core/cp_handle_rmw_rep.c
paxos/src/cp_core/cp_commit_alg.c
paxos/src/cp_core/cp_handle_remote_rmw.c
paxos/src/cp_core/cp_rmw_fsm.c
paxos/src/cp_core/cp_inspect_props_accs.c
paxos/src/cp_core/cp_back_off.c
paxos/src/cp_core/cp_retrying.c
paxos/src/cp_core/cp_local_prop_acc.c
paxos/src/cp_core/cp_rmw_first_try.c
paxos/include/cp_netw/cp_netw_interface.h
paxos/src/cp_netw/cp_netw_interface.c
paxos/include/cp_core/cp_core_common_util.h
paxos/include/cp_core/cp_core_structs.h
paxos/src/cp_core/cp_init_util.c
paxos/include/cp_netw/cp_netw_structs.h
paxos/src/cp_core/cp_core_fill_netw_messages.c
paxos/src/cp_netw/cp_main_loop.c
paxos/src/cp_netw/cp_netw_insert.c paxos/src/cp_netw/cp_kvs.c paxos/include/cp_netw/cp_netw_insert.h paxos/include/cp_top/cp_stats.h)
set(ZK_SOURCE_FILES
zookeeper/src/zookeeper/zk_stats.c
zookeeper/src/zookeeper/zk_util.c
zookeeper/include/zookeeper/zk_inline_util.h
zookeeper/include/zookeeper/zk_bqr.h
zookeeper/include/zookeeper/zk_latency.h
zookeeper/include/zookeeper/zk_main.h
zookeeper/include/zookeeper/zk_util.h
zookeeper/include/zookeeper/zk_config.h
zookeeper/include/zookeeper/zk_kvs_util.h
zookeeper/include/zookeeper/zk_opcodes.h
zookeeper/include/zookeeper/zk_debug_util.h
zookeeper/include/zookeeper/zk_reservation_stations_util.h
zookeeper/include/zookeeper/zk_generic_util.h)
set(DR_SOURCE_FILES
derecho/include/derecho/dr_config.h
derecho/include/derecho/dr_inline_util.h
derecho/src/derecho/dr_stats.c
derecho/include/derecho/dr_messages.h
derecho/include/derecho/dr_reserve_stations.h
derecho/include/derecho/dr_debug_util.h
derecho/include/derecho/dr_kvs_util.h
derecho/include/derecho/dr_generic_util.h
derecho/include/derecho/dr_util.h)
set(HERMES_SOURCE_FILES
hermes/include/hermes/hr_config.h
hermes/include/hermes/hr_inline_util.h
hermes/include/hermes/hr_util.h
hermes/include/hermes/hr_messages.h
hermes/src/hermes/hr_stats.c
hermes/include/hermes/hr_kvs_util.h
hermes/include/hermes/hr_debug_util.h
hermes/src/hermes/hr_main_loop.c
hermes/src/hermes/hr_kvs.c
hermes/src/hermes/hr_util.c)
set(CHT_SOURCE_FILES
cht/include/cht/cht_util.h
cht/include/cht/cht_config.h
cht/include/cht/cht_kvs_util.h
cht/include/cht/cht_inline_util.h
cht/include/cht/cht_debug_util.h
cht/include/cht/cht_messages.h
cht/src/cht/cht_stats.c
cht/include/cht/cht_reserve_stations.h )
set(CRAQ_SOURCE_FILES
craq/include/craq/cr_config.h
craq/include/craq/cr_util.h
craq/include/craq/cr_inline_util.h
craq/include/craq/cr_debug_util.h
craq/src/craq/cr_stats.c
craq/include/craq/cr_messages.h
craq/include/craq/cr_generic_util.h
craq/include/craq/cr_kvs_util.h)
#set(CMAKE_BUILD_TYPE Release)
add_executable(derecho ${DR_SOURCE_FILES} ${ODLIB_FILES})
add_executable(kite ${KITE_SOURCE_FILES} ${ODLIB_FILES})
add_executable(zookeeper ${ZK_SOURCE_FILES} ${ODLIB_FILES})
add_executable(hermes ${HERMES_SOURCE_FILES} ${ODLIB_FILES})
add_executable(cht ${CHT_SOURCE_FILES} ${ODLIB_FILES})
add_executable(craq ${CRAQ_SOURCE_FILES} ${ODLIB_FILES})
add_executable(paxos ${PAXOS_SOURCE_FILES} ${ODLIB_FILES})
target_include_directories(derecho PUBLIC
${COMMON_INCLUDE_DIRS} derecho/include/derecho/)
target_include_directories(kite PUBLIC
${COMMON_INCLUDE_DIRS} ${KITE_INCLUDE_DIRS})
target_include_directories(zookeeper PUBLIC
${COMMON_INCLUDE_DIRS} zookeeper/include/zookeeper)
target_include_directories(hermes PUBLIC
${COMMON_INCLUDE_DIRS} hermes/include/hermes)
target_include_directories(cht PUBLIC
${COMMON_INCLUDE_DIRS} cht/include/cht)
target_include_directories(craq PUBLIC
${COMMON_INCLUDE_DIRS} craq/include/craq)
target_include_directories(paxos PUBLIC
${COMMON_INCLUDE_DIRS} ${PAXOS_INCLUDE_DIRS})
set_target_properties(derecho PROPERTIES COMPILE_FLAGS -DDERECHO)
set_target_properties(kite PROPERTIES COMPILE_FLAGS -DKITE )
set_target_properties(zookeeper PROPERTIES COMPILE_FLAGS -DZOOKEEPER)
set_target_properties(hermes PROPERTIES COMPILE_FLAGS -DHERMES)
set_target_properties(cht PROPERTIES COMPILE_FLAGS -DCHT)
set_target_properties(craq PROPERTIES COMPILE_FLAGS -DCRAQ)
set_target_properties(paxos PROPERTIES COMPILE_FLAGS -DPAXOS)
target_link_libraries(derecho pthread ibverbs rt numa rdmacm)
target_link_libraries(kite pthread ibverbs rt numa rdmacm)
target_link_libraries(zookeeper pthread ibverbs rt numa rdmacm)
target_link_libraries(hermes pthread ibverbs rt numa rdmacm)
target_link_libraries(cht pthread ibverbs rt numa rdmacm)
target_link_libraries(craq pthread ibverbs rt numa rdmacm)
target_link_libraries(paxos pthread ibverbs rt numa rdmacm)