-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
34 lines (27 loc) · 949 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
34 lines (27 loc) · 949 Bytes
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
cmake_minimum_required(VERSION 3.21)
project(PROJECTNAME LANGUAGES CXX)
if(WIN32)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif(WIN32)
# Link to this library to inherit the properties
add_library(project_properties INTERFACE)
target_compile_features(project_properties INTERFACE cxx_std_14)
# Link this 'library' to use the warnings specified in CompilerWarnings.cmake
add_library(project_warnings INTERFACE)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${PROJECT_SOURCE_DIR}/cmake/")
include(StandardProjectSettings)
include(CompilerWarnings)
set_project_warnings(project_warnings)
include(Doxygen)
# enable doxygen
enable_doxygen()
include(StaticAnalyzers)
# sanitizer options if supported by compiler
include(Sanitizers)
enable_sanitizers(project_properties)
option(BUILD_TESTING "Build tests" ON)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
enable_testing()
endif()
add_subdirectory(external)
add_subdirectory(src)