From 9f439f9229d769f5b0c894e82b3170a7e4dd121c Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Wed, 12 Feb 2025 22:12:24 -0800 Subject: [PATCH] Attempt to fix new broken GCC warnings --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 828acd37..c7b250b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,13 @@ file( lobster/src/tccbind.cpp lobster/external/libtcc/libtcc.c ) + +if(CMAKE_COMPILER_IS_GNUCXX) + # These warnings seem pretty broken in GCC, with lots of false positives. + set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wno-array-bounds -Wno-stringop-overflow -Wno-maybe-uninitialized") +endif() + add_library(lobster STATIC ${lobster_sources}) target_include_directories(lobster PUBLIC lobster/include lobster/src lobster/external/libtcc)