[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.
This commit is contained in:
Geoffrey McRae
2026-08-04 00:02:10 +10:00
parent 9025653a24
commit 2bb5c2e8c8

View File

@@ -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