@@ -5,9 +5,9 @@ get_filename_component(binroot ${CMAKE_CURRENT_BINARY_DIR}/.. ABSOLUTE)
55
66# Platform detection
77if (APPLE )
8- set (OS "macos" )
8+ set (OS "macos" )
99elseif (UNIX )
10- set (OS "linux" )
10+ set (OS "linux" )
1111endif ()
1212message (STATUS "OS detected: ${OS} " )
1313
@@ -38,28 +38,28 @@ endfunction()
3838
3939# Define shared object setup function
4040function (setup_shared_object_target target )
41- if (APPLE )
42- set_target_properties (${target} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
43- # Force .so extension on macOS instead of .dylib
44- set_target_properties (${target} PROPERTIES SUFFIX ".so" )
45- else ()
46- # We are building a shared library and want to verify that any reference to a symbol within the library will resolve to
47- # the library's own definition, rather than to a definition in another shared library or the main executable.
48- set_target_properties (${target} PROPERTIES LINK_FLAGS "-pthread -shared -Bsymbolic -Bsymbolic-functions" )
49- endif ()
50- set_target_properties (${target} PROPERTIES PREFIX "" )
41+ if (APPLE )
42+ set_target_properties (${target} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
43+ # Force .so extension on macOS instead of .dylib
44+ set_target_properties (${target} PROPERTIES SUFFIX ".so" )
45+ else ()
46+ # We are building a shared library and want to verify that any reference to a symbol within the library will resolve to
47+ # the library's own definition, rather than to a definition in another shared library or the main executable.
48+ set_target_properties (${target} PROPERTIES LINK_FLAGS "-pthread -shared -Bsymbolic -Bsymbolic-functions" )
49+ endif ()
50+ set_target_properties (${target} PROPERTIES PREFIX "" )
5151endfunction ()
5252
5353# Define debug symbols extraction function
5454function (extract_debug_symbols target )
55- if (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" AND NOT APPLE )
56- add_custom_command (TARGET ${target} POST_BUILD
55+ if (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" AND NOT APPLE )
56+ add_custom_command (TARGET ${target} POST_BUILD
5757 COMMAND cp $<TARGET_FILE :${target} > $<TARGET_FILE :${target} >.debug
5858 COMMAND objcopy --add-gnu-debuglink=$<TARGET_FILE:${target}>.debug $<TARGET_FILE :${target} >
5959 COMMAND strip -g $<TARGET_FILE :${target} >
6060 COMMENT "Extracting debug symbols from ${target} "
6161 )
62- endif ()
62+ endif ()
6363endfunction ()
6464
6565#----------------------------------------------------------------------------------------------
@@ -82,12 +82,12 @@ if(NOT DEFINED COORD_TYPE)
8282endif ()
8383
8484if (COORD_TYPE STREQUAL "oss" )
85- set (BINDIR "${binroot} /search-community" )
85+ set (BINDIR "${binroot} /search-community" )
8686elseif (COORD_TYPE STREQUAL "rlec" )
87- set (BINDIR "${binroot} /search-enterprise" )
88- add_compile_definitions (PRIVATE RS_CLUSTER_ENTERPRISE )
87+ set (BINDIR "${binroot} /search-enterprise" )
88+ add_compile_definitions (PRIVATE RS_CLUSTER_ENTERPRISE )
8989else ()
90- message (FATAL_ERROR "Invalid COORD_TYPE (='${COORD_TYPE} '). Should be either 'oss' or 'rlec'" )
90+ message (FATAL_ERROR "Invalid COORD_TYPE (='${COORD_TYPE} '). Should be either 'oss' or 'rlec'" )
9191endif ()
9292
9393#----------------------------------------------------------------------------------------------
@@ -229,6 +229,7 @@ option(VECSIM_BUILD_TESTS "Build vecsim tests" OFF)
229229
230230add_subdirectory (deps/VectorSimilarity )
231231add_subdirectory (src/geometry )
232+ add_subdirectory (src/util/arr )
232233add_subdirectory (src/util/hash )
233234add_subdirectory (src/coord )
234235
@@ -265,6 +266,7 @@ add_library(rscore OBJECT ${SOURCES})
265266
266267set (FINAL_OBJECTS
267268 $<TARGET_OBJECTS :trie >
269+ $<TARGET_OBJECTS :arr >
268270 $<TARGET_OBJECTS :rscore >
269271 $<TARGET_OBJECTS :rmutil >
270272 $<TARGET_OBJECTS :friso >
@@ -289,6 +291,7 @@ target_link_libraries(redisearch
289291 redisearch-hash
290292 VectorSimilarity
291293 redisearch-coord
294+ arr
292295 trie
293296 uv_a
294297 ${BINDIR} /redisearch_rs/libredisearch_rs.a
0 commit comments