-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
43 lines (34 loc) · 979 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
38
39
40
41
42
43
cmake_minimum_required(VERSION 3.25)
project(functional VERSION 0.0.1 LANGUAGES C CXX)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
include(Ccache)
option(DISABLE_FETCH_CONTENT "Do not use FetchContent for dependencies." OFF)
option(COVERARE "Enable coverage report." OFF)
option(DOCS "Generate documentation." OFF)
if(COVERAGE)
include(CodeCoverage)
include(Coverage)
endif()
if (DOCS)
include(Docs)
endif()
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_compile_options(
-march=native -Wall -Wextra -Wpedantic "$<$<CONFIG:DEBUG>:-O0>"
)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(
-stdlib=libc++ -Wno-missing-braces -Wno-unused-command-line-argument
)
add_link_options(
-lc++
)
endif()
add_subdirectory(include)
include(Catch2)
enable_testing()
add_subdirectory(tests)
install(FILES README.md LICENSE.md
DESTINATION share/doc/functional)