From 99b215091c6b969581a072ed0c4e8d8ad3fd2dc6 Mon Sep 17 00:00:00 2001 From: Matthias Huerbe Date: Fri, 7 Aug 2026 15:02:00 +0200 Subject: [PATCH 1/2] suppress -Wmissing-field-initializers on GCC/Clang --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca11dbf6..62e4a083 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,6 +103,10 @@ if (ALP_USE_LLVM_LINKER) string(APPEND CMAKE_EXE_LINKER_FLAGS " -fuse-ld=lld") endif() +if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + add_compile_options(-Wno-missing-field-initializers) +endif() + # Disable Qt debug output in release builds if(CMAKE_BUILD_TYPE STREQUAL "Release") add_compile_definitions(QT_NO_DEBUG_OUTPUT) From c1409430fb14e269c789654ab06fd0ff494da526 Mon Sep 17 00:00:00 2001 From: Matthias Huerbe Date: Sat, 8 Aug 2026 00:00:47 +0200 Subject: [PATCH 2/2] moved Wno-missing-field-initializers to nucleus CMakeLists.txt --- CMakeLists.txt | 4 ---- nucleus/CMakeLists.txt | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62e4a083..ca11dbf6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,10 +103,6 @@ if (ALP_USE_LLVM_LINKER) string(APPEND CMAKE_EXE_LINKER_FLAGS " -fuse-ld=lld") endif() -if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") - add_compile_options(-Wno-missing-field-initializers) -endif() - # Disable Qt debug output in release builds if(CMAKE_BUILD_TYPE STREQUAL "Release") add_compile_definitions(QT_NO_DEBUG_OUTPUT) diff --git a/nucleus/CMakeLists.txt b/nucleus/CMakeLists.txt index de298cac..0ea915fa 100644 --- a/nucleus/CMakeLists.txt +++ b/nucleus/CMakeLists.txt @@ -208,4 +208,6 @@ else() # imgui does not compile with -Werror. so we have to make it private for now. # better solutions welcome target_compile_options(nucleus PRIVATE -Wall -Wextra -pedantic -Werror) + # PUBLIC so every target linking nucleus inherits the suppression + target_compile_options(nucleus PUBLIC -Wno-missing-field-initializers) endif()