forked from kvcache-ai/Mooncake
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
53 lines (42 loc) · 1.5 KB
/
CMakeLists.txt
File metadata and controls
53 lines (42 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
cmake_minimum_required(VERSION 3.16)
project(mooncake CXX C)
# indicates cmake is invoked from top-level dir
set(GLOBAL_CONFIG "true")
include(mooncake-common/common.cmake)
# unit test
if (BUILD_UNIT_TESTS)
enable_testing()
endif()
option(WITH_STORE "build mooncake store library and sample code" ON)
option(WITH_P2P_STORE "build p2p store library and sample code" OFF)
option(WITH_RUST_EXAMPLE "build the Rust interface and sample code for the transfer engine" OFF)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extern/pybind11)
set(PYTHON_EXECUTABLE "python3")
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print(sys.path[-1])"
OUTPUT_VARIABLE PYTHON_SYS_PATH
)
string(STRIP ${PYTHON_SYS_PATH} PYTHON_SYS_PATH)
if (USE_ETCD)
add_compile_definitions(USE_ETCD)
if (USE_ETCD_LEGACY)
add_compile_definitions(USE_ETCD_LEGACY)
message(STATUS "etcd as metadata server support is enabled (etcd-cpp-api-v3)")
else()
message(STATUS "etcd as metadata server support is enabled (go package)")
endif()
endif()
add_subdirectory(mooncake-common)
include_directories(mooncake-common/etcd)
add_subdirectory(mooncake-transfer-engine)
include_directories(mooncake-transfer-engine/include)
if (WITH_STORE)
message(STATUS "Mooncake Store will be build")
add_subdirectory(mooncake-store)
include_directories(mooncake-store/include)
endif()
add_subdirectory(mooncake-integration)
if (WITH_P2P_STORE)
add_subdirectory(mooncake-p2p-store)
message(STATUS "P2P Store will be build")
endif()