-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
72 lines (61 loc) · 1.37 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
70
71
72
cmake_minimum_required(VERSION 3.10)
project(libkvs)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
### index-cpp
add_library(index-cpp INTERFACE)
target_include_directories(index-cpp INTERFACE
libs/index-cpp/src
)
### json
add_library(json INTERFACE)
target_include_directories(json INTERFACE
libs/json/include
)
### teenypath
add_library(teenypath STATIC "")
target_sources(teenypath PRIVATE
libs/teenypath/src/teenypath.cpp
)
target_include_directories(teenypath PUBLIC
libs/teenypath/include
)
### libkvs
add_library(libkvs STATIC "")
target_sources(libkvs PRIVATE
src/VirtualStorage.cpp
src/linear_hashing/LinearHashVolume.cpp
src/linear_hashing/LinearHashStorage.cpp
src/linear_hashing/LinearHashStorageRegistry.cpp
src/utility/TimeUtils.cpp
src/utility/StringUtils.cpp
src/utility/FilesystemUtils.cpp
src/utility/MGMutex.cpp
src/utility/RandomUtils.cpp
)
target_include_directories(libkvs PUBLIC
src
)
set_target_properties(libkvs PROPERTIES
CXX_STANDARD 17
)
target_compile_options(libkvs PRIVATE
-fno-rtti
-fcolor-diagnostics
-fno-ident
-fno-stack-protector
# Warnings
-Wall
-Wextra
-Wpedantic
-Wshadow
-Wconversion
-Wvexing-parse
-Werror=return-type
)
target_link_libraries(libkvs index-cpp json teenypath)
### example app
add_subdirectory(example)
### tests
add_subdirectory(tests)
### load test
add_subdirectory(load_test)