From 7a0f3d3e9ef6b022d9efd73625d5c0eba8528785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 9 Jun 2026 07:29:45 -0700 Subject: [PATCH] Suppress MSVC C4875 from GSL headers on newer toolsets The windows-2025 runner image was updated to a VS2026 toolset whose MSVC emits C4875 (a non-string literal argument to [[gsl::suppress]] is deprecated). This warning comes from the GSL headers pulled in transitively via arcana.cpp, not from our code, and the /WX warnings_as_errors builds promote it to an error, breaking every Windows/UWP build repo-wide. Suppress C4875 for MSVC so third-party header deprecations don't fail our builds, mirroring the existing /wd5205 (WinRT) suppression in CMakeExtensions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d830dd88..d0244cbb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,6 +62,14 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) +# C4875 : a non-string literal argument to [[gsl::suppress]] is deprecated. +# This originates inside the GSL headers (pulled in transitively via arcana.cpp), +# not from our code, and surfaces only on newer MSVC toolsets. Suppress it so the +# /WX builds aren't broken by a deprecation we can't fix in third-party headers. +if(MSVC) + add_compile_options(/wd4875) +endif() + # -------------------------------------------------- # Options # --------------------------------------------------