From c9a99bf63a1f6869958f8a308541b336cc4027b6 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 19 Oct 2024 13:01:24 +0300 Subject: [PATCH] [CMAKE] Silence warnings about unused variables on release builds --- sdk/cmake/gcc.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake index dd8753ba060..860594ef38d 100644 --- a/sdk/cmake/gcc.cmake +++ b/sdk/cmake/gcc.cmake @@ -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)