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)