forked from utsaslab/RECIPE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists_string.txt
103 lines (84 loc) · 3.82 KB
/
CMakeLists_string.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
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)
#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)
#MASSTREE Crash Test related
#add_definitions(-DMASSTREEDEBUG)
#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(-DCRASH_AFTER_DD_STEP_1)
#add_definitions(-DCRASH_AFTER_DD_STEP_2)
#add_definitions(-DCRASH_AFTER_DD_STEP_3)
## Instruction options for Cache line flush (only support CLWB now)
#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})
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(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(example ARTSynchronized atomic boost_system boost_thread)
target_link_libraries(crash ARTSynchronized atomic boost_system boost_thread)
endif()