2019-10-05 19:25:31 +00:00
|
|
|
option (USE_UNWIND "Enable libunwind (better stacktraces)" ${ENABLE_LIBRARIES})
|
2017-06-23 14:41:07 +00:00
|
|
|
|
2019-08-28 20:49:37 +00:00
|
|
|
if (NOT CMAKE_SYSTEM MATCHES "Linux" OR ARCH_ARM OR ARCH_32)
|
|
|
|
set (USE_UNWIND OFF)
|
2017-06-23 14:41:07 +00:00
|
|
|
endif ()
|
|
|
|
|
2019-08-28 20:49:37 +00:00
|
|
|
if (USE_UNWIND)
|
|
|
|
add_subdirectory(contrib/libunwind-cmake)
|
|
|
|
set (UNWIND_LIBRARIES unwind)
|
|
|
|
set (EXCEPTION_HANDLING_LIBRARY ${UNWIND_LIBRARIES})
|
2017-06-23 14:41:07 +00:00
|
|
|
|
2019-08-28 20:49:37 +00:00
|
|
|
message (STATUS "Using libunwind: ${UNWIND_LIBRARIES}")
|
|
|
|
else ()
|
|
|
|
set (EXCEPTION_HANDLING_LIBRARY gcc_eh)
|
2017-09-21 20:55:20 +00:00
|
|
|
endif ()
|
|
|
|
|
2019-08-28 20:49:37 +00:00
|
|
|
message (STATUS "Using exception handler: ${EXCEPTION_HANDLING_LIBRARY}")
|