-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
31 lines (22 loc) · 867 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
cmake_minimum_required(VERSION 3.17)
project(mithril)
set(CMAKE_CXX_STANDARD 17)
find_package(Seastar REQUIRED)
find_package(Boost REQUIRED system log log_setup)
file(GLOB_RECURSE SOURCE_FILES ${PROJECT_SOURCE_DIR}/src/*.cc)
add_library(mithril STATIC ${SOURCE_FILES})
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_definitions(DCHECK_IS_ON)
add_compile_definitions(DEBUG_LOGGING)
add_compile_definitions(BOOST_LOG_DYN_LINK)
set(Boost_USE_DEBUG_LIBS OFF)
set(Boost_USE_RELEASE_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
endif ()
# TODO: Include Boost only on debug builds
target_include_directories(mithril PUBLIC include PRIVATE ${Boost_INCLUDE_DIRS})
target_link_libraries(mithril PUBLIC Seastar::seastar PRIVATE Boost::log)
add_subdirectory(examples)
enable_testing()
add_subdirectory(tests)