Add NuRaft library (#1678)
This commit is contained in:
parent
a9ef28c68e
commit
6ab4235cc9
@ -294,3 +294,10 @@ set_path_external_library(jemalloc STATIC
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/jemalloc/include/)
|
${CMAKE_CURRENT_SOURCE_DIR}/jemalloc/include/)
|
||||||
|
|
||||||
import_header_library(rangev3 ${CMAKE_CURRENT_SOURCE_DIR}/rangev3/include)
|
import_header_library(rangev3 ${CMAKE_CURRENT_SOURCE_DIR}/rangev3/include)
|
||||||
|
|
||||||
|
# Setup NuRaft
|
||||||
|
import_external_library(nuraft STATIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/nuraft/lib/libnuraft.a
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/nuraft/include/)
|
||||||
|
find_package(OpenSSL REQUIRED)
|
||||||
|
target_link_libraries(nuraft INTERFACE ${OPENSSL_LIBRARIES})
|
||||||
|
@ -126,6 +126,7 @@ declare -A primary_urls=(
|
|||||||
["absl"]="https://$local_cache_host/git/abseil-cpp.git"
|
["absl"]="https://$local_cache_host/git/abseil-cpp.git"
|
||||||
["jemalloc"]="https://$local_cache_host/git/jemalloc.git"
|
["jemalloc"]="https://$local_cache_host/git/jemalloc.git"
|
||||||
["range-v3"]="https://$local_cache_host/git/ericniebler/range-v3.git"
|
["range-v3"]="https://$local_cache_host/git/ericniebler/range-v3.git"
|
||||||
|
["nuraft"]="https://$local_cache_host/git/eBay/NuRaft.git"
|
||||||
)
|
)
|
||||||
|
|
||||||
# The goal of secondary urls is to have links to the "source of truth" of
|
# The goal of secondary urls is to have links to the "source of truth" of
|
||||||
@ -155,6 +156,7 @@ declare -A secondary_urls=(
|
|||||||
["absl"]="https://github.com/abseil/abseil-cpp.git"
|
["absl"]="https://github.com/abseil/abseil-cpp.git"
|
||||||
["jemalloc"]="https://github.com/jemalloc/jemalloc.git"
|
["jemalloc"]="https://github.com/jemalloc/jemalloc.git"
|
||||||
["range-v3"]="https://github.com/ericniebler/range-v3.git"
|
["range-v3"]="https://github.com/ericniebler/range-v3.git"
|
||||||
|
["nuraft"]="https://github.com/eBay/NuRaft.git"
|
||||||
)
|
)
|
||||||
|
|
||||||
# antlr
|
# antlr
|
||||||
@ -277,3 +279,10 @@ popd
|
|||||||
#range-v3 release-0.12.0
|
#range-v3 release-0.12.0
|
||||||
range_v3_ref="release-0.12.0"
|
range_v3_ref="release-0.12.0"
|
||||||
repo_clone_try_double "${primary_urls[range-v3]}" "${secondary_urls[range-v3]}" "rangev3" "$range_v3_ref"
|
repo_clone_try_double "${primary_urls[range-v3]}" "${secondary_urls[range-v3]}" "rangev3" "$range_v3_ref"
|
||||||
|
|
||||||
|
# NuRaft
|
||||||
|
nuraft_tag="v2.1.0"
|
||||||
|
repo_clone_try_double "${primary_urls[nuraft]}" "${secondary_urls[nuraft]}" "nuraft" "$nuraft_tag" true
|
||||||
|
pushd nuraft
|
||||||
|
./prepare.sh
|
||||||
|
popd
|
||||||
|
@ -25,5 +25,5 @@ target_sources(mg-coordination
|
|||||||
target_include_directories(mg-coordination PUBLIC include)
|
target_include_directories(mg-coordination PUBLIC include)
|
||||||
|
|
||||||
target_link_libraries(mg-coordination
|
target_link_libraries(mg-coordination
|
||||||
PUBLIC mg::utils mg::rpc mg::slk mg::io mg::repl_coord_glue lib::rangev3
|
PUBLIC mg::utils mg::rpc mg::slk mg::io mg::repl_coord_glue lib::rangev3 nuraft
|
||||||
)
|
)
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include <range/v3/view.hpp>
|
#include <range/v3/view.hpp>
|
||||||
#include <shared_mutex>
|
#include <shared_mutex>
|
||||||
|
#include "libnuraft/nuraft.hxx"
|
||||||
|
|
||||||
namespace memgraph::coordination {
|
namespace memgraph::coordination {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user