forked from sasagarw/raft-lab-raftaar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
34 lines (25 loc) · 929 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
cmake_minimum_required(VERSION 3.10)
project(Rafty)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type (default is Debug)")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20 -Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -g")
# This depends on how the setup script install the grpc
set(grpc_prefix "$ENV{HOME}/.local")
set(CMAKE_PREFIX_PATH ${grpc_prefix} CACHE PATH "libs prefix path")
add_subdirectory(libs/spdlog)
add_subdirectory(libs/googletest)
# includes grpc
include(cmake/common.cmake)
# Add the include directories to the project
include_directories(${CMAKE_SOURCE_DIR}/inc)
include_directories(${CMAKE_SOURCE_DIR}/generated)
# Add subdirectories
add_subdirectory(proto)
add_subdirectory(src)
add_subdirectory(app)
add_subdirectory(unittests)
add_subdirectory(integration_tests)