add exception handler for windows/linux platforms that will generate backtrace reports when the application crashes

This commit is contained in:
Eduardo Bart
2011-10-31 14:57:14 -02:00
parent ae6cd41819
commit e9d69b7980
4 changed files with 161 additions and 30 deletions

View File

@@ -6,6 +6,7 @@ SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")
OPTION(USE_PCH "Use precompiled header" ON)
OPTION(NO_CONSOLE "Disable console window on Windows" OFF)
OPTION(HANDLE_EXCEPTIONS "Generate crash reports" OFF)
# find needed packages
SET(Boost_USE_STATIC_LIBS ON)
@@ -136,6 +137,10 @@ SET(SOURCES
src/framework/ui/uilayout.cpp
)
IF(HANDLE_EXCEPTIONS)
ADD_DEFINITIONS(-DHANDLE_EXCEPTIONS)
ENDIF(HANDLE_EXCEPTIONS)
IF(WIN32)
SET(SOURCES ${SOURCES} src/framework/platform/win32platform.cpp)
SET(ADDITIONAL_LIBRARIES ws2_32)