Commit | Line | Data |
---|---|---|
655ef756 GMF |
1 | # package: find external packages |
2 | include(FindPkgConfig) | |
3 | ||
67016f61 GMF |
4 | # package: required boost libraries |
5 | set(Boost_USE_STATIC_LIBS OFF) | |
6 | set(Boost_USE_MULTITHREADED ON) | |
7 | set(Boost_USE_STATIC_RUNTIME OFF) | |
e638894d | 8 | find_package(Boost 1.44 COMPONENTS unit_test_framework system program_options date_time serialization REQUIRED) |
67016f61 GMF |
9 | include_directories(${Boost_INCLUDE_DIRS}) |
10 | link_directories(${Boost_LIBRARY_DIRS}) | |
11 | ||
12 | # package: libi2ncommon | |
13 | pkg_check_modules(I2NCOMMON REQUIRED libi2ncommon) | |
14 | include_directories(${I2NCOMMON_INCLUDE_DIRS}) | |
15 | link_directories(${I2NCOMMON_LIBRARY_DIRS}) | |
16 | ||
17 | # compiler: include directories where the source code is located | |
18 | include_directories(${CMAKE_SOURCE_DIR}/src) | |
19 | ||
20 | # compiler: include directories where the source code is located | |
21 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src) | |
22 | ||
a72f06b6 GMF |
23 | # cmake: enable ctest |
24 | enable_testing() | |
67016f61 | 25 | |
a72f06b6 | 26 | # cmake: inclusion of each test case cmake file |
5dfcc527 | 27 | include(CMakeLists.test_configurationcommandline.txt) |
288e39de | 28 | include(CMakeLists.test_configurationfile.txt) |
33695392 | 29 | include(CMakeLists.test_configurationoptions.txt) |
a72f06b6 | 30 | include(CMakeLists.test_messagepayload.txt) |
c5c55889 | 31 | include(CMakeLists.test_pingprotocol.txt) |
6c14bbee | 32 | include(CMakeLists.test_hoststatus.txt) |
c5db9dfd | 33 | include(CMakeLists.test_linkstatus.txt) |
7ca853fe | 34 | include(CMakeLists.test_loglevel.txt) |
e3c7d9ac | 35 | include(CMakeLists.test_logoutput.txt) |
a72f06b6 GMF |
36 | include(CMakeLists.test_ipv4header.txt) |
37 | include(CMakeLists.test_ipv6header.txt) | |
38 | include(CMakeLists.test_icmpv4header.txt) | |
39 | include(CMakeLists.test_icmpv6header.txt) | |
1669ea26 | 40 | include(CMakeLists.test_icmppacket.txt) |
c41527cd | 41 | include(CMakeLists.test_tcpheader.txt) |
26b0f687 | 42 | include(CMakeLists.test_dns.txt) |
67016f61 GMF |
43 | |
44 | # cmake: add a custom "make check" target which automatically builds the binary | |
a72f06b6 | 45 | add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS |
5dfcc527 | 46 | test_configurationcommandline |
33695392 GMF |
47 | test_configurationfile |
48 | test_configurationoptions | |
a72f06b6 | 49 | test_messagepayload |
c5c55889 | 50 | test_pingprotocol |
6c14bbee | 51 | test_hoststatus |
c5db9dfd | 52 | test_linkstatus |
7ca853fe | 53 | test_loglevel |
a72f06b6 GMF |
54 | test_ipv4header |
55 | test_ipv6header | |
56 | test_icmpv4header | |
57 | test_icmpv6header | |
1669ea26 | 58 | test_icmppacket |
7ca853fe | 59 | test_tcpheader |
26b0f687 | 60 | test_dns |
67016f61 | 61 | ) |