From 98278dc3f6899244cb5b3ffd07dd8c2379dcd4dd Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Fri, 25 Sep 2026 17:54:40 +0200 Subject: [PATCH] Fix CI: disable MSVC warning C5285 for the vendored doctest (#5577) The windows-11-arm runner now ships MSVC 19.51, which reports doctest's forward declaration of std::tuple as C5285 ("cannot declare a specialization for 'std::tuple'"). With /WX this breaks the msvc-arm64 job on develop and on every open pull request. Disable the warning for the test targets, like the other MSVC warnings already disabled there. Signed-off-by: Niels Lohmann --- tests/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7a9bc5471..ea6da107c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -80,7 +80,10 @@ target_compile_options(test_main PUBLIC # std::allocator_traits<...>::construct for the custom-base-class # test's map type past VS2015's limit. The name is only used for # debug info, so truncation does not affect the build. - $<$:/W4;/wd4566;/wd4996;/wd4702;/wd4503> + # Disable warning C5285: cannot declare a specialization for 'std::tuple'; MSVC 19.51 + # reports the forward declarations of standard library + # templates in the vendored doctest.h + $<$:/W4;/wd4566;/wd4996;/wd4702;/wd4503;/wd5285> # https://github.com/nlohmann/json/issues/1114 $<$:/bigobj> $<$:-Wa,-mbig-obj>