-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
45 lines (33 loc) · 1.26 KB
/
CMakeLists.txt
File metadata and controls
45 lines (33 loc) · 1.26 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
39
40
41
42
43
44
45
cmake_minimum_required(VERSION 3.15)
project(Poc LANGUAGES CXX)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
option(ENABLE_TESTING "Enable Test Builds" OFF)
option(ENABLE_DOCS "Enable Documentation Builds" ON)
# Link this 'library' to set the c++ standard / compile-time options requested
add_library(project_options INTERFACE)
target_compile_features(project_options INTERFACE cxx_std_17)
# Link this 'library' to use the warnings specified in CompilerWarnings.cmake
add_library(project_warnings INTERFACE)
# standard compiler warnings
include(cmake/CompilerWarnings.cmake)
set_project_warnings(project_warnings)
# sanitizer options if supported by compiler
include(cmake/Sanitizers.cmake)
enable_sanitizers(project_options)
# cppcheck shouldn't validate cpputest since it's a third-party library
set(CPPCHECK_EXCLUDES "--suppress=*:*/CppUTest/*")
# allow for static analysis options
include(cmake/StaticAnalyzers.cmake)
message(STATUS "CPPCHECK_EXCLUDES is:${CPPCHECK_EXCLUDES}")
message(STATUS "CMAKE_CXX_CPPCHECK is:${CMAKE_CXX_CPPCHECK}")
add_subdirectory(src)
if(ENABLE_TESTING)
enable_testing()
message(STATUS "Building Tests.")
add_subdirectory(test)
endif()
if(ENABLE_DOCS)
message(STATUS "Building Docs.")
add_subdirectory(docs)
endif()