From e81fe6021885cb0126dce6eeee159f76cfca4252 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 11 Sep 2024 21:48:29 +0500 Subject: [PATCH] CMakeLists - fix issue on msvc >= 14.40 #5158 --- cmake/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index f77ffaa117..75d7fe5fa6 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -730,6 +730,10 @@ if(MSVC) # endif() add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE) + # See #5158. + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.40) + add_definitions(-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR) + endif() else() add_definitions(-Wall -Wextra)