You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bn...@apache.org on 2023/06/26 14:46:18 UTC
[trafficserver] branch master updated: Add healthcheck plugin to CMake build (#9913)
This is an automated email from the ASF dual-hosted git repository.
bneradt 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 ce481126b2 Add healthcheck plugin to CMake build (#9913)
ce481126b2 is described below
commit ce481126b270689574912d3128b993170456f084
Author: JosiahWI <41...@users.noreply.github.com>
AuthorDate: Mon Jun 26 09:46:12 2023 -0500
Add healthcheck plugin to CMake build (#9913)
This builds the healthcheck plugin. The compiler options set
by the top-level CMakeLists.txt are cleared for the healthchecks
directory, because the -Wno-invalid-offset option is only for C++.
This only affects the one directory; flags are left intact for all
other directories.
---
plugins/CMakeLists.txt | 2 ++
plugins/{ => healthchecks}/CMakeLists.txt | 31 +++++--------------------------
2 files changed, 7 insertions(+), 26 deletions(-)
diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
index e488c6cd95..43250ee734 100644
--- a/plugins/CMakeLists.txt
+++ b/plugins/CMakeLists.txt
@@ -42,4 +42,6 @@ add_subdirectory(esi)
add_subdirectory(header_rewrite)
add_subdirectory(generator)
+
+add_subdirectory(healthchecks)
add_subdirectory(xdebug)
diff --git a/plugins/CMakeLists.txt b/plugins/healthchecks/CMakeLists.txt
similarity index 50%
copy from plugins/CMakeLists.txt
copy to plugins/healthchecks/CMakeLists.txt
index e488c6cd95..93a70ef4dd 100644
--- a/plugins/CMakeLists.txt
+++ b/plugins/healthchecks/CMakeLists.txt
@@ -15,31 +15,10 @@
#
#######################
-set(CMAKE_SHARED_LIBRARY_PREFIX "")
+# GCC warns that -Wno-invalid-offset, set in top-level CMakeListsitxt,
+# is invalid for C language
+set_directory_properties(PROPERTIES COMPILE_OPTIONS "")
-function(add_atsplugin name)
- add_library(${name} MODULE ${ARGN})
- set_target_properties(${name} PROPERTIES PREFIX "")
- set_target_properties(${name} PROPERTIES SUFFIX ".so")
- set_target_properties(${name} PROPERTIES LINK_FLAGS "-Wl,-rpath,${CMAKE_INSTALL_PREFIX}/lib")
- install(TARGETS ${name} DESTINATION libexec/trafficserver)
-endfunction()
+add_atsplugin(healthchecks healthchecks.c)
-if(APPLE)
- set(CMAKE_MODULE_LINKER_FLAGS "-undefined dynamic_lookup")
-endif()
-
-add_subdirectory(authproxy)
-add_subdirectory(background_fetch)
-add_subdirectory(cache_promote)
-add_subdirectory(cache_range_requests)
-add_subdirectory(cachekey)
-add_subdirectory(certifier)
-add_subdirectory(compress)
-add_subdirectory(conf_remap)
-add_subdirectory(esi)
-
-add_subdirectory(header_rewrite)
-
-add_subdirectory(generator)
-add_subdirectory(xdebug)
+target_compile_options(healthchecks PRIVATE -Wall -Wextra)