Merge pull request #623 from nadiaholmquist/feature/debug-og

Use -Og for debug builds
This commit is contained in:
Arisotura 2020-05-10 23:47:09 +02:00 committed by GitHub
commit c823b4bfce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)