forked from rigtorp/udpreplay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
29 lines (17 loc) · 976 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
cmake_minimum_required(VERSION 3.2)
project(udpreplay CXX)
set(CMAKE_CXX_STANDARD 11)
add_executable(udpreplay src/udpreplay.cpp src/recvfromto.cpp
src/network.cpp src/pcap_save.cpp)
target_compile_options(udpreplay PRIVATE -Wall -Wextra -Wpedantic -Werror)
target_link_libraries(udpreplay pcap)
install(TARGETS udpreplay DESTINATION bin/)
enable_testing()
add_test(constant-interval ${CMAKE_SOURCE_DIR}/test/constant-interval.expect -f)
add_test(constant-interval-ge1 ${CMAKE_SOURCE_DIR}/test/constant-interval-ge1.expect -f)
add_test(constant-interval-ge2 ${CMAKE_SOURCE_DIR}/test/constant-interval-ge2.expect -f)
add_test(high-speed ${CMAKE_SOURCE_DIR}/test/high-speed.expect -f)
add_test(low-speed ${CMAKE_SOURCE_DIR}/test/low-speed.expect -f)
add_test(normal-speed ${CMAKE_SOURCE_DIR}/test/normal-speed.expect -f)
add_test(concurrent/basic ${CMAKE_SOURCE_DIR}/test/concurrent/basic.sh)
set_target_properties(udpreplay PROPERTIES COMPILE_FLAGS "-O0 -g3")