added sanitizer, release and debug optimizations and move debug symbols to general flags due to being useful with sanitizer
This commit is contained in:
parent
f20bed8a52
commit
03efa4e723
1 changed files with 5 additions and 2 deletions
|
@ -12,10 +12,13 @@ project(project_name_here
|
|||
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
|
||||
|
||||
# allowances for debugging
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Og")
|
||||
|
||||
# release optimizations
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-O2")
|
||||
|
||||
# generally useful
|
||||
set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wextra -Wfloat-equal -Wundef -Wpointer-arith -Wcast-align -Wstrict-overflow=2 -Wunreachable-code")
|
||||
set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wextra -Wfloat-equal -Wundef -Wpointer-arith -Wcast-align -Wstrict-overflow=2 -Wunreachable-code -fsanitize=address,undefined -g3")
|
||||
# for convenience if they're needed
|
||||
#find_package(Boost REQUIRED)
|
||||
#find_package(fmt REQUIRED)
|
||||
|
|
Loading…
Reference in a new issue