Skip to content

Commit 1bb6063

Browse files
yuhaijun999rock-git
authored andcommitted
[fix][common] Fix CMakeLists.txt Compilation failure issues.
1 parent 7ccbe3d commit 1bb6063

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,8 @@ if(NOT WITH_DISKANN)
529529
list(REMOVE_ITEM SERVER_SRCS "${PROJECT_SOURCE_DIR}/src/server/diskann_service.cc")
530530
endif()
531531

532+
list(REMOVE_ITEM BR_SRCS "${PROJECT_SOURCE_DIR}/src/br/main.cc")
533+
532534
include(CheckSymbolExists)
533535

534536
macro(detect_target_arch)
@@ -607,12 +609,8 @@ add_library(
607609
${COPROCESSOR_SRCS}
608610
${LIBEXPR_SRCS}
609611
${DISKANN_SRCS}
610-
${MERGE_SRCS})
611-
612-
set(BR_TEST_SRCS ${BR_SRCS})
613-
list(REMOVE_ITEM BR_TEST_SRCS "${PROJECT_SOURCE_DIR}/src/br/main.cc")
614-
615-
add_library(BR_TEST_OBJS OBJECT ${BR_TEST_SRCS})
612+
${MERGE_SRCS}
613+
${BR_SRCS})
616614

617615
if(NOT WITH_DISKANN)
618616
list(REMOVE_ITEM DINGODB_OBJS ${DISKANN_SRCS})
@@ -710,6 +708,7 @@ add_executable(
710708
$<TARGET_OBJECTS:PROTO_OBJS>)
711709
add_executable(
712710
dingodb_br
711+
src/br/main.cc
713712
${BR_SRCS}
714713
src/coordinator/coordinator_interaction.cc
715714
src/common/role.cc

test/unit_test/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ set(UNIT_TEST_LIBS
2727
$<TARGET_OBJECTS:UNIT_TEST_VECTOR_OBJS>
2828
$<TARGET_OBJECTS:UNIT_TEST_MISC_OBJS>
2929
$<TARGET_OBJECTS:UNIT_TEST_DOCUMENT_OBJS>
30-
$<TARGET_OBJECTS:UNIT_TEST_TXN_OBJS>
31-
$<TARGET_OBJECTS:BR_TEST_OBJS>)
30+
$<TARGET_OBJECTS:UNIT_TEST_TXN_OBJS>)
3231

3332
set(UNIT_TEST_LIBS ${UNIT_TEST_LIBS} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES} "-Xlinker \"-(\"" ${BLAS_LIBRARIES}
3433
"-Xlinker \"-)\"")

0 commit comments

Comments
 (0)