-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
47 lines (37 loc) · 1010 Bytes
/
CMakeLists.txt
File metadata and controls
47 lines (37 loc) · 1010 Bytes
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 3.14)
project(BPlusSQL
VERSION 1.0.0
DESCRIPTION "A high-performance disk-based B+ tree storage engine"
LANGUAGES CXX
)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Export compile_commands.json for IDE support
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Compiler warnings
add_compile_options(-Wall -Wextra -Wpedantic)
# Release build by default
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Release")
add_compile_options(-O3 -march=native)
endif()
# Threading support (needed by bptree_net)
find_package(Threads REQUIRED)
# Core library
add_subdirectory(src)
# Tools
add_subdirectory(tools)
# Tests
option(BPTREE_BUILD_TESTS "Build unit tests" ON)
if(BPTREE_BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif()
# Fuzz Testing
option(BPTREE_BUILD_FUZZ "Build libFuzzer targets" OFF)
if(BPTREE_BUILD_FUZZ)
add_subdirectory(fuzz)
endif()