Skip to content

Commit 970d951

Browse files
branch-4.1: [refactor](snapshot) Allow overriding snapshot manager factory source #66923 (#66974)
Cherry-picked from #66923 Co-authored-by: Luwei <814383175@qq.com>
1 parent f320323 commit 970d951

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

cloud/src/snapshot/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,10 @@
1818
set(LIBRARY_OUTPUT_PATH "${BUILD_DIR}/src/snapshot")
1919
set(EXECUTABLE_OUTPUT_PATH "${BUILD_DIR}/src/snapshot")
2020
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lfdb_c -L${THIRDPARTY_DIR}/lib")
21-
add_library(Snapshot snapshot_manager.cpp snapshot_manager_factory.cpp)
21+
22+
# Extension modules may replace the factory while reusing the public SnapshotManager API.
23+
if (NOT DORIS_CLOUD_SNAPSHOT_MANAGER_FACTORY_SOURCE)
24+
set(DORIS_CLOUD_SNAPSHOT_MANAGER_FACTORY_SOURCE snapshot_manager_factory.cpp)
25+
endif()
26+
27+
add_library(Snapshot snapshot_manager.cpp ${DORIS_CLOUD_SNAPSHOT_MANAGER_FACTORY_SOURCE})

0 commit comments

Comments
 (0)