]> git.lyx.org Git - features.git/commitdiff
Cmake build: 'callstack printing' detection. biblatex
authorKornel Benko <kornel@lyx.org>
Sun, 9 Nov 2014 11:59:14 +0000 (12:59 +0100)
committerKornel Benko <kornel@lyx.org>
Sun, 9 Nov 2014 11:59:14 +0000 (12:59 +0100)
Instead of depending on compiler we try to check for working
API as is done now for automake build too.

development/cmake/ConfigureChecks.cmake
development/cmake/config.h.cmake
src/support/CMakeLists.txt

index 2bdc605abd4b2c4069d916410eb882af9004af3f..1c0215eecaab76dae6da098eb7d79b1a4a0fc7cf 100644 (file)
@@ -112,6 +112,20 @@ check_cxx_source_compiles(
        "
 SIZEOF_WCHAR_T_IS_4)
 
+check_cxx_source_compiles(
+       "
+       #include <execinfo.h>
+       #include <cxxabi.h>
+       int main() {
+               void* array[200];
+               size_t size = backtrace(array, 200);
+               backtrace_symbols(array, size);
+               int status = 0;
+               abi::__cxa_demangle(\"abcd\", 0, 0, &status);
+       }
+       "
+LYX_CALLSTACK_PRINTING)
+
 if(LYX_USE_QT MATCHES "QT5")
   if (Qt5X11Extras_FOUND)
     get_target_property(_x11extra_prop Qt5::X11Extras IMPORTED_CONFIGURATIONS)
index 3068c10e8e8a81d2cda26b57bebc9b0df233a55b..51d97b1d4b8967a83fd6738dd5068884fb65ea32 100644 (file)
@@ -57,6 +57,9 @@
 #cmakedefine LYX_USE_TR1 1
 #cmakedefine LYX_USE_TR1_REGEX 1
 
+// Define if callstack can be printed
+#cmakedefine LYX_CALLSTACK_PRINTING 1
+
 #cmakedefine Z_PREFIX 1
 
 ${Include_used_spellchecker}
index 4a018e8cce8944396d3874a07133fed8dd1133e6..b0d1c6db202f58ca12a57dadf6b69f42632b195d 100644 (file)
@@ -41,10 +41,6 @@ else()
        set(support_linkback_headers "")
 endif()
 
-if(UNIX AND CMAKE_COMPILER_IS_GNUCC AND NOT APPLE)
-       add_definitions(-DLYX_CALLSTACK_PRINTING)
-endif()
-
 add_subdirectory(tests)
 
 # needed to compile tex2lyx in merged mode