-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
29 lines (25 loc) · 994 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
cmake_minimum_required(VERSION 3.19)
project(KVStorage)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0")
endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
set(protobuf_MODULE_COMPATIBLE TRUE)
set(PROJECT_PATH ${PROJECT_SOURCE_DIR}/kvstorage)
find_package(Threads REQUIRED)
find_package(Boost REQUIRED COMPONENTS serialization)
find_package(gRPC CONFIG REQUIRED)
find_package(Protobuf CONFIG REQUIRED)
find_package(glog REQUIRED)
include_directories(${PROJECT_SOURCE_DIR}/3rdparty)
include_directories(${PROJECT_PATH}/include)
include_directories(${PROJECT_PATH}/proto)
aux_source_directory(${PROJECT_PATH}/src/rpc RPC)
aux_source_directory(${PROJECT_PATH}/src/raft RAFT)
file(GLOB PROTO "${PROJECT_PATH}/proto/*.pb.cc")
add_subdirectory(test)
add_subdirectory(example)