]> git.lyx.org Git - features.git/commitdiff
Amend 4028eefe: Make callstack printing useful and optional
authorKornel Benko <kornel@lyx.org>
Tue, 26 Feb 2019 08:50:58 +0000 (09:50 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 12:39:58 +0000 (14:39 +0200)
Added the option to cmake too

CMakeLists.txt
development/cmake/ConfigureChecks.cmake

index 965f22f3c54427cb0008287e4246193f95223887..e421c535b923aa8136cca2bd7751a26e5c1a9a67 100644 (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_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)
index 0451f2fde711aeacf7e46ff29b36cc84bca82cd2..5550a7352b102a715300b6e416d14c9d1f0af2cf 100644 (file)
@@ -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 <execinfo.h>
        #include <cxxabi.h>
@@ -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(