Skip to content

Commit 8f74704

Browse files
authored
workaround crash in mutex
1 parent d176f65 commit 8f74704

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ endif()
2929

3030
if(MSVC)
3131
add_compile_options(/W4 /bigobj /wd4127)
32+
33+
# NOTE: _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR is temporary. When building on
34+
# VS 2022 17.10 or newer, but using an older runtime, mutexes can crash
35+
add_compile_options(/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
3236
else()
3337
add_compile_options(-Wall -Wextra -pedantic -Wno-psabi)
3438
endif()

0 commit comments

Comments
 (0)