aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-09-13 14:30:18 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-09-13 14:30:18 +0100
commite60bfeb89f209bf9a30603cbbd8fcc7618fe24a4 (patch)
tree7d2dbc30199753158ddc168ed7c5fc561a4ab8b3 /contrib
parentb61d1893797fdca904168b0bb51a621f0a020059 (diff)
downloadrspamd-e60bfeb89f209bf9a30603cbbd8fcc7618fe24a4.tar.gz
rspamd-e60bfeb89f209bf9a30603cbbd8fcc7618fe24a4.zip
[Minor] Fix linux deps
Diffstat (limited to 'contrib')
-rw-r--r--contrib/backward-cpp/BackwardConfig.cmake15
-rw-r--r--contrib/backward-cpp/CMakeLists.txt53
2 files changed, 11 insertions, 57 deletions
diff --git a/contrib/backward-cpp/BackwardConfig.cmake b/contrib/backward-cpp/BackwardConfig.cmake
index a982adcd6..594f5db68 100644
--- a/contrib/backward-cpp/BackwardConfig.cmake
+++ b/contrib/backward-cpp/BackwardConfig.cmake
@@ -31,15 +31,20 @@ set(STACK_WALKING_BACKTRACE FALSE CACHE BOOL
set(STACK_WALKING_LIBUNWIND FALSE CACHE BOOL
"Use libunwind for stack walking")
-set(STACK_DETAILS_AUTO_DETECT TRUE CACHE BOOL
+set(STACK_DETAILS_AUTO_DETECT FALSE CACHE BOOL
"Auto detect backward's stack details dependencies")
set(STACK_DETAILS_BACKTRACE_SYMBOL FALSE CACHE BOOL
"Use backtrace from (e)glibc for symbols resolution")
set(STACK_DETAILS_DW FALSE CACHE BOOL
"Use libdw to read debug info")
-set(STACK_DETAILS_BFD FALSE CACHE BOOL
- "Use libbfd to read debug info")
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(STACK_DETAILS_BFD TRUE CACHE BOOL
+ "Use libbfd to read debug info")
+else()
+ set(STACK_DETAILS_BFD FALSE CACHE BOOL
+ "Use libbfd to read debug info")
+endif()
set(STACK_DETAILS_DWARF FALSE CACHE BOOL
"Use libdwarf/libelf to read debug info")
@@ -79,7 +84,7 @@ if (STACK_WALKING_LIBUNWIND)
# Disable other unwinders if libunwind is found
set(STACK_WALKING_UNWIND FALSE)
- set(STACK_WALKING_BACKTRACE FALSE)
+ set(STACK_WALKING_BACKTRACE FALSE)
endif()
if (${STACK_DETAILS_AUTO_DETECT})
@@ -241,7 +246,7 @@ if (NOT TARGET Backward::Backward)
)
if(BACKWARD_HAS_EXTERNAL_LIBRARIES)
set_target_properties(Backward::Backward PROPERTIES
- INTERFACE_LINK_LIBRARIES "${BACKWARD_LIBRARIES}"
+ INTERFACE_LINK_LIBRARIES "${BACKWARD_LIBRARIES}"
)
endif()
endif()
diff --git a/contrib/backward-cpp/CMakeLists.txt b/contrib/backward-cpp/CMakeLists.txt
index 97327ccd1..038c50516 100644
--- a/contrib/backward-cpp/CMakeLists.txt
+++ b/contrib/backward-cpp/CMakeLists.txt
@@ -85,55 +85,4 @@ if(BACKWARD_SHARED)
endif()
add_library(backward ${libtype} backward.cpp)
target_compile_definitions(backward PUBLIC ${BACKWARD_DEFINITIONS})
-target_include_directories(backward PUBLIC ${BACKWARD_INCLUDE_DIRS})
-
-###############################################################################
-# TESTS
-###############################################################################
-
-if(BACKWARD_TESTS)
- enable_testing()
-
- add_library(test_main OBJECT test/_test_main.cpp)
-
- macro(backward_add_test src)
- get_filename_component(name ${src} NAME_WE)
- set(test_name "test_${name}")
-
- add_executable(${test_name} ${src} ${ARGN} $<TARGET_OBJECTS:test_main>)
-
- target_link_libraries(${test_name} PRIVATE Backward::Backward)
-
- add_test(NAME ${name} COMMAND ${test_name})
- endmacro()
-
- # Tests without backward.cpp
- set(TESTS
- test
- stacktrace
- rectrace
- select_signals
- )
-
- foreach(test ${TESTS})
- backward_add_test(test/${test}.cpp)
- endforeach()
-
- # Tests with backward.cpp
- set(TESTS
- suicide
- )
-
- foreach(test ${TESTS})
- backward_add_test(test/${test}.cpp ${BACKWARD_ENABLE})
- endforeach()
-endif()
-
-install(
- FILES "backward.hpp"
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
-)
-install(
- FILES "BackwardConfig.cmake"
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/backward
-)
+target_include_directories(backward PUBLIC ${BACKWARD_INCLUDE_DIRS}) \ No newline at end of file