From b42e385cc97d437831b5bc9a1cd89060d326d80f Mon Sep 17 00:00:00 2001 From: integrator Date: Wed, 15 Jul 2026 00:37:48 +0400 Subject: [PATCH] =?UTF-8?q?cmake:=20set=20/EHsc=20for=20MSVC=20=E2=80=94?= =?UTF-8?q?=20fixes=20boost::throw=5Fexception=20LNK2019=20(all=20Windows?= =?UTF-8?q?=20builds)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pinned Conan windows-msvc.profile (#702) does not carry an exception flag, and Conan's toolchain does not guarantee CMake's default /EHsc. Without it, MSVC compiles with exceptions disabled (warning C4530), so Boost's inline boost::throw_exception (pulled in by asio/log/signals2) becomes an unresolved external -> LNK2019/LNK1120. This failed the CI boost_sentinel gate first, so ALL FIVE coins' Windows x86_64 release cells died before their own build ran. Set /EHsc globally for MSVC so every target (coin binaries + boost_sentinel) compiles with unwind semantics. Linux/macOS unaffected. Restores Windows packaging for ltc/btc/dgb/dash/bch. --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 43ee38eab..383ea4bd4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,12 @@ endif() if(MSVC) # Suppress common MSVC warnings for POSIX names and unsafe CRT functions add_compile_definitions(_CRT_SECURE_NO_WARNINGS _WINSOCK_DEPRECATED_NO_WARNINGS) + # Enable C++ unwind semantics (/EHsc). Boost headers (asio, log, signals2) + # reference the inline boost::throw_exception, which links as an unresolved + # external (LNK2019) unless exceptions are enabled. The pinned Conan MSVC + # toolchain does not guarantee CMake's default /EHsc, so set it explicitly + # for every MSVC target — the coin binaries and the CI boost_sentinel alike. + add_compile_options(/EHsc) endif() # Handle CMake 3.30+ policy for FindBoost removal