From d7e8375fc5f6776e412ac8c5749c1e6c81485312 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Fri, 28 Jul 2023 16:32:04 +0200 Subject: [PATCH] CMake: disable -Wmaybe-uninitialized for GCC builds This is very noisy with lots of false positives, especially in newer version of GCC. So for now disable this. Signed-off-by: Frank Lichtenheld --- cmake/findcoredeps.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/findcoredeps.cmake b/cmake/findcoredeps.cmake index 3d03a8c8..f1ee86b7 100644 --- a/cmake/findcoredeps.cmake +++ b/cmake/findcoredeps.cmake @@ -127,6 +127,10 @@ function(add_core_dependencies target) # target_compile_options(${target} PRIVATE /W4) else() target_compile_options(${target} PRIVATE -Wall -Wsign-compare) + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + # disable noisy warnings + target_compile_options(${target} PRIVATE -Wno-maybe-uninitialized) + endif() endif() endfunction()