2020-05-27 19:11:04 +00:00
|
|
|
set (SENTRY_LIBRARY "sentry")
|
2020-09-18 13:09:22 +00:00
|
|
|
|
2020-05-27 19:11:04 +00:00
|
|
|
set (SENTRY_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/sentry-native/include")
|
|
|
|
if (NOT EXISTS "${SENTRY_INCLUDE_DIR}/sentry.h")
|
2021-10-17 23:29:04 +00:00
|
|
|
message (WARNING "submodule contrib/sentry-native is missing. to fix try run: \n git submodule update --init")
|
2020-09-18 14:18:59 +00:00
|
|
|
if (USE_SENTRY)
|
2020-08-14 15:44:04 +00:00
|
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal sentry library")
|
|
|
|
endif()
|
2020-05-27 19:11:04 +00:00
|
|
|
return()
|
|
|
|
endif ()
|
|
|
|
|
2020-06-11 12:18:19 +00:00
|
|
|
if (NOT OS_FREEBSD AND NOT SPLIT_SHARED_LIBRARIES AND NOT_UNBUNDLED AND NOT (OS_DARWIN AND COMPILER_CLANG))
|
2020-09-18 14:18:59 +00:00
|
|
|
option (USE_SENTRY "Use Sentry" ${ENABLE_LIBRARIES})
|
2020-06-04 08:57:01 +00:00
|
|
|
set (SENTRY_TRANSPORT "curl" CACHE STRING "")
|
|
|
|
set (SENTRY_BACKEND "none" CACHE STRING "")
|
2020-06-09 17:44:56 +00:00
|
|
|
set (SENTRY_EXPORT_SYMBOLS OFF CACHE BOOL "")
|
2020-06-04 08:57:01 +00:00
|
|
|
set (SENTRY_LINK_PTHREAD OFF CACHE BOOL "")
|
2020-06-10 13:30:12 +00:00
|
|
|
set (SENTRY_PIC OFF CACHE BOOL "")
|
2020-06-10 21:03:13 +00:00
|
|
|
set (BUILD_SHARED_LIBS OFF)
|
2020-09-18 14:18:59 +00:00
|
|
|
message (STATUS "Using sentry=${USE_SENTRY}: ${SENTRY_LIBRARY}")
|
2020-05-27 19:11:04 +00:00
|
|
|
|
2020-06-01 16:49:11 +00:00
|
|
|
include_directories("${SENTRY_INCLUDE_DIR}")
|
2020-09-18 14:18:59 +00:00
|
|
|
elseif (USE_SENTRY)
|
2020-08-14 15:44:04 +00:00
|
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Sentry is not supported in current configuration")
|
2020-06-02 20:50:18 +00:00
|
|
|
endif ()
|