forked from emmericp/MoonGen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
65 lines (55 loc) · 1.88 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(CMAKE_CXX_FLAGS "-fno-stack-protector -Wall -Wextra -Wno-unused-parameter -g -O3 -std=gnu++11 -march=native -msse4.2 -I${CMAKE_CURRENT_SOURCE_DIR}/src")
SET(CMAKE_C_FLAGS "-fno-stack-protector -Wall -Wextra -Wno-unused-parameter -g -O3 -std=gnu11 -march=native -msse4.2")
SET(CMAKE_EXE_LINKER_FLAGS "-rdynamic") # to access functions from luajit
SET(PRJ MoonGen)
SET(FILES
src/main.c
src/memory.c
src/task.c
src/device.c
src/util.c
src/lifecycle.c
src/timestamping.c
src/debug.c
src/bitmask.c
src/distribute.c
src/barrier.cpp
src/task-results.cpp
src/pipe.cpp
src/lock.cpp
src/namespaces.cpp
src/ring.c
src/rate_limiter.cpp
src/kni.c
)
SET(DPDK_LIBS
ethdev rte_distributor rte_kni rte_mbuf rte_pmd_bond rte_pmd_ring rte_power rte_timer
rte_acl rte_eal rte_kvargs rte_mempool rte_pmd_e1000 rte_pmd_virtio rte_ring
rte_cfgfile rte_hash rte_lpm rte_meter rte_pmd_i40e rte_pmd_vmxnet3_uio rte_sched
rte_cmdline rte_ip_frag rte_pipeline rte_pmd_ixgbe rte_port rte_table
)
SET(LUAJIT_LIBS
luajit
)
SET(ALL_LIBS
${LUAJIT_LIBS}
-Wl,--start-group ${DPDK_LIBS} -Wl,--end-group
pthread dl rt
)
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/deps/dpdk/x86_64-native-linuxapp-gcc/include
${CMAKE_CURRENT_SOURCE_DIR}/deps/dpdk/drivers/net/ixgbe/base
${CMAKE_CURRENT_SOURCE_DIR}/deps/dpdk/drivers/net/ixgbe
${CMAKE_CURRENT_SOURCE_DIR}/deps/dpdk/drivers/net/i40e/base
${CMAKE_CURRENT_SOURCE_DIR}/deps/dpdk/drivers/net/i40e
${CMAKE_CURRENT_SOURCE_DIR}/deps/luajit/src
${CMAKE_CURRENT_SOURCE_DIR}/lib
)
LINK_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/deps/dpdk/x86_64-native-linuxapp-gcc/lib
${CMAKE_CURRENT_SOURCE_DIR}/deps/luajit/usr/local/lib/
${CMAKE_CURRENT_SOURCE_DIR}/deps/luajit/src
)
ADD_EXECUTABLE(${PRJ} ${FILES})
TARGET_LINK_LIBRARIES(${PRJ} ${ALL_LIBS})