From cdb6287d895ab020723f9e1ff1b636b446c08620 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Wed, 29 Jul 2020 10:39:58 +0200 Subject: [PATCH] Fixed crash in RelWithDbgInfo MSVC build Same problem as in https://github.com/xmrig/xmrig/pull/1784 , fixed with compiler flags this time. --- cmake/flags.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/flags.cmake b/cmake/flags.cmake index d2bc70d05..7c2c79b8d 100644 --- a/cmake/flags.cmake +++ b/cmake/flags.cmake @@ -60,6 +60,9 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC) set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Oi /DNDEBUG /GL") set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Oi /DNDEBUG /GL") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "/Ob1 /GL") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Ob1 /GL") + add_definitions(/D_CRT_SECURE_NO_WARNINGS) add_definitions(/D_CRT_NONSTDC_NO_WARNINGS) add_definitions(/DNOMINMAX)