forked from hermit-os/hermit-caves
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
50 lines (38 loc) · 1.08 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
cmake_minimum_required(VERSION 3.7)
project(hermit_tools)
include(CheckIncludeFiles)
include(../cmake/HermitCore-Paths.cmake)
option(ENABLE_RDMA_MIGRATION "Migration support via RDMA" OFF)
add_compile_options(-std=c99)
list(APPEND LIBS "-pthread")
set(SRC proxy.c
utils.c
uhyve.c
uhyve-net.c
uhyve-migration.c
uhyve-x86_64.c
uhyve-aarch64.c
uhyve-gdb-x86_64.c
uhyve-gdb-aarch64.c
)
### Optional migration via RDMA
if(ENABLE_RDMA_MIGRATION)
add_definitions(-D__RDMA_MIGRATION__)
list(APPEND LIBS "-libverbs")
set(SRC ${SRC} uhyve-migration-rdma.c)
else()
remove_definitions(-D__RDMA_MIGRATION__)
endif()
check_include_files(asm/msr-index.h HAVE_MSR_INDEX_H)
if(HAVE_MSR_INDEX_H)
add_definitions(-DHAVE_MSR_INDEX_H=1)
endif()
add_executable(proxy ${SRC})
target_compile_options(proxy PUBLIC ${LIBS})
target_compile_options(proxy PUBLIC -DMAX_ARGC_ENVC=${MAX_ARGC_ENVC})
target_link_libraries(proxy ${LIBS})
install(TARGETS proxy
DESTINATION bin)
# Show include files in IDE
file(GLOB_RECURSE TOOLS_INCLUDES "*.h")
add_custom_target(tools_includes_ide SOURCES ${TOOLS_INCLUDES})