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
This commit is contained in:
Robert Knight 2013-09-05 11:13:45 +01:00
parent 7335ee3eac
commit ddce2d6e73

View file

@ -21,13 +21,14 @@ if (WIN32)
include_directories(external/bzip2) include_directories(external/bzip2)
include_directories(external/win32cpp/include) include_directories(external/win32cpp/include)
# Link the updater binary statically with the Visual C++ runtime # - Link the updater binary statically with the Visual C++ runtime
# so that the executable can function standalone # so that the executable can function standalone.
# - Enable PDB generation for release builds
set(CMAKE_CXX_FLAGS_DEBUG "/MT") set(CMAKE_CXX_FLAGS_DEBUG "/MT")
set(CMAKE_C_FLAGS_DEBUG "/MT") set(CMAKE_C_FLAGS_DEBUG "/MT")
set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG") set(CMAKE_CXX_FLAGS_RELEASE "/MT /Zi /O2 /Ob2 /D NDEBUG")
set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG") set(CMAKE_C_FLAGS_RELEASE "/MT /Zi /O2 /Ob2 /D NDEBUG")
remove_definitions(-DUNICODE -D_UNICODE) remove_definitions(-DUNICODE -D_UNICODE)
else() else()