-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
73 lines (59 loc) · 2.14 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
cmake_minimum_required(VERSION 3.0)
project(CuckooMap)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
find_package(jemalloc REQUIRED)
find_package(Threads REQUIRED)
find_package(ZLIB REQUIRED)
find_package(BZip2 REQUIRED)
#list(APPEND CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage -DNDEBUG ${CMAKE_CXX_FLAGS}")
#list(APPEND CMAKE_EXE_LINKER_FLAGS "-O0 -g -fprofile-arcs -ftest-coverage -DNDEBUG ${CMAKE_EXE_LINKER_FLAGS}")
add_library(qdigest INTERFACE)
target_include_directories(qdigest INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/qdigest)
add_library(rocksdb INTERFACE)
target_include_directories(rocksdb INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/rocksdb/include)
add_library(cuckoo INTERFACE)
target_include_directories(cuckoo INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
add_executable(CuckooFilterTest
tests/CuckooFilterTest.cpp
)
target_link_libraries(CuckooFilterTest PRIVATE cuckoo)
add_executable(CuckooMapTest
tests/CuckooMapTest.cpp
)
target_link_libraries(CuckooMapTest PRIVATE cuckoo)
add_executable(CuckooMultiMapTest
tests/CuckooMultiMapTest.cpp
)
target_link_libraries(CuckooMultiMapTest PRIVATE cuckoo)
add_executable(InternalCuckooMapTest
tests/InternalCuckooMapTest.cpp
)
target_link_libraries(InternalCuckooMapTest PRIVATE cuckoo)
add_executable(ShardedCuckooMapTest
tests/ShardedCuckooMapTest.cpp
)
target_link_libraries(ShardedCuckooMapTest PRIVATE cuckoo)
add_executable(ShardedCuckooMultiMapTest
tests/ShardedCuckooMultiMapTest.cpp
)
target_link_libraries(ShardedCuckooMultiMapTest PRIVATE cuckoo)
add_executable(PerformanceTest
tests/PerformanceTest.cpp
)
target_link_libraries(PerformanceTest PRIVATE
${CMAKE_THREAD_LIBS_INIT}
${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/rocksdb/librocksdb.a
${ZLIB_LIBRARIES}
${BZIP2_LIBRARIES}
snappy
jemalloc
-ldl
rocksdb
qdigest
cuckoo
)
add_custom_command(TARGET PerformanceTest PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/performance $<TARGET_FILE_DIR:PerformanceTest>/performance)