Merge pull request #62196 from ClickHouse/use_clickhouse_threads_nuraft

Use ClickHouse threads in NuRaft
This commit is contained in:
alesapin 2024-04-05 14:56:00 +02:00 committed by GitHub
commit be6cb00d06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

2
contrib/NuRaft vendored

@ -1 +1 @@
Subproject commit 08ac76ea80a37f89b12109c805eafe9f1dc9b991
Subproject commit cb5dc3c906e80f253e9ce9535807caef827cc2e0

View File

@ -51,6 +51,12 @@ else()
target_compile_definitions(_nuraft PRIVATE USE_BOOST_ASIO=1 BOOST_ASIO_STANDALONE=1)
endif()
target_link_libraries (_nuraft PRIVATE clickhouse_common_io)
# We must have it PUBLIC here because some headers which depend on it directly
# included in clickhouse
target_compile_definitions(_nuraft PUBLIC USE_CLICKHOUSE_THREADS=1)
MESSAGE(STATUS "Will use clickhouse threads for NuRaft")
target_include_directories (_nuraft SYSTEM PRIVATE "${LIBRARY_DIR}/include/libnuraft")
# for some reason include "asio.h" directly without "boost/" prefix.
target_include_directories (_nuraft SYSTEM PRIVATE "${ClickHouse_SOURCE_DIR}/contrib/boost/boost")