Amend 4028eefe: Make callstack printing useful and optional

Added the option to cmake too
This commit is contained in:
Kornel Benko 2019-02-26 09:50:58 +01:00
parent 5b959033d2
commit 016c7d6260
2 changed files with 7 additions and 2 deletions

View File

@ -143,6 +143,7 @@ LYX_OPTION(ASAN "Use address sanitizer" OFF ALL)
LYX_COMBO(USE_FILEDIALOG "Use native or QT file dialog" QT NATIVE) LYX_COMBO(USE_FILEDIALOG "Use native or QT file dialog" QT NATIVE)
LYX_COMBO(USE_QT "Use Qt version as frontend" AUTO QT4 QT5) LYX_COMBO(USE_QT "Use Qt version as frontend" AUTO QT4 QT5)
#LYX_OPTION(3RDPARTY_BUILD "Build 3rdparty libs" OFF ALL) #LYX_OPTION(3RDPARTY_BUILD "Build 3rdparty libs" OFF ALL)
LYX_OPTION(DISABLE_CALLSTACK_PRINTING "do not print a callstack when crashing" OFF ALL)
LYX_OPTION(EXTERNAL_Z "OFF := Build 3rdparty lib zlib" ON ALL) LYX_OPTION(EXTERNAL_Z "OFF := Build 3rdparty lib zlib" ON ALL)
LYX_OPTION(EXTERNAL_ICONV "OFF := Build 3rdparty lib iconvlib" ON ALL) LYX_OPTION(EXTERNAL_ICONV "OFF := Build 3rdparty lib iconvlib" ON ALL)
LYX_OPTION(EXTERNAL_HUNSPELL "OFF := Build 3rdparty lib hunspelllib" ON ALL) LYX_OPTION(EXTERNAL_HUNSPELL "OFF := Build 3rdparty lib hunspelllib" ON ALL)

View File

@ -153,7 +153,10 @@ check_cxx_source_compiles(
" "
SIZEOF_LONG_LONG_GREATER_THAN_SIZEOF_LONG) SIZEOF_LONG_LONG_GREATER_THAN_SIZEOF_LONG)
check_cxx_source_compiles( if(LYX_DISABLE_CALLSTACK_PRINTING)
set(LYX_CALLSTACK_PRINTING OFF CACHE BOOL "Print callstack when crashing")
else()
check_cxx_source_compiles(
" "
#include <execinfo.h> #include <execinfo.h>
#include <cxxabi.h> #include <cxxabi.h>
@ -165,7 +168,8 @@ check_cxx_source_compiles(
abi::__cxa_demangle(\"abcd\", 0, 0, &status); abi::__cxa_demangle(\"abcd\", 0, 0, &status);
} }
" "
LYX_CALLSTACK_PRINTING) LYX_CALLSTACK_PRINTING)
endif()
# Check whether STL is libstdc++ # Check whether STL is libstdc++
check_cxx_source_compiles( check_cxx_source_compiles(