Cmake build: 'callstack printing' detection.

Instead of depending on compiler we try to check for working
API as is done now for automake build too.
This commit is contained in:
Kornel Benko 2014-11-09 12:59:14 +01:00
parent 1643fe5618
commit 07683c1f0d
3 changed files with 17 additions and 4 deletions

View 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)

View 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}

View 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