-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (47 loc) · 1.58 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
cmake_minimum_required(VERSION 3.4.3)
project(distributed_system_test)
set(CMAKE_CXX_STANDARD 14)
include(CTest)
set(DIST_FUZZ_STATIC_BUILD OFF CACHE BOOL "Build static?")
set(DIST_FUZZ_DEFAULT_TEST ON CACHE BOOL "Build default test like braft?")
set(DIST_FUZZ_BUILD_COVERAGE_COLLECTOR OFF CACHE BOOL "Build coverage collector with rdkafka?")
set(DIST_FUZZ_BPF OFF CACHE BOOL "Build bpf fault injector?")
set(DIST_FUZZ_RR ON CACHE BOOL "Build rr replay and fault injector?")
set(DIST_FUZZ_AEROSPIKE ON CACHE BOOL "Build aerospike?")
if (${DIST_FUZZ_STATIC_BUILD})
set(Boost_USE_STATIC_LIBS ON)
else()
# see https://stackoverflow.com/questions/23137637/linker-error-while-linking-boost-log-tutorial-undefined-references
add_compile_definitions(BOOST_LOG_DYN_LINK=1)
set(STATIC_RUNTIME OFF)
set(Boost_USE_STATIC_LIBS OFF)
set(OPENSSL_USE_STATIC_LIBS OFF)
endif()
find_package(Threads REQUIRED)
find_package(Boost REQUIRED COMPONENTS log system filesystem)
add_subdirectory(event_control)
add_subdirectory(core)
add_subdirectory(fuzz)
if (${DIST_FUZZ_DEFAULT_TEST})
add_subdirectory(braft_test)
add_subdirectory(c-raft_test)
add_subdirectory(dqlite_test)
add_subdirectory(nuraft_test)
add_subdirectory(redisraft_test)
add_subdirectory(raftis_test)
add_subdirectory(rethinkdb_test)
if (${DIST_FUZZ_AEROSPIKE})
add_subdirectory(aerospike_test)
endif()
add_subdirectory(clickhouse_test)
add_subdirectory(zookeeper_test)
add_subdirectory(hdfs_test)
add_subdirectory(etcd_test)
endif()
add_subdirectory(general_test)
if (${DIST_FUZZ_BPF})
add_subdirectory(bpf)
endif()
if (${DIST_FUZZ_RR})
add_subdirectory(rr)
endif()