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 87fbb89fd92262d2600a72202d1d77b81566f7e4 Author: Chris McFarlen <[email protected]> AuthorDate: Tue Mar 5 11:24:19 2024 -0600 cleanup cript example. add missing function (#11129) * cleanup cript example. add missing function * actually implement Cript::splitter --------- Co-authored-by: Chris McFarlen <[email protected]> (cherry picked from commit d0996add373aa343ac7967d9d4c6e0269c7f2a41) --- example/CMakeLists.txt | 2 ++ example/cripts/CMakeLists.txt | 1 + src/cripts/CMakeLists.txt | 2 +- src/cripts/Lulu.cc | 6 ++++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 6fba928424..2803dbe925 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -17,6 +17,8 @@ # It might be better if this is a subproject +include(add_atsplugin) + add_subdirectory(plugins) if(ENABLE_CRIPTS) add_subdirectory(cripts) diff --git a/example/cripts/CMakeLists.txt b/example/cripts/CMakeLists.txt index ac931626d0..3d578670c9 100644 --- a/example/cripts/CMakeLists.txt +++ b/example/cripts/CMakeLists.txt @@ -22,6 +22,7 @@ foreach(EXA ${CRIPTS_EXAMPLES}) get_filename_component(EXA ${EXA} NAME_WLE) add_atsplugin(cripts_${EXA} ${EXA}.cc) target_link_libraries(cripts_${EXA} PRIVATE ts::cripts) + verify_remap_plugin(cripts_${EXA}) endforeach() # This is a hack, but useful to run clang-tidy across all of Cripts diff --git a/src/cripts/CMakeLists.txt b/src/cripts/CMakeLists.txt index 55d61fa4f6..52613f017b 100644 --- a/src/cripts/CMakeLists.txt +++ b/src/cripts/CMakeLists.txt @@ -52,7 +52,7 @@ set(CRIPTS_PUBLIC_HEADERS add_library(cripts SHARED ${CPP_FILES}) add_library(ts::cripts ALIAS cripts) -target_link_libraries(cripts PUBLIC libswoc::libswoc fmt::fmt PkgConfig::PCRE2 OpenSSL::Crypto ts::tsapi) +target_link_libraries(cripts PUBLIC libswoc::libswoc fmt::fmt PkgConfig::PCRE2 OpenSSL::Crypto) set_target_properties(cripts PROPERTIES PUBLIC_HEADER "${CRIPTS_PUBLIC_HEADERS}") set_target_properties( diff --git a/src/cripts/Lulu.cc b/src/cripts/Lulu.cc index 83ed1291b3..d961117078 100644 --- a/src/cripts/Lulu.cc +++ b/src/cripts/Lulu.cc @@ -166,6 +166,12 @@ Cript::string::split(char delim) const & return details::splitter<Cript::string_view>(*this, delim); } +std::vector<Cript::string_view> +Cript::splitter(Cript::string_view input, char delim) +{ + return details::splitter<Cript::string_view>(input, delim); +} + bool Control::Base::_get(Cript::Context *context) const {
