added log output target UNDEFINED; return if no hosts defined
[pingcheck] / test / CMakeLists.test_dns.txt
CommitLineData
4389b86d
CH
1add_definitions(
2 -DDATA_DIR_STRING=\"${CMAKE_BINARY_DIR}/test/data\"
3)
4
26b0f687
CH
5# compiler: creates the binaries
6add_executable(test_dns
7 ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp
8 ${CMAKE_SOURCE_DIR}/src/host/pinger.cpp
9 ${CMAKE_SOURCE_DIR}/src/dns/hostaddress.cpp
10 ${CMAKE_SOURCE_DIR}/src/dns/timetolive.cpp
11 ${CMAKE_SOURCE_DIR}/src/dns/dnsmaster.cpp
12 ${CMAKE_SOURCE_DIR}/src/dns/dnscache.cpp
13 ${CMAKE_SOURCE_DIR}/src/dns/resolverbase.cpp
14 ${CMAKE_SOURCE_DIR}/src/dns/dnsresolver.cpp
15 test_dns.cpp
16)
17
18set(Boost_USE_STATIC_LIBS OFF)
19set(Boost_USE_MULTITHREADED OFF)
20set(Boost_USE_STATIC_RUNTIME OFF)
21find_package(Boost 1.44 COMPONENTS serialization date_time REQUIRED)
22include_directories(${Boost_INCLUDE_DIRS})
23link_directories(${Boost_LIBRARY_DIRS})
24
25# package: boost-net-dns
26include_directories(${CMAKE_SOURCE_DIR}/lib/boost-net-dns)
27
28# linker: link the program against the libraries
29target_link_libraries(
30 test_dns
31 ${I2NCOMMON_LIBRARIES}
32 ${Boost_LIBRARIES}
33)
34
35# cmake: invocation via "make test"
36add_test(test_dns test_dns)
4389b86d
CH
37
38# add data subdir for test data
a85f210b
CH
39# not necessary since is already added by test_icmppacket
40# and if both add it, we get warnings from cmake
41#add_subdirectory(data)