-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
31 lines (23 loc) · 1.03 KB
/
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
cmake_minimum_required(VERSION 3.25)
# Create our project with our standard cmake settings
project(myproject CXX)
include(cmake/standard_project_settings.cmake)
# This is an "empty" library with no source to allow us to pass around, build and "link" a set of options
add_library(project_options INTERFACE)
target_compile_features(project_options INTERFACE cxx_std_11)
# This is an "empty" library with no source to allow us to pass around, build and "link" a set of warnings
add_library(project_warnings INTERFACE)
# Set default compiler warnings
include(cmake/compiler_warnings.cmake)
set_project_warnings(project_warnings)
# Allow optional static analysis
include(cmake/static_analysis.cmake)
# Enable precompiled headers with a global PCH
option(ENABLE_PCH "Enable Precompiled Headers" ON)
if(ENABLE_PCH)
target_precompile_headers(project_options INTERFACE <map> <memory> <string> <vector> <utility> "include/types.h")
endif()
# Set our main include directory
include_directories(include)
# Import our src "module"
add_subdirectory(src)