From 8ce1c189f7c9fd24a24f321cc794d51e4b2381cc Mon Sep 17 00:00:00 2001 From: Joseph Busch Date: Wed, 18 Sep 2019 11:37:52 -0500 Subject: [PATCH] Fix VS2019 debug build --- Builds/CMake/RippledCompiler.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Builds/CMake/RippledCompiler.cmake b/Builds/CMake/RippledCompiler.cmake index af96d59da..995b519d7 100644 --- a/Builds/CMake/RippledCompiler.cmake +++ b/Builds/CMake/RippledCompiler.cmake @@ -28,11 +28,16 @@ target_compile_definitions (common if (MSVC) # remove existing exception flag since we set it to -EHa string (REGEX REPLACE "[-/]EH[a-z]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - # also remove dynamic runtime + foreach (var_ CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE) + + # also remove dynamic runtime string (REGEX REPLACE "[-/]MD[d]*" " " ${var_} "${${var_}}") + + # /ZI (Edit & Continue debugging information) is incompatible with Gy- + string (REPLACE "/ZI" "/Zi" ${var_} "${${var_}}") endforeach () target_compile_options (common