mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-12-25 01:11:48 +01:00
common: Only use libbacktrace if present. (#6827)
This commit is contained in:
parent
335fb78c5c
commit
3fedc68230
@ -176,6 +176,9 @@ endif()
|
|||||||
if (CITRA_USE_PRECOMPILED_HEADERS)
|
if (CITRA_USE_PRECOMPILED_HEADERS)
|
||||||
target_precompile_headers(citra_common PRIVATE precompiled_headers.h)
|
target_precompile_headers(citra_common PRIVATE precompiled_headers.h)
|
||||||
endif()
|
endif()
|
||||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
|
||||||
target_link_libraries(citra_common PRIVATE backtrace dl)
|
find_library(BACKTRACE_LIBRARY backtrace)
|
||||||
|
if (BACKTRACE_LIBRARY AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
||||||
|
target_link_libraries(citra_common PRIVATE ${BACKTRACE_LIBRARY} dl)
|
||||||
|
target_compile_definitions(citra_common PRIVATE CITRA_LINUX_GCC_BACKTRACE)
|
||||||
endif()
|
endif()
|
||||||
|
@ -13,12 +13,11 @@
|
|||||||
#define _SH_DENYWR 0
|
#define _SH_DENYWR 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__linux__) && defined(__GNUG__) && !defined(__clang__)
|
#ifdef CITRA_LINUX_GCC_BACKTRACE
|
||||||
#define BOOST_STACKTRACE_USE_BACKTRACE
|
#define BOOST_STACKTRACE_USE_BACKTRACE
|
||||||
#include <boost/stacktrace.hpp>
|
#include <boost/stacktrace.hpp>
|
||||||
#undef BOOST_STACKTRACE_USE_BACKTRACE
|
#undef BOOST_STACKTRACE_USE_BACKTRACE
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#define CITRA_LINUX_GCC_BACKTRACE
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "common/bounded_threadsafe_queue.h"
|
#include "common/bounded_threadsafe_queue.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user