From 3bbabde96bab6eb8f93872ef14701397d630781d Mon Sep 17 00:00:00 2001 From: jolavillette Date: Sat, 15 Aug 2026 11:49:17 +0200 Subject: [PATCH] ci(windows): stop udp-discovery-cpp being compiled as C++98 c++0x_warning.h:32: error: This file requires compiler and library support for the ISO C++ 2011 standard udp-discovery-cpp asks CMake for C++98, so the sub-build is compiled with -std=gnu++98, and its own sources then include headers that need C++11. The UCRT64 toolchain refuses; the older GCC on the Ubuntu runner lets it through, which is why only Windows stops here. Two reasons it does not happen in the super-project: it carries udp-discovery-cpp as a submodule pinned at f3a3103, so the add_subdirectory branch is taken -- and the FetchContent branch used by a standalone build asks for GIT_TAG "origin/master", the moving tip of a third party project. That is worth reporting on its own: this build follows whatever that repository does today. CMAKE_CXX98_*_COMPILE_OPTION is what CMake emits when a target asks for C++98. Remapping it to gnu++17 leaves every other target untouched, and keeps this out of CMakeLists.txt. --- .github/workflows/windows-cmake.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/windows-cmake.yml b/.github/workflows/windows-cmake.yml index 72d20abfe..f5755f3eb 100644 --- a/.github/workflows/windows-cmake.yml +++ b/.github/workflows/windows-cmake.yml @@ -77,6 +77,8 @@ jobs: -DRS_SQLCIPHER=ON -DRS_BITDHT=ON -DRS_BRODCAST_DISCOVERY=ON -DRS_MINIUPNPC=ON -DRS_FORUM_DEEP_INDEX=OFF + -DCMAKE_CXX98_STANDARD_COMPILE_OPTION=-std=gnu++17 + -DCMAKE_CXX98_EXTENSION_COMPILE_OPTION=-std=gnu++17 -DCMAKE_C_FLAGS="-include string.h -include stdint.h" -DCMAKE_CXX_FLAGS="-include cstring -include cstdint -Wno-template-body"