This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
stellar-stellar/test/decoders/socks/CMakeLists.txt

39 lines
1.3 KiB
CMake

set(DECODER_NAME socks)
add_library(${DECODER_NAME}_test SHARED socks_decoder_test_plugin.cpp)
add_dependencies(${DECODER_NAME}_test ${DECODER_NAME})
set_target_properties(${DECODER_NAME}_test PROPERTIES PREFIX "")
set(TEST_RUN_DIR ${CMAKE_BINARY_DIR}/testing)
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_SOURCE_DIR}/src)
include_directories(${CMAKE_BINARY_DIR}/vendors/cjson/src/cjson/include)
include_directories(${PROJECT_SOURCE_DIR}/decoders/socks)
include_directories(${PROJECT_SOURCE_DIR}/include/stellar)
add_executable(gtest_pcap_socks socks_decoder_pcap_gtest.cpp dummy.c ${PROJECT_SOURCE_DIR}/decoders/socks/socks_decoder.cpp)
target_link_libraries(gtest_pcap_socks gtest logger pcap)
add_executable(socks_test_main plugin_test_main.cpp)
set_target_properties(socks_test_main
PROPERTIES
LINK_OPTIONS
"-rdynamic"
)
set_target_properties(socks_test_main
PROPERTIES
LINK_FLAGS
"-rdynamic"
)
set(LINK_FLAGS "-rdynamic")
target_link_libraries(socks_test_main gtest cjson-static stellar_lib)
add_subdirectory(test_based_on_stellar)
#copy pcap file folder to build directory
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/pcap DESTINATION ${CMAKE_BINARY_DIR}/test/decoders/socks)
include(GoogleTest)
gtest_discover_tests(gtest_pcap_socks)