From 79dcd5859a8fbe83d6d95b6be0658f6c15de984a Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 9 Aug 2010 19:19:02 +0200 Subject: [PATCH] BuildSystem/Windows: Force creating debug information in Release build if DEBUG is selected in cmake --HG-- branch : trunk --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e8d0375f55..c5d639800f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -219,7 +219,12 @@ if( DEBUG ) add_definitions(-DTRINITY_DEBUG) if(CMAKE_COMPILER_IS_GNUCXX) add_definitions(-g) - endif() + elseif(MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Zi") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG") + endif() else() message("* Build in debug-mode : No (default)") endif()