-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathCMakeLists.txt
48 lines (36 loc) · 1.38 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
cmake_minimum_required(VERSION 2.8)
project(P-ART)
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(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -g -march=native -mavx -mavx2 -DNDEBUG")
## Instruction options for Cache line flush
add_definitions(-DCLFLUSH)
#add_definitions(-DCLFLUSH_OPT)
#add_definitions(-DCLWB)
link_libraries(pthread atomic boost_system boost_thread gtest)
find_library(TbbLib tbb)
include_directories(./ART
./benchmark
./nvm_mgr
./test
./fast_fair)
aux_source_directory(ART DIR_ART_SRCS)
aux_source_directory(benchmark DIR_BENCH_SRCS)
aux_source_directory(fast_fair DIR_FF_SRCS)
aux_source_directory(nvm_mgr DIR_NVMMGR_SRCS)
aux_source_directory(perf DIR_PERF_SRCS)
aux_source_directory(test DIR_TEST_SRC)
add_library(Indexes ${DIR_ART_SRCS} ${DIR_BENCH_SRCS} ${DIR_FF_SRCS} ${DIR_NVMMGR_SRCS})
target_link_libraries(Indexes ${TbbLib})
set(P_ART_BENCH perf/art_simple_bench.cpp)
add_executable(art_simple_bench ${P_ART_BENCH})
target_link_libraries(art_simple_bench Indexes)
set(BENCHMARK perf/main.cpp)
add_executable(benchmark ${BENCHMARK})
target_link_libraries(benchmark Indexes)
add_executable(unittest ${DIR_TEST_SRC})
target_link_libraries(unittest Indexes gtest)