-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeDefaults.txt
28 lines (26 loc) · 1.08 KB
/
CMakeDefaults.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
# Global settings (Projectwide): Setting the c++ standard (like c++11/14/17/20)
set(CMAKE_CXX_STANDARD 17)
## Global settings (Projectwide): Making the c++ standard mandatory
set (CMAKE_CXX_STANDARD_REQUIRED ON)
# Alternative: set the c++ standard locally
# setting it half-global/half-local
# set_property(
# TARGET ${ZIEL}
# PROPERTY CXX_STANDARD_REQUIRED ON
# )
# Alternative : set it just local
# set_target_properties(
# ${ZIEL}
# PROPERTIES
# CXX_STANDARD 17
# CXX_STANDARD_REQUIRED ON
# )
# 1) Passing the Debugger the projectstructure via compile_commands.json
# 2) Providing Crossfile / predictiv text for CodeCompletion
# 3) builds a compile_commands.json in the build dir, which got to be hard/soft linked in the main dir of the project. Important vor the debugger, which needs the projectstructure
# ! has to be defined before add_library
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# adding the compileflags
# debugmode: -ggdb3
# releasemode: optimized compiling
add_compile_options(-ggdb3 -Werror -Wall -Wextra -pedantic-errors -Wconversion -Wsign-conversion)