From e1ebc615628aa30ea2be059704ffe192eb239ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kok?= Date: Fri, 9 Jan 2026 18:15:53 +0000 Subject: [PATCH 1/2] Fix: Add _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR for compatibility with older MSVC runtimes. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ac6178fb3..1fbe1a42dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,6 +199,9 @@ if (MSVC) $<$:/MD> ) endif() + + # Disable constexpr mutex constructor to fix crashes on older vcruntimes. + add_compile_definitions(_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR) endif() # Set variables that are used by download_external_sources. From 44ebf18f0c1b44d020cae8273e5f648de8695220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kok?= Date: Fri, 9 Jan 2026 19:15:35 +0000 Subject: [PATCH 2/2] Document the issue reference as suggested by Gemini Code assist. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1fbe1a42dd..dc86d7dc0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,8 +199,8 @@ if (MSVC) $<$:/MD> ) endif() - # Disable constexpr mutex constructor to fix crashes on older vcruntimes. + # See: https://github.com/microsoft/STL/issues/4730 add_compile_definitions(_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR) endif()