-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
50 lines (38 loc) · 937 Bytes
/
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
cmake_minimum_required (VERSION 2.8)
project (bplus-tree)
set (CMAKE_CXX_FLAGS "-std=c++17 -Wall -O2")
include (CheckCXXSymbolExists)
CHECK_CXX_SYMBOL_EXISTS(fdatasync "unistd.h" HAVE_FDATASYNC)
CHECK_CXX_SYMBOL_EXISTS(F_FULLFSYNC "fcntl.h" HAVE_FULLFSYNC)
set (SRC "${PROJECT_SOURCE_DIR}/bpdb")
configure_file (
"${SRC}/config.h.in"
"${SRC}/config.h"
)
set (DB
${SRC}/db.cc
${SRC}/db_iter.cc
${SRC}/disk.cc
${SRC}/page.cc
${SRC}/log.cc
${SRC}/transaction.cc
${SRC}/transaction_lock.cc
${SRC}/version.cc
${SRC}/util.cc
)
set (HEADERS
${SRC}/db.h
${SRC}/disk.h
${SRC}/page.h
${SRC}/codec.h
${SRC}/common.h
${SRC}/log.h
${SRC}/transaction.h
${SRC}/transaction_lock.h
${SRC}/version.h
)
add_library (bpdb STATIC ${DB})
install(TARGETS bpdb
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install(FILES ${HEADERS} DESTINATION include/bpdb)