[CMAKE] Silence warnings about unused variables on release builds

This commit is contained in:
Timo Kreuzer 2024-10-19 13:01:24 +03:00
parent a5c5c19bcf
commit c9a99bf63a

View File

@ -142,6 +142,8 @@ endif()
# FIXME: Revisit this to see if we even need these levels
if(CMAKE_BUILD_TYPE STREQUAL "Release")
add_compile_options(-O2 -DNDEBUG=)
add_compile_options(-Wno-unused-variable)
add_compile_options(-Wno-unused-but-set-variable)
else()
if(OPTIMIZE STREQUAL "1")
add_compile_options(-Os)