summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2014-05-10 14:16:27 -0500
committerAndrew <forkk@forkk.net>2014-05-10 14:16:27 -0500
commit5099964c673cd45e16d443a3b02f51bade303eee (patch)
tree0c3a3c07c28ce51b80f99b67795a3afb19a976a9 /CMakeLists.txt
parent9e80ddb0405ecd5d45d65e5385d0fbd1f3e734e3 (diff)
downloadMultiMC-5099964c673cd45e16d443a3b02f51bade303eee.tar
MultiMC-5099964c673cd45e16d443a3b02f51bade303eee.tar.gz
MultiMC-5099964c673cd45e16d443a3b02f51bade303eee.tar.lz
MultiMC-5099964c673cd45e16d443a3b02f51bade303eee.tar.xz
MultiMC-5099964c673cd45e16d443a3b02f51bade303eee.zip
Implement backtraces on Windows.
Much !!FUN!! was had
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 19b4dc2c..2d25fc6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,12 +81,18 @@ set(CRASH_HANDLER_IMPL "")
message(STATUS "Crash dumps are ${MultiMC_HANDLE_SEGV}")
if (MultiMC_HANDLE_SEGV)
add_definitions(-DHANDLE_SEGV)
+ if (WIN32)
+ find_package(DbgHelp)
+ set(MultiMC_LINK_ADDITIONAL_LIBS "${MultiMC_LINK_ADDITIONAL_LIBS}dbghelp")
+ set(MultiMC_CRASH_HANDLER_EXTRA_H "WinBacktrace.h")
+ set(MultiMC_CRASH_HANDLER_EXTRA_CPP "WinBacktrace.cpp")
+ endif ()
endif ()
-option(MultiMC_TEST_SEGV "Intentionally segfault on startup to test crash handling." OFF)
+option(MultiMC_TEST_SEGV "Intentionally segfault sometimes to test crash handling." OFF)
if (MultiMC_TEST_SEGV)
# TODO: Make this a unit test instead.
- message(WARNING "You have enabled crash handler testing. MULTIMC WILL INTENTIONALLY CRASH ITSELF ON STARTUP.")
+ message(WARNING "You have enabled crash handler testing. MULTIMC WILL INTENTIONALLY CRASH ITSELF. Crashes should occur on exit and when the new instance button is pressed.")
add_definitions(-DTEST_SEGV)
endif ()
@@ -268,6 +274,8 @@ SET(MULTIMC_SOURCES
# Crash handling
HandleCrash.h
HandleCrash.cpp
+ ${MultiMC_CRASH_HANDLER_EXTRA_H} # Extra platform specific stuff
+ ${MultiMC_CRASH_HANDLER_EXTRA_CPP}
# Logging
logger/QsDebugOutput.cpp