From a9973ac43fb640e5e5104512bc7ebfa604a36f75 Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Thu, 16 Aug 2018 11:39:40 +0200 Subject: [PATCH] Problem: /Z7 debug info is used only for Debug build, but not for RelWitDebInfo build Solution: apply the same commadn for RelWithDebInfo build --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b7ad9188..225e287a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -577,7 +577,9 @@ if (MSVC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP") # Compile the static lib with debug information included + # note: we assume here that the default flags contain some /Z flag string (REGEX REPLACE "/Z." "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + string (REGEX REPLACE "/Z." "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") # Optimization flags. # http://msdn.microsoft.com/en-us/magazine/cc301698.aspx