From ddce2d6e73e10c1acde0ea1135b7a2ea1bc7fc66 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Thu, 5 Sep 2013 11:13:45 +0100 Subject: [PATCH] Enable PDB generation for release builds This does increase the size of the binary but enables debugging of crash dumps from release builds of the updater on Windows. MD-19678 #time 10m --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d75e02..8fbac8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,13 +21,14 @@ if (WIN32) include_directories(external/bzip2) include_directories(external/win32cpp/include) - # Link the updater binary statically with the Visual C++ runtime - # so that the executable can function standalone + # - Link the updater binary statically with the Visual C++ runtime + # so that the executable can function standalone. + # - Enable PDB generation for release builds set(CMAKE_CXX_FLAGS_DEBUG "/MT") set(CMAKE_C_FLAGS_DEBUG "/MT") - set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG") - set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG") + set(CMAKE_CXX_FLAGS_RELEASE "/MT /Zi /O2 /Ob2 /D NDEBUG") + set(CMAKE_C_FLAGS_RELEASE "/MT /Zi /O2 /Ob2 /D NDEBUG") remove_definitions(-DUNICODE -D_UNICODE) else()