-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
38 lines (31 loc) · 985 Bytes
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.12)
option(ONHOST "onhost x86_64" OFF)
set(CMAKE_CXX_STANDARD 17)
# set compiler
if(NOT ONHOST)
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
endif()
project(lambda-io)
if(ONHOST)
set(ARCH x86_64)
message(STATUS "Architecture: x86_64")
add_compile_definitions(ARCH_X86_64)
else()
set(ARCH aarch64)
message(STATUS "Architecture: aarch64")
add_compile_definitions(ARCH_AARCH64)
endif()
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/arc)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
add_subdirectory(libbpf)
add_subdirectory(uebpf-rt)
add_subdirectory(ebpf)
# add_subdirectory(kmod) # to compile it, you should use the `Makefile` in the directory.
# add_subdirectory(fs-map)
if(ONHOST)
add_subdirectory(host-eval)
else()
add_subdirectory(nvme-ctl)
endif()