]> git.stg.codes - stg.git/blob - tests/CMakeLists.txt
2f9283a80df31693673a2ff0504d8d3c53bc5ea8
[stg.git] / tests / CMakeLists.txt
1 set ( CPP_FILES main.cpp
2                 test_conffiles.cpp
3                 test_fee_charge_rules.cpp
4                 test_reconnect_on_tariff_change.cpp
5                 test_disable_session_log.cpp
6                 test_filter_params_log.cpp
7                 ../projects/stargazer/tariff_impl.cpp
8                 ../projects/stargazer/user_impl.cpp
9                 ../projects/stargazer/user_property.cpp )
10
11 set ( THREADS_PREFER_PTHREAD_FLAG ON )
12 find_package ( Threads REQUIRED )
13 find_package ( Boost REQUIRED unit_test_framework )
14
15 add_definitions ( -DBOOST_TEST_DYN_LINK )
16 add_definitions ( -DUSE_ABSTRACT_SETTINGS )
17
18 add_executable ( test_admin_conf test_admin_conf.cpp )
19 target_link_libraries ( test_admin_conf Boost::unit_test_framework )
20 add_test ( admin_conf test_admin_conf )
21
22 add_executable ( test_raw_ip test_raw_ip.cpp )
23 target_link_libraries ( test_raw_ip Boost::unit_test_framework )
24 add_test ( raw_ip test_raw_ip )
25
26 add_executable ( test_bfstream test_bfstream.cpp )
27 target_link_libraries ( test_bfstream crypto Boost::unit_test_framework )
28 add_test ( bfstream test_bfstream )
29
30 add_executable ( test_crypto test_crypto.cpp )
31 target_link_libraries ( test_crypto crypto Boost::unit_test_framework )
32 add_test ( stgcrypto test_crypto )
33
34 add_executable ( test_tariff test_tariff.cpp ../projects/stargazer/tariff_impl.cpp )
35 target_link_libraries ( test_tariff crypto common Boost::unit_test_framework )
36 target_include_directories ( test_tariff PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ../projects/stargazer )
37 add_test ( tariff test_tariff )
38
39 add_executable ( tests ${CPP_FILES} )
40
41 target_link_libraries ( tests conffiles crypto logger scriptexecuter common Threads::Threads )
42
43 target_include_directories ( tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ../projects/stargazer )
44
45 add_test ( tests tests )