diff --git a/CMakeLists.txt b/CMakeLists.txt index 965f22f3c5..e421c535b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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_QT "Use Qt version as frontend" AUTO QT4 QT5) #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_ICONV "OFF := Build 3rdparty lib iconvlib" ON ALL) LYX_OPTION(EXTERNAL_HUNSPELL "OFF := Build 3rdparty lib hunspelllib" ON ALL) diff --git a/development/cmake/ConfigureChecks.cmake b/development/cmake/ConfigureChecks.cmake index 0451f2fde7..5550a7352b 100644 --- a/development/cmake/ConfigureChecks.cmake +++ b/development/cmake/ConfigureChecks.cmake @@ -153,7 +153,10 @@ check_cxx_source_compiles( " 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 #include @@ -165,7 +168,8 @@ check_cxx_source_compiles( abi::__cxa_demangle(\"abcd\", 0, 0, &status); } " -LYX_CALLSTACK_PRINTING) + LYX_CALLSTACK_PRINTING) +endif() # Check whether STL is libstdc++ check_cxx_source_compiles(