Merge branch 'daemon-ext'
[libi2ncommon] / test / CMakeLists.txt
CommitLineData
263b5807
TJ
1include_directories(
2 ${CMAKE_SOURCE_DIR}/configlib
3 ${CMAKE_SOURCE_DIR}/src
4 ${CMAKE_SOURCE_DIR}/utils)
5
6########### next target ###############
7
8SET(cpp_sources
9 ip_range.cpp
10 stringfunc.cpp
11 test_containerfunc.cpp
12 test_cron_interval.cpp
13 test_cron_point.cpp
14 test_filefunc.cpp
15 test_global_config.cpp
8652a3df 16 test_i18n.cpp
263b5807
TJ
17 test_logging.cpp
18 test_pidfile.cpp
09ca2cbf 19 test_restricted_html.cpp
3ed2cc9b 20 test_pipestream.cpp
263b5807
TJ
21 test_timefunc.cpp
22 test_tmpfstream.cpp
4693e3a7 23 test_tribool.cpp
69d568dd 24 test_crypto.cpp
263b5807 25)
652f47a7
TJ
26if (IMAP_UTF7_SUPPORT)
27 SET(cpp_sources stringfunc_imaputf7.cpp ${cpp_sources})
28endif (IMAP_UTF7_SUPPORT)
263b5807
TJ
29
30add_executable(test_i2ncommon ${cpp_sources})
31
32# Add custom "make check" target which automatically builds the library
33add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS test_i2ncommon)
34
35# Invocation via "make test"
36enable_testing()
37add_test(test_i2ncommon test_i2ncommon)
38
39target_link_libraries(test_i2ncommon
40 i2ncommon
41 i2ncommon_utils
42 i2ncommon_config
43 ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES}
44)