-
Notifications
You must be signed in to change notification settings - Fork 32
/
CMakeLists.txt
76 lines (63 loc) · 2.27 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
cmake_minimum_required (VERSION 3.0)
project(art)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
add_library(art INTERFACE)
target_include_directories(
art
INTERFACE
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>"
)
### dependencies ###
# doctest
set(DOCTEST_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/third_party/doctest/doctest)
add_library(doctest INTERFACE)
target_include_directories(doctest INTERFACE ${DOCTEST_INCLUDE_DIR})
# picobench
set(PICOBENCH_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/third_party/picobench/include)
add_library(picobench INTERFACE)
target_include_directories(picobench INTERFACE ${PICOBENCH_INCLUDE_DIR})
# zipf
set(ZIPF_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/third_party/zipf)
add_library(zipf ${PROJECT_SOURCE_DIR}/third_party/zipf/zipf.cpp)
target_include_directories(zipf PUBLIC ${ZIPF_INCLUDE_DIR})
### executables ###
# main executable
add_executable(main
"${PROJECT_SOURCE_DIR}/src/example.cpp"
)
target_link_libraries(main art zipf)
# test executable
add_executable(test
"${PROJECT_SOURCE_DIR}/test/art.cpp"
"${PROJECT_SOURCE_DIR}/test/main.cpp"
"${PROJECT_SOURCE_DIR}/test/node.cpp"
"${PROJECT_SOURCE_DIR}/test/inner_node.cpp"
"${PROJECT_SOURCE_DIR}/test/node_4.cpp"
"${PROJECT_SOURCE_DIR}/test/node_16.cpp"
"${PROJECT_SOURCE_DIR}/test/node_48.cpp"
"${PROJECT_SOURCE_DIR}/test/node_256.cpp"
"${PROJECT_SOURCE_DIR}/test/tree_it.cpp"
)
target_link_libraries(test art doctest)
# bench executable
add_executable(bench
"${PROJECT_SOURCE_DIR}/bench/delete.cpp"
"${PROJECT_SOURCE_DIR}/bench/insert.cpp"
"${PROJECT_SOURCE_DIR}/bench/main.cpp"
"${PROJECT_SOURCE_DIR}/bench/mixed.cpp"
"${PROJECT_SOURCE_DIR}/bench/mixed_dense.cpp"
# "${PROJECT_SOURCE_DIR}/bench/node_4.cpp"
# "${PROJECT_SOURCE_DIR}/bench/node_16.cpp"
# "${PROJECT_SOURCE_DIR}/bench/node_48.cpp"
# "${PROJECT_SOURCE_DIR}/bench/node_256.cpp"
"${PROJECT_SOURCE_DIR}/bench/query_iteration.cpp"
"${PROJECT_SOURCE_DIR}/bench/query_sparse_uniform.cpp"
"${PROJECT_SOURCE_DIR}/bench/query_sparse_uniform_64.cpp"
"${PROJECT_SOURCE_DIR}/bench/query_sparse_zipf.cpp"
)
target_link_libraries(bench art picobench zipf)