Skip to content

Commit 5349251

Browse files
authored
Add _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR when building wheel on windows (#208)
1 parent c89d080 commit 5349251

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ if(BUILD_PYTHON)
7070
if(UNIX)
7171
target_link_libraries(chiavdf PRIVATE -pthread)
7272
endif()
73+
if (WIN32)
74+
# workaround for constexpr mutex constructor change in MSVC 2022
75+
# https://stackoverflow.com/questions/78598141/first-stdmutexlock-crashes-in-application-built-with-latest-visual-studio
76+
target_compile_definitions(chiavdf PUBLIC _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
77+
endif()
7378
endif()
7479

7580
add_executable(verifier_test

0 commit comments

Comments
 (0)