From a2e1d7252fe2d02da0f3a0dff1d23ad11525bf18 Mon Sep 17 00:00:00 2001 From: thysson2701 Date: Mon, 22 Jun 2026 12:10:34 +0200 Subject: [PATCH] =?UTF-8?q?fix(build):=20-Wno-maybe-uninitialized=20f?= =?UTF-8?q?=C3=BCr=20GCC=2013+=20(false-positive=20Inlining-Warnings)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e24e296ad41..d14317b432d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -464,6 +464,13 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMP set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=template-id-cdtor" ) endif() + # GCC 13+ produces false-positive -Wmaybe-uninitialized under heavy inlining + # (e.g. ConflictChecker.hpp / Print.cpp). The upstream build does not set + # -Werror globally, but GCC 13 can internally signal exit-code 1 for these. + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13) + add_compile_options(-Wno-maybe-uninitialized) + endif() + endif() if (SLIC3R_ASAN)