2 -DDATA_DIR_STRING=\"${CMAKE_BINARY_DIR}/test/data\"
5 # compiler: creates the binaries
6 add_executable(test_icmppacket
7 ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp
8 ${CMAKE_SOURCE_DIR}/src/tools/pcap.cpp
9 ${CMAKE_SOURCE_DIR}/src/host/messagepayload.cpp
10 ${CMAKE_SOURCE_DIR}/src/ip/ipheader.cpp
11 ${CMAKE_SOURCE_DIR}/src/ip/ipv4header.cpp
12 ${CMAKE_SOURCE_DIR}/src/ip/ipv6header.cpp
13 ${CMAKE_SOURCE_DIR}/src/icmp/icmppacket.cpp
14 ${CMAKE_SOURCE_DIR}/src/icmp/icmpheader.cpp
15 ${CMAKE_SOURCE_DIR}/src/icmp/icmpdata.cpp
16 ${CMAKE_SOURCE_DIR}/src/icmp/icmpdata_pingfailreply.cpp
17 ${CMAKE_SOURCE_DIR}/src/icmp/icmpechodata.cpp
18 ${CMAKE_SOURCE_DIR}/src/icmp/icmpdestinationunreachabledata.cpp
19 ${CMAKE_SOURCE_DIR}/src/icmp/icmptimeexceededdata.cpp
20 ${CMAKE_SOURCE_DIR}/src/icmp/icmppacketfactory.cpp
24 set(Boost_USE_STATIC_LIBS OFF)
25 set(Boost_USE_MULTITHREADED OFF)
26 set(Boost_USE_STATIC_RUNTIME OFF)
27 find_package(Boost 1.44 COMPONENTS serialization date_time REQUIRED)
28 include_directories(${Boost_INCLUDE_DIRS})
29 link_directories(${Boost_LIBRARY_DIRS})
31 # linker: link the program against the libraries
32 target_link_libraries(
34 ${I2NCOMMON_LIBRARIES}
38 # cmake: invocation via "make test"
39 add_test(test_icmppacket test_icmppacket)
41 # add data subdir for test data
42 add_subdirectory(data)