2022-12-20 14:00:46 +08:00
|
|
|
add_library(
|
|
|
|
|
common src/tfe_utils.cpp src/tfe_types.cpp src/tfe_future.cpp src/tfe_http.cpp src/tfe_plugin.cpp
|
|
|
|
|
src/tfe_rpc.cpp src/tfe_cmsg.cpp src/tfe_kafka_logger.cpp src/tfe_resource.cpp src/tfe_scan.cpp
|
2023-04-18 16:03:57 +08:00
|
|
|
src/tfe_pkt_util.cpp src/tfe_tcp_restore.cpp src/raw_socket.cpp src/packet_construct.cpp
|
|
|
|
|
src/tap.cpp src/io_uring.cpp src/intercept_policy.cpp src/tfe_fieldstat.cpp
|
|
|
|
|
src/tfe_addr_tuple4.cpp src/tfe_packet_io.cpp src/tfe_session_table.cpp src/tfe_timestamp.cpp
|
|
|
|
|
src/tfe_acceptor_kni.cpp src/tfe_ctrl_packet.cpp src/tfe_raw_packet.cpp
|
|
|
|
|
src/tfe_mpack.cpp src/mpack.cpp src/tfe_tap_rss.cpp src/tfe_metrics.cpp)
|
2018-08-21 16:11:50 +08:00
|
|
|
target_include_directories(common PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
|
2023-04-18 16:03:57 +08:00
|
|
|
target_include_directories(common PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../platform/include/internal)
|
2021-09-13 16:39:42 +08:00
|
|
|
target_link_libraries(common PUBLIC libevent-static libevent-static-openssl libevent-static-pthreads rdkafka)
|
2023-04-18 16:03:57 +08:00
|
|
|
target_link_libraries(common PUBLIC MESA_handle_logger cjson msgpack)
|
2023-04-24 10:48:40 +08:00
|
|
|
target_link_libraries(common PUBLIC pthread)
|
2018-09-20 15:42:05 +08:00
|
|
|
|
2023-04-21 17:57:23 +08:00
|
|
|
if (SUPPORT_LIBURING)
|
|
|
|
|
target_link_libraries(common PUBLIC uring)
|
|
|
|
|
endif()
|
|
|
|
|
|
2018-09-20 15:42:05 +08:00
|
|
|
### UNITTEST CASE
|
2018-10-21 20:34:39 +08:00
|
|
|
add_executable(test-addr test/test_addr.cpp src/tfe_types.cpp src/tfe_utils.cpp)
|
2018-09-20 15:42:05 +08:00
|
|
|
target_include_directories(test-addr PRIVATE include)
|
2018-10-22 15:33:24 +08:00
|
|
|
target_link_libraries(test-addr PRIVATE gtest MESA_handle_logger)
|
2018-09-20 15:42:05 +08:00
|
|
|
|
|
|
|
|
include(GoogleTest)
|
|
|
|
|
gtest_discover_tests(test-addr)
|
2019-05-29 14:36:26 +08:00
|
|
|
|
|
|
|
|
### test_cmsg
|
|
|
|
|
add_executable(test_cmsg test/test_cmsg.cpp)
|
|
|
|
|
target_include_directories(test_cmsg PRIVATE include)
|
|
|
|
|
target_link_libraries(test_cmsg PRIVATE common)
|