forked from utsaslab/RECIPE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
145 lines (122 loc) · 5.19 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
cmake_minimum_required(VERSION 2.8)
project(ARTSynchronized)
if( NOT CMAKE_BUILD_TYPE )
message(STATUS "No build type selected, default to Release")
set( CMAKE_BUILD_TYPE Release)
else()
message(STATUS "Build type is set to ${CMAKE_BUILD_TYPE}")
endif()
set(HOT TRUE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -march=native -mrtm -mcx16 -mavx -mavx2 -mbmi2 -mlzcnt -Wno-deprecated-declarations -Wall -Wextra -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -faligned-new=64 -DNDEBUG")
## Basic configurations
#add_definitions(-DPERF_PROFILE)
#add_definitions(-DWRITE_LATENCY)
#add_definitions(-DPINCNT)
add_definitions(-DBWTREE_NODEBUG)
#add_definitions(-DSTRING_TYPE)
#add_definitions(-DLOCAL_DATA)
#Crash tests related
add_definitions(-DLOCK_INIT)
#ART Crash test related
#add_definitions(-DCRASH_SPLIT)
#add_definitions(-DCRASH_MERGE)
#add_definitions(-DARTDEBUG)
add_definitions(-DMT_CRASH_SPLIT)
add_definitions(-DMT_CRASH_MERGE)
#CLHT Crash test related. Note: These can't be enabled here
# Please enable them in CLHT/clht_lb_res.c
#add_definitions(-DCRASH_AFTER_SWAP_CLHT)
#add_definitions(-DCLHTDEBUG)
#HOT Crash test related
#add_definitions(-DHOTDEBUG)
add_definitions(-DMT_CRASH_STEP_1)
add_definitions(-DMT_CRASH_STEP_2a)
add_definitions(-DMT_CRASH_STEP_2b)
add_definitions(-DMT_CRASH_STEP_2c)
add_definitions(-DMT_CRASH_STEP_2d)
add_definitions(-DMT_CRASH_STEP_2e)
#add_definitions(-DCRASH_STEP_1)
#add_definitions(-DCRASH_STEP_2a)
#add_definitions(-DCRASH_STEP_2b)
#add_definitions(-DCRASH_STEP_2c)
#add_definitions(-DCRASH_STEP_2d)
#add_definitions(-DCRASH_STEP_2e)
#BwTree Crash test related
add_definitions(-DMT_CRASH_SPLIT_BW)
add_definitions(-DMT_CRASH_MERGE_BW)
#add_definitions(-DCRASH_SPLIT)
#add_definitions(-DCRASH_MERGE)
#MASSTREE Crash Test related
#add_definitions(-DMASSTREEDEBUG)
add_definitions(-DMT_CRASH_AFTER_SPLIT_1)
add_definitions(-DMT_CRASH_AFTER_SPLIT_2)
add_definitions(-DMT_CRASH_AFTER_SPLIT_INNER_1)
add_definitions(-DMT_CRASH_AFTER_SPLIT_INNER_2)
add_definitions(-DMT_CRASH_AFTER_MERGE_1)
add_definitions(-DMT_CRASH_AFTER_MERGE_INNER_1)
#add_definitions(-DCRASH_AFTER_SPLIT_1)
#add_definitions(-DCRASH_AFTER_SPLIT_2)
#add_definitions(-DCRASH_AFTER_SPLIT_INNER_1)
#add_definitions(-DCRASH_AFTER_SPLIT_INNER_2)
#add_definitions(-DCRASH_AFTER_MERGE_1)
#add_definitions(-DCRASH_AFTER_MERGE_INNER_1)
#CCEH Crash test methods
#add_definitions(-DCCEHDEBUG)
add_definitions(-DMT_CRASH_AFTER_DD_STEP_1)
add_definitions(-DMT_CRASH_AFTER_DD_STEP_2)
add_definitions(-DMT_CRASH_AFTER_DD_STEP_2)
#add_definitions(-DCRASH_AFTER_DD_STEP_1)
#add_definitions(-DCRASH_AFTER_DD_STEP_2)
#add_definitions(-DCRASH_AFTER_DD_STEP_3)
#FASTFAIR Crash Test methods
add_definitions(-DMT_CRASH_SPLIT_FF)
## Instruction options for Cache line flush
add_definitions(-DCLFLUSH)
#add_definitions(-DCLFLUSH_OPT)
#add_definitions(-DCLWB)
if (HOT)
add_definitions(-DHOT)
#add_subdirectory(HOT)
include_directories(HOT/libs/hot/single-threaded/include HOT/libs/hot/commons/include HOT/libs/hot/rowex/include HOT/libs/idx/benchmark-helpers/include HOT/libs/idx/map-helpers/include HOT/libs/idx/content-helpers/include HOT/libs/idx/utils/include HOT/libs/profile-lib/include)
endif()
include_directories(CCEH)
include_directories(masstree)
include_directories(CLHT/include CLHT/external/include)
include_directories(Bwtree)
find_library(JemallocLib jemalloc)
find_library(TbbLib tbb)
find_package (Threads)
if (HOT)
set(ART_FILES ROWEX/Tree.cpp FAST_FAIR/btree.h
HOT/libs/hot/rowex/include/hot/rowex/HOTRowex.hpp CCEH/src/CCEH_MSB.cpp
CCEH/src/Level_hashing.cpp Bwtree/src/bwtree.cpp WORT/wort.cpp
WOART/woart.cpp wbtree/wbtree.cpp fptree/FPTree.cpp)
else()
set(ART_FILES ROWEX/Tree.cpp FAST_FAIR/btree.h CCEH/src/CCEH_MSB.cpp
CCEH/src/Level_hashing.cpp Bwtree/src/bwtree.cpp Bwtree/test/test_suite.cpp WORT/wort.cpp
WOART/woart.cpp wbtree/wbtree.cpp fptree/FPTree.cpp)
endif()
add_library(ARTSynchronized ${ART_FILES})
target_link_libraries(ARTSynchronized ${TbbLib} ${JemallocLib}
${CMAKE_THREAD_LIBS_INIT} ${CMAKE_SOURCE_DIR}/CLHT/libclht.a
${CMAKE_SOURCE_DIR}/CLHT/external/lib/libssmem.a)
set(YCSB_TEST ycsb.cpp)
add_executable(ycsb ${YCSB_TEST})
#set(BASIC_TEST example.cpp)
#add_executable(example ${BASIC_TEST})
set(CRASH_TEST crash_test.cpp)
add_executable(crash ${CRASH_TEST})
set(MT_CRASH_TEST mt_crash_test.cpp)
add_executable(mtcrash ${MT_CRASH_TEST})
if (HOT)
#target_link_libraries(ycsb ARTSynchronized hot-rowex-lib benchmark-helpers-lib content-helpers-lib atomic boost_system boost_thread)
target_link_libraries(ycsb ARTSynchronized atomic boost_system boost_thread)
target_link_libraries(mtcrash ARTSynchronized atomic boost_system boost_thread)
#target_link_libraries(example ARTSynchronized hot-rowex-lib benchmark-helpers-lib content-helpers-lib atomic boost_system boost_thread)
target_link_libraries(crash ARTSynchronized atomic boost_system boost_thread)
else()
target_link_libraries(ycsb ARTSynchronized atomic boost_system boost_thread)
target_link_libraries(mtcrash ARTSynchronized atomic boost_system boost_thread)
#target_link_libraries(example ARTSynchronized atomic boost_system boost_thread)
target_link_libraries(crash ARTSynchronized atomic boost_system boost_thread)
endif()