Skip to content

Commit 0abfe25

Browse files
Branimir KaradžićCopilot
andcommitted
Bump GSL to v4.2.2 to fix MSVC C4875 on VS2026 toolset
arcana.cpp pins GSL v4.0.0, whose GSL_SUPPRESS macro expands to a bare identifier [[gsl::suppress(x)]] on MSVC. The VS2026 runner image (_MSC_VER >= 1950) emits C4875 for that form (non-string-literal argument to [[gsl::suppress]] is deprecated), and our /WX builds promote it to an error, breaking every Windows/UWP target. GSL v4.2.2 switches to the string-literal form for _MSC_VER >= 1950, which the new toolset accepts. Override the transitive pin here (FetchContent is first-declaration-wins) so the fixed release is used. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5449381 commit 0abfe25

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ FetchContent_Declare(CMakeExtensions
3232
FetchContent_Declare(googletest
3333
URL "https://github.com/google/googletest/archive/refs/tags/v1.17.0.tar.gz"
3434
EXCLUDE_FROM_ALL)
35+
# Override the GSL version pinned transitively by arcana.cpp (v4.0.0). Declared
36+
# here (FetchContent is first-declaration-wins) so the newer release is used.
37+
# v4.2.2's GSL_SUPPRESS emits a string-literal [[gsl::suppress("...")]] on MSVC
38+
# toolsets >= 19.50 (VS2026), avoiding C4875 which broke the /WX Windows builds.
39+
FetchContent_Declare(GSL
40+
GIT_REPOSITORY https://github.com/microsoft/GSL.git
41+
GIT_TAG v4.2.2
42+
EXCLUDE_FROM_ALL)
3543
FetchContent_Declare(ios-cmake
3644
GIT_REPOSITORY https://github.com/leetal/ios-cmake.git
3745
GIT_TAG 4.4.1

0 commit comments

Comments
 (0)