forked from sfu-dis/FPTree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
69 lines (50 loc) · 1.88 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
cmake_minimum_required(VERSION 3.14)
include(FetchContent)
project(fptree)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -std=c++17 -ljemalloc -mavx512f -mavx512vl -mavx512bw -mavx512dq -mavx512cd -mrtm -pthread")
link_directories(oneTBB/build/gnu_9.3_cxx11_64_release)
include_directories(/home/vogel/build/oneTBB/include)
set(PMEM_BACKEND "PMEM" CACHE STRING "Persistent memory backend type")
if(${PMEM_BACKEND} STREQUAL "PMEM")
add_definitions(-DPMEM)
message(STATUS "Persistence support: PMEM")
elseif(${PMEM_BACKEND} STREQUAL "DRAM")
message(STATUS "Persistence support: off")
else()
message(FATAL_ERROR "Unsupported persistent memory backend: ${PMEM_BACKEND}")
endif()
option(BUILD_INSPECTOR "Build inspector to check correctness of single/multi-thread operation" ON)
option(TEST_MODE "Test mode will test leaf nodes and inner node smaller to help debug" ON)
option(NDEBUG "Disable assert statements" ON)
if(${TEST_MODE})
add_definitions(-DTEST_MODE)
message(STATUS "TEST_MODE: defined")
else()
message(STATUS "TEST_MODE: not defined")
endif()
if(${BUILD_INSPECTOR})
add_definitions(-DBUILD_INSPECTOR)
message(STATUS "BUILD_INSPECTOR: defined")
add_executable(
inspector
fptree.cpp
fptree.h
inspector.cpp
)
else()
message(STATUS "BUILD_INSPECTOR: not defined")
add_executable(
fptree
fptree.cpp
fptree.h
)
endif()
add_library(fptree_pibench_wrapper SHARED fptree_wrapper.cpp
fptree.cpp tree_api.h)
target_link_libraries(fptree_pibench_wrapper /home/vogel/build/oneTBB/build/gnu_9.3_cxx11_64_release/libtbb.so /usr/local/lib/libpmemobj.so /usr/local/lib/libpmem.so )