1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00

chore: enable search lib on Apple (#1854)

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2023-09-13 20:08:33 +03:00 committed by GitHub
parent 0d20005528
commit 0ada51c42a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 17 deletions

View file

@ -75,9 +75,9 @@ jobs:
submodules: true
- name: Install dependencies
run: |
brew update && brew install ninja boost openssl automake gcc zstd icu4c bison c-ares \
brew update && brew install ninja boost openssl automake gcc zstd bison c-ares \
autoconf libtool automake
brew info icu4c
# brew info icu4c
mkdir -p $GITHUB_WORKSPACE/build
- name: Configure & Build
@ -88,15 +88,13 @@ jobs:
which gcc
which gcc-13
alias g++=g++-13
alias gcc=gcc-13
bison --version
alias g++
echo "*************************** START BUILDING **************************************"
CC=gcc-13 CXX=g++-13 cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DWITH_UNWIND=OFF \
-DCMAKE_PREFIX_PATH=/usr/local/opt/icu4c
CC=gcc-13 CXX=g++-13 cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DWITH_UNWIND=OFF
ninja ok_backend dfly_core_test dconv_project
ninja search_parser_test
ninja dragonfly
./search_parser_test

View file

@ -65,6 +65,7 @@ add_third_party(
reflex
URL https://github.com/Genivia/RE-flex/archive/refs/tags/v3.3.2.tar.gz
CONFIGURE_COMMAND <SOURCE_DIR>/configure --disable-avx --prefix=${THIRD_PARTY_LIB_DIR}/reflex
CXX=${CMAKE_CXX_COMPILER} CC=${CMAKE_C_COMPILER}
)
set(REFLEX "${THIRD_PARTY_LIB_DIR}/reflex/bin/reflex")
@ -96,14 +97,15 @@ add_third_party(
uni-algo
URL https://github.com/uni-algo/uni-algo/archive/refs/tags/v1.0.0.tar.gz
BUILD_IN_SOURCE 1
CMAKE_PASS_FLAGS "-DCMAKE_CXX_STANDARD:STRING=17"
)
add_third_party(
hnswlib
URL https://github.com/nmslib/hnswlib/archive/refs/tags/v0.7.0.tar.gz
INSTALL_COMMAND cp -RT <SOURCE_DIR>/hnswlib ${THIRD_PARTY_LIB_DIR}/hnswlib/include/hnswlib
BUILD_COMMAND echo SKIP
INSTALL_COMMAND cp -R <SOURCE_DIR>/hnswlib ${THIRD_PARTY_LIB_DIR}/hnswlib/include/
LIB "none"
)

View file

@ -1,8 +1,5 @@
# We have some linking problems with search on Apple
if (NOT APPLE)
add_subdirectory(search)
set(SEARCH_LIB query_parser)
endif()
add_subdirectory(search)
set(SEARCH_LIB query_parser)
add_library(dfly_core compact_object.cc dragonfly_core.cc extent_tree.cc
external_alloc.cc interpreter.cc json_object.cc mi_memory_resource.cc sds_utils.cc

View file

@ -3,8 +3,8 @@ gen_bison(parser)
cur_gen_dir(gen_dir)
add_library(query_parser ast_expr.cc query_driver.cc search.cc indices.cc vector_utils.cc compressed_sorted_set.cc
${gen_dir}/parser.cc ${gen_dir}/lexer.cc)
add_library(query_parser ast_expr.cc query_driver.cc search.cc indices.cc vector_utils.cc
compressed_sorted_set.cc ${gen_dir}/parser.cc ${gen_dir}/lexer.cc)
target_link_libraries(query_parser base absl::strings TRDP::reflex TRDP::uni-algo TRDP::hnswlib)