Use -Og for debug builds

This commit is contained in:
Nadia Holmquist Pedersen 2020-05-10 23:45:59 +02:00
parent a7a286371a
commit b341514a22
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,10 @@ else()
option(ENABLE_LTO "Enable link-time optimization" OFF)
endif()
if (CMAKE_BUILD_TYPE STREQUAL Debug)
add_compile_options(-Og)
endif()
if(ENABLE_LTO)
add_compile_options(-O3 -flto)
add_link_options(-flto)