-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
38 lines (29 loc) · 1.08 KB
/
CMakeLists.txt
File metadata and controls
38 lines (29 loc) · 1.08 KB
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
cmake_minimum_required(VERSION 3.1)
project(cpp-logging-playground)
#---------------------------------------------------------------------------------------
# compiler config
#---------------------------------------------------------------------------------------
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
add_compile_options("-Wall")
add_compile_options("-Wextra")
add_compile_options("-Wconversion")
add_compile_options("-pedantic")
add_compile_options("-Wfatal-errors")
endif()
# Boost::log required Boost version >= 1.54.0
find_package(Boost 1.54.0 REQUIRED COMPONENTS log thread)
# fmt library dependency
find_package(fmt CONFIG REQUIRED)
# spdlog library dependency)
find_package(spdlog CONFIG REQUIRED)
# Threads
find_package(Threads)
add_subdirectory(spdlog_console)
add_subdirectory(spdlog_file)
add_subdirectory(spdlog_udp)
add_subdirectory(spdlog_tcp)
add_subdirectory(boost_console)
add_subdirectory(boost_file)