2024-08-08 20:54:29 +00:00
|
|
|
if (NOT ENABLE_LIBFIU)
|
|
|
|
message (STATUS "Not using libfiu")
|
2023-05-01 22:05:36 +00:00
|
|
|
return ()
|
|
|
|
endif ()
|
|
|
|
|
2024-08-08 20:54:29 +00:00
|
|
|
set(LIBFIU_DIR "${ClickHouse_SOURCE_DIR}/contrib/libfiu/")
|
2023-04-25 20:07:04 +00:00
|
|
|
|
2024-08-08 20:54:29 +00:00
|
|
|
set(LIBFIU_SOURCES
|
|
|
|
${LIBFIU_DIR}/libfiu/fiu.c
|
|
|
|
${LIBFIU_DIR}/libfiu/fiu-rc.c
|
|
|
|
${LIBFIU_DIR}/libfiu/backtrace.c
|
|
|
|
${LIBFIU_DIR}/libfiu/wtable.c
|
2023-04-25 20:07:04 +00:00
|
|
|
)
|
|
|
|
|
2024-08-08 20:54:29 +00:00
|
|
|
set(LIBFIU_HEADERS "${LIBFIU_DIR}/libfiu")
|
2023-04-25 20:07:04 +00:00
|
|
|
|
2024-08-08 20:54:29 +00:00
|
|
|
add_library(_libfiu ${LIBFIU_SOURCES})
|
|
|
|
target_compile_definitions(_libfiu PUBLIC DUMMY_BACKTRACE)
|
|
|
|
target_compile_definitions(_libfiu PUBLIC FIU_ENABLE)
|
|
|
|
target_include_directories(_libfiu PUBLIC ${LIBFIU_HEADERS})
|
|
|
|
add_library(ch_contrib::libfiu ALIAS _libfiu)
|