This is an automated email from the ASF dual-hosted git repository.
mochen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new db9db293c5 Fix a build issue with autest plugins (#11165)
db9db293c5 is described below
commit db9db293c55d419acda4c9a89731c579ca0da005
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]>
---
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)