5 Star 30 Fork 4

anolis / Fuyao

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CMakeLists.txt 1.78 KB
一键复制 编辑 原始数据 按行查看 历史
cmake_minimum_required(VERSION 3.16)
project(Fuyao)
set(CMAKE_CXX_STANDARD 17)
set(BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
# add_compile_options(-D__DEBUG)
add_compile_options(-D__ENABLE_RDMA)
# enable build library
set(PYTHON_LIBRARY_BUILD OFF)
set(CPP_LIBRARY_BUILD ON)
# header
include_directories(${BASE_DIR}/lib)
include_directories(${BASE_DIR}/src)
add_compile_options(-fPIC)
add_compile_options(-fexceptions)
# deps
add_subdirectory(${BASE_DIR}/deps/abseil-cpp abseil)
add_subdirectory(${BASE_DIR}/deps/fmt fmt)
add_subdirectory(${BASE_DIR}/deps/GSL gsl)
add_subdirectory(${BASE_DIR}/deps/json json)
add_subdirectory(${BASE_DIR}/deps/libuv libuv)
add_subdirectory(${BASE_DIR}/deps/nghttp2 nghttp2)
# rdma verbs
set(ENV{PKG_CONFIG_PATH} /usr/lib/x86_64-linux-gnu/pkgconfig)
set(ENV{PKG_CONFIG_EXECUTABLE} /usr/bin/pkg-config)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBIBVERBS REQUIRED IMPORTED_TARGET libibverbs)
# dpu submodule
add_subdirectory(${BASE_DIR}/src/dpu/gateway gateway)
add_subdirectory(${BASE_DIR}/src/dpu/agent agent)
# host submodule
add_subdirectory(${BASE_DIR}/src/host/engine engine)
add_subdirectory(${BASE_DIR}/src/host/launcher launcher)
# cpp runtime library
if (CPP_LIBRARY_BUILD)
set(FUNC_WORKER_CPP_LIBRARIES_NAME worker_cpp)
add_subdirectory(${BASE_DIR}/src/host/worker/cpp/ worker_cpp)
endif ()
# python runtime library
if (PYTHON_LIBRARY_BUILD)
add_subdirectory(${BASE_DIR}/deps/pybind11 pybind11)
# Replace it based on the actual situation
set(PYTHON_INCLUDE_DIR /usr/include/python3.8)
set(LIBRARY_OUTPUT_PATH ${BASE_DIR}/src/host/worker/python/faas)
set(FUNC_WORKER_PYTHON_OUTPUT_NAME _faas_native)
add_subdirectory(${BASE_DIR}/src/host/worker/python/ worker_python)
endif ()
# examples
add_subdirectory(${BASE_DIR}/examples examples)
C++
1
https://gitee.com/anolis/fuyao.git
git@gitee.com:anolis/fuyao.git
anolis
fuyao
Fuyao
master

搜索帮助