Skip to content

Commit

Permalink
[fix][common] Fix CMakeLists.txt Compilation failure issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhaijun999 committed Dec 9, 2024
1 parent 7ccbe3d commit 1bd9c20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
11 changes: 5 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ if(NOT WITH_DISKANN)
list(REMOVE_ITEM SERVER_SRCS "${PROJECT_SOURCE_DIR}/src/server/diskann_service.cc")
endif()

list(REMOVE_ITEM BR_SRCS "${PROJECT_SOURCE_DIR}/src/br/main.cc")

include(CheckSymbolExists)

macro(detect_target_arch)
Expand Down Expand Up @@ -607,12 +609,8 @@ add_library(
${COPROCESSOR_SRCS}
${LIBEXPR_SRCS}
${DISKANN_SRCS}
${MERGE_SRCS})

set(BR_TEST_SRCS ${BR_SRCS})
list(REMOVE_ITEM BR_TEST_SRCS "${PROJECT_SOURCE_DIR}/src/br/main.cc")

add_library(BR_TEST_OBJS OBJECT ${BR_TEST_SRCS})
${MERGE_SRCS}
${BR_SRCS})

if(NOT WITH_DISKANN)
list(REMOVE_ITEM DINGODB_OBJS ${DISKANN_SRCS})
Expand Down Expand Up @@ -710,6 +708,7 @@ add_executable(
$<TARGET_OBJECTS:PROTO_OBJS>)
add_executable(
dingodb_br
src/br/main.cc
${BR_SRCS}
src/coordinator/coordinator_interaction.cc
src/common/role.cc
Expand Down
3 changes: 1 addition & 2 deletions test/unit_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ set(UNIT_TEST_LIBS
$<TARGET_OBJECTS:UNIT_TEST_VECTOR_OBJS>
$<TARGET_OBJECTS:UNIT_TEST_MISC_OBJS>
$<TARGET_OBJECTS:UNIT_TEST_DOCUMENT_OBJS>
$<TARGET_OBJECTS:UNIT_TEST_TXN_OBJS>
$<TARGET_OBJECTS:BR_TEST_OBJS>)
$<TARGET_OBJECTS:UNIT_TEST_TXN_OBJS>)

set(UNIT_TEST_LIBS ${UNIT_TEST_LIBS} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES} "-Xlinker \"-(\"" ${BLAS_LIBRARIES}
"-Xlinker \"-)\"")
Expand Down

0 comments on commit 1bd9c20

Please sign in to comment.