mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:51:53 +03:00
cmake: add support for libbacktrace, fix two build issues
Also:
- memdebug: fix symbol collision in unity builds.
- memdebug: fix compiler warning by making a variable static.
Follow-up to c77bed81a2 #19657
Closes #19666
This commit is contained in:
parent
039fb84cb4
commit
d03712169b
7 changed files with 80 additions and 4 deletions
|
|
@ -1421,6 +1421,21 @@ if(CURL_USE_GSSAPI)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# libbacktrace
|
||||
option(CURL_USE_LIBBACKTRACE "Use libbacktrace. Requires build with TrackMemory and DWARF debug information." OFF)
|
||||
if(CURL_USE_LIBBACKTRACE)
|
||||
if(NOT ENABLE_CURLDEBUG)
|
||||
message(FATAL_ERROR "libbacktrace requires TrackMemory enabled")
|
||||
endif()
|
||||
if(NOT CMAKE_BUILD_TYPE MATCHES "(Debug|RelWithDebInfo)")
|
||||
message(FATAL_ERROR "libbacktrace requires debug information")
|
||||
endif()
|
||||
find_package(Libbacktrace REQUIRED)
|
||||
list(APPEND CURL_LIBS ${LIBBACKTRACE_LIBRARIES})
|
||||
include_directories(SYSTEM ${LIBBACKTRACE_INCLUDE_DIRS})
|
||||
set(USE_BACKTRACE ON)
|
||||
endif()
|
||||
|
||||
# libuv
|
||||
option(CURL_USE_LIBUV "Use libuv for event-based tests" OFF)
|
||||
if(CURL_USE_LIBUV)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue