This is an automated email from the ASF dual-hosted git repository. cmcfarlen pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit a16b0000ca1449d1d01e49c6e67297a3f9fafe88 Author: Mo Chen <[email protected]> AuthorDate: Tue Apr 2 10:10:40 2024 -0500 Fix a build issue with autest plugins (#11165) * Fix a build issue with autest plugins * Make the logic for autest plugins match ats plugins. * Allow undefined symbols on Mac builds. Co-authored-by: Chris McFarlen <[email protected]> --------- Co-authored-by: Chris McFarlen <[email protected]> (cherry picked from commit db9db293c55d419acda4c9a89731c579ca0da005) --- tests/CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4134ff7839..481a57c5b4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -15,15 +15,24 @@ # ####################### +include(add_atsplugin) + function(ADD_AUTEST_PLUGIN _NAME) add_library(${_NAME} MODULE ${ARGN}) + if(LINK_PLUGINS AND BUILD_SHARED_LIBS) + target_link_libraries(${_NAME} PRIVATE ts::tsapi ts::tsutil) + else() + target_include_directories( + ${_NAME} PRIVATE "$<TARGET_PROPERTY:libswoc::libswoc,INCLUDE_DIRECTORIES>" + "$<TARGET_PROPERTY:yaml-cpp::yaml-cpp,INCLUDE_DIRECTORIES>" + ) + endif() set_target_properties( ${_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.libs" PREFIX "" SUFFIX ".so" ) - target_link_libraries(${_NAME} PRIVATE ts::tsapi ts::tsutil) endfunction() add_subdirectory(tools/plugins)
