From ab58210c9da9c5a4a408519fb8a21093876469e5 Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Tue, 30 Sep 2025 20:35:32 -0700 Subject: [PATCH] fix: Address Windows crashes from issue 4641 Fixes #4641 Has something to do with mixing Windows compiler versions, there's a subtle ABI compatibility issue that this sidesteps. Signed-off-by: Larry Gritz --- src/cmake/compiler.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cmake/compiler.cmake b/src/cmake/compiler.cmake index 6dfad31395..3254119677 100644 --- a/src/cmake/compiler.cmake +++ b/src/cmake/compiler.cmake @@ -204,6 +204,8 @@ if (MSVC) add_compile_definitions (_CRT_NONSTDC_NO_WARNINGS) add_compile_definitions (_SCL_SECURE_NO_WARNINGS) add_compile_definitions (JAS_WIN_MSVC_BUILD) + # https://github.com/AcademySoftwareFoundation/OpenImageIO/issues/4641#issuecomment-2725013661 + add_compile_definitions (_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR) endif (MSVC) if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"