merged PingRotate into PingScheduler; fixed save/load of cache to/from file; started...
[pingcheck] / test / CMakeLists.txt
CommitLineData
655ef756
GMF
1# package: find external packages
2include(FindPkgConfig)
3
67016f61
GMF
4# package: required boost libraries
5set(Boost_USE_STATIC_LIBS OFF)
6set(Boost_USE_MULTITHREADED ON)
7set(Boost_USE_STATIC_RUNTIME OFF)
5dfcc527 8find_package(Boost 1.44 COMPONENTS unit_test_framework system program_options REQUIRED)
67016f61
GMF
9include_directories(${Boost_INCLUDE_DIRS})
10link_directories(${Boost_LIBRARY_DIRS})
11
12# package: libi2ncommon
13pkg_check_modules(I2NCOMMON REQUIRED libi2ncommon)
14include_directories(${I2NCOMMON_INCLUDE_DIRS})
15link_directories(${I2NCOMMON_LIBRARY_DIRS})
16
17# compiler: include directories where the source code is located
18include_directories(${CMAKE_SOURCE_DIR}/src)
19
20# compiler: include directories where the source code is located
21include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
22
a72f06b6
GMF
23# cmake: enable ctest
24enable_testing()
67016f61 25
a72f06b6 26# cmake: inclusion of each test case cmake file
5dfcc527 27include(CMakeLists.test_configurationcommandline.txt)
288e39de 28include(CMakeLists.test_configurationfile.txt)
33695392 29include(CMakeLists.test_configurationoptions.txt)
a72f06b6 30include(CMakeLists.test_messagepayload.txt)
c5c55889 31include(CMakeLists.test_pingprotocol.txt)
6c14bbee 32include(CMakeLists.test_hoststatus.txt)
c5db9dfd 33include(CMakeLists.test_linkstatus.txt)
7ca853fe 34include(CMakeLists.test_loglevel.txt)
e3c7d9ac 35include(CMakeLists.test_logoutput.txt)
a72f06b6
GMF
36include(CMakeLists.test_ipv4header.txt)
37include(CMakeLists.test_ipv6header.txt)
38include(CMakeLists.test_icmpv4header.txt)
39include(CMakeLists.test_icmpv6header.txt)
1669ea26 40include(CMakeLists.test_icmppacket.txt)
c41527cd 41include(CMakeLists.test_tcpheader.txt)
26b0f687 42include(CMakeLists.test_dns.txt)
67016f61
GMF
43
44# cmake: add a custom "make check" target which automatically builds the binary
a72f06b6 45add_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)