MSVC's <stdatomic.h> rejects compilation with #error "C atomic support
is not enabled" unless built with /std:c11+ AND /experimental:c11atomics.
The DeuceSSH sub-build sets both, but the SyncTERM target itself never
did, so bbslist.c/conn.c/etc. failed in CI as soon as conn.h pulled in <stdatomic.h>.
Set C_STANDARD 17 on the syncterm target and pass /experimental:c11atomics under MSVC. Bump cmake_minimum_required to 3.22 Ä C_STANDARD 17 was
added in 3.21, and 3.5 was already tripping a deprecation warning under
the CI's CMake 3.31.
The per-source -std=c++20 flag is GCC/Clang syntax; MSVC silently
ignored it (D9002 warning) and then errored on Botan 3's C++20
requirement. Switch to the target's CXX_STANDARD property so CMake
emits the right flag for each compiler (/std:c++20 for MSVC).
Set unconditionally on the syncterm target Ä harmless when no .cpp
sources are present (OpenSSL / none crypto backends).
Botan 3.x's MSVC build produces botan-3.lib (matching libbotan-3.a on
POSIX), not the bare botan.lib our CMakeLists expected. The configure
+ build steps succeeded, then the syncterm link failed with LNK1181
'cannot open input file vendored-botan\lib\botan.lib'.
theme_test inherits WITH_SDL_AUDIO from xpdev, which causes gen_defs.h
to include SDL.h. On Windows, SDL then replaces main with SDL_main,
leaving the CMake-generated console target without the entry point that
the MSVC runtime expects.
Define SDL_MAIN_HANDLED privately for theme_test so SDL leaves its entry
point alone. Verify the target with a Windows cross-build and run the
native SyncTERM test suite.
xmodem_cancel_test and conn_buffer_test inherit WITH_SDL_AUDIO from
xpdev, which causes SDL to remap main on Windows. Define
SDL_MAIN_HANDLED privately so the generated console projects retain the
entry point expected by MSVCRT.
CMake populated the source list before the DeuceSSH configure probe
could force WITHOUT_DEUCESSH on. A failed probe therefore still tried
to compile ssh.c without the DeuceSSH headers or library.
Add ssh.c directly to the target only when DeuceSSH remains enabled
after the probe.
The xpdev usage requirements enable SDL audio, which makes gen_defs.h
include SDL headers. On Windows those headers remap main to SDL_main, but
the standalone ini_crypt_test links as a normal console executable and therefore fails with an unresolved main symbol.
Define SDL_MAIN_HANDLED for this test, as the neighboring non-SDL test
targets already do, so its ordinary main entry point remains intact.