-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
37 lines (29 loc) · 996 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
35
36
37
cmake_minimum_required(VERSION 3.21.1 FATAL_ERROR)
project(esplink LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_BINARY_DIR}")
include(cmake/Conan.cmake)
include(CCache)
include(Sanitizers)
include(CompilerWarning)
include(StaticAnalyzers)
include(StandardProjectSetting)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
run_conan()
find_package(Boost REQUIRED COMPONENTS program_options)
find_package(range-v3 REQUIRED)
find_package(fmt REQUIRED)
find_package(spdlog REQUIRED)
add_library(project_options INTERFACE)
enable_sanitizers(project_options)
add_library(project_warnings INTERFACE)
set_project_warnings(project_warnings)
add_subdirectory(src)
if (${ENABLE_TESTING})
include(FetchContent)
FetchContent_Declare(Catch2 GIT_REPOSITORY https://github.com/catchorg/Catch2.git GIT_TAG GIT_TAG v3.0.1)
FetchContent_MakeAvailable(Catch2)
enable_testing()
add_subdirectory(test)
endif ()