From 2bb5c2e8c8b957b8723559745425f30dfa96b25d Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 4 Aug 2026 00:02:10 +1000 Subject: [PATCH] [client] tolerate generated GUI wrapper warnings Keep warnings fatal for the GUI dependencies except for two known issues in generated wrapper sources: an unused cimgui conversion helper and cimplot's invalid internal FormatSpec conversion. Scope the exceptions to their respective generated translation units so warnings in ImGui, ImPlot, and the remaining wrappers stay fatal. --- repos/gui/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/repos/gui/CMakeLists.txt b/repos/gui/CMakeLists.txt index bc0d73b6..d5c67967 100644 --- a/repos/gui/CMakeLists.txt +++ b/repos/gui/CMakeLists.txt @@ -12,6 +12,18 @@ add_library(lg_gui STATIC cimplot/implot/implot_items.cpp ) +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + target_compile_options(lg_gui PRIVATE "-fno-fast-math") + + set_source_files_properties(cimgui/cimgui.cpp PROPERTIES + COMPILE_FLAGS "-Wno-error=unused-function" + ) + set_source_files_properties(cimplot/cimplot.cpp PROPERTIES + COMPILE_FLAGS + "-Wno-error=array-bounds -Wno-error=unused-function" + ) +endif() + target_compile_definitions(lg_gui PUBLIC IMGUI_DISABLE_OBSOLETE_FUNCTIONS=1 IMGUI_USE_WCHAR32