Commit | Line | Data |
---|---|---|
4389b86d CH |
1 | add_definitions( |
2 | -DDATA_DIR_STRING=\"${CMAKE_BINARY_DIR}/test/data\" | |
3 | ) | |
4 | ||
26b0f687 CH |
5 | # compiler: creates the binaries |
6 | add_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 | |
8f00b3df | 11 | ${CMAKE_SOURCE_DIR}/src/dns/dnsipprotocol.cpp |
26b0f687 CH |
12 | ${CMAKE_SOURCE_DIR}/src/dns/dnsmaster.cpp |
13 | ${CMAKE_SOURCE_DIR}/src/dns/dnscache.cpp | |
14 | ${CMAKE_SOURCE_DIR}/src/dns/resolverbase.cpp | |
15 | ${CMAKE_SOURCE_DIR}/src/dns/dnsresolver.cpp | |
16 | test_dns.cpp | |
17 | ) | |
18 | ||
19 | set(Boost_USE_STATIC_LIBS OFF) | |
20 | set(Boost_USE_MULTITHREADED OFF) | |
21 | set(Boost_USE_STATIC_RUNTIME OFF) | |
22 | find_package(Boost 1.44 COMPONENTS serialization date_time REQUIRED) | |
23 | include_directories(${Boost_INCLUDE_DIRS}) | |
24 | link_directories(${Boost_LIBRARY_DIRS}) | |
25 | ||
26 | # package: boost-net-dns | |
27 | include_directories(${CMAKE_SOURCE_DIR}/lib/boost-net-dns) | |
28 | ||
29 | # linker: link the program against the libraries | |
30 | target_link_libraries( | |
31 | test_dns | |
32 | ${I2NCOMMON_LIBRARIES} | |
33 | ${Boost_LIBRARIES} | |
34 | ) | |
35 | ||
36 | # cmake: invocation via "make test" | |
37 | add_test(test_dns test_dns) | |
4389b86d CH |
38 | |
39 | # add data subdir for test data | |
a85f210b CH |
40 | # not necessary since is already added by test_icmppacket |
41 | # and if both add it, we get warnings from cmake | |
42 | #add_subdirectory(data) |