diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-09-05 14:43:24 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-09-05 14:43:24 +0100 |
commit | 96db4ae5cefb95d0b59eef88e358975767899785 (patch) | |
tree | 5cf01c50e675d684ae7a0543725407f297564c10 /CMakeLists.txt | |
parent | 07fe44a24fc89ab726e359a1b0895cafaecef611 (diff) | |
download | rspamd-96db4ae5cefb95d0b59eef88e358975767899785.tar.gz rspamd-96db4ae5cefb95d0b59eef88e358975767899785.zip |
[Minor] Support `backtrace` where libunwind is not supported
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index efda209ca..58839fbf9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,6 +210,8 @@ IF (ENABLE_LIBUNWIND MATCHES "ON") ProcessPackage(LIBUNWIND LIBRARY unwind INCLUDE libunwind.h INCLUDE_SUFFIXES include/libunwind ROOT ${LIBUNWIND_ROOT_DIR} MODULES libunwind) SET(WITH_LIBUNWIND "1") +ELSE () + CHECK_SYMBOL_EXISTS(backtrace "execinfo.h" HAVE_BACKTRACE) ENDIF () ProcessPackage(GLIB2 LIBRARY glib-2.0 INCLUDE glib.h @@ -777,7 +779,7 @@ IF (NOT DEBIAN_BUILD) ADD_CUSTOM_TARGET(check DEPENDS rspamd-test-cxx rspamd-test) ADD_CUSTOM_TARGET(run-test DEPENDS check COMMAND test/rspamd-test-cxx - COMMAND sh -c 'LUA_PATH="${CMAKE_SOURCE_DIR}/lualib/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/init.lua\;${CMAKE_SOURCE_DIR}/contrib/lua-?/?.lua" + COMMAND sh -c 'LUA_PATH= "${CMAKE_SOURCE_DIR}/lualib/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/init.lua\;${CMAKE_SOURCE_DIR}/contrib/lua-?/?.lua" test/rspamd-test -p /rspamd/lua') ENDIF (NOT DEBIAN_BUILD) |