Allow to disable Stacktrace support

Enable backtrace stuff only if GNU C library used, because current
backtrace implementation based  on  <execinfo.h> , which is not a
part of standard C library, it is a GNU extension.

This will be usefull when building  with  custom POSIX-compilant C
library (like musl) and no <execinfo.h> available.

Note: configure script will detect presence of  <execinfo.h>  and
enable/disable feature depending on it.

Feature is enabled by default.
This commit is contained in:
Nick Korotysh
2018-04-09 23:30:20 +03:00
parent 38837db8de
commit 7712d0ada0
9 changed files with 117 additions and 44 deletions

View File

@@ -53,16 +53,16 @@ if (WIN32)
list(APPEND QBT_APP_SOURCES ../qbittorrent.exe.manifest)
endif (WIN32)
if (UNIX)
list(APPEND QBT_APP_HEADERS stacktrace.h)
endif (UNIX)
if (STACKTRACE_WIN)
list(APPEND QBT_APP_HEADERS stacktrace_win.h)
if (GUI)
list(APPEND QBT_APP_HEADERS stacktrace_win_dlg.h)
endif (GUI)
endif (STACKTRACE_WIN)
if (STACKTRACE)
if (UNIX)
list(APPEND QBT_APP_HEADERS stacktrace.h)
else (UNIX)
list(APPEND QBT_APP_HEADERS stacktrace_win.h)
if (GUI)
list(APPEND QBT_APP_HEADERS stacktrace_win_dlg.h)
endif (GUI)
endif (UNIX)
endif (STACKTRACE)
# usesystemqtsingleapplication {
# nogui {