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 7df910f75e Add libloader plugin to CMake build (#9953)
7df910f75e is described below
commit 7df910f75e6634ed36ea644ed80d5f3e795f8f15
Author: JosiahWI <[email protected]>
AuthorDate: Thu Jul 6 12:09:52 2023 -0500
Add libloader plugin to CMake build (#9953)
This builds the libloader plugin with CMake, and fixes a typo in a comment
in healthchecks/CMakeLists.txt which I copied part of for these changes.
---
CMakeLists.txt | 2 +-
plugins/CMakeLists.txt | 1 +
plugins/healthchecks/CMakeLists.txt | 6 ------
plugins/{healthchecks => libloader}/CMakeLists.txt | 8 ++------
4 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6ced075f07..d17008f78e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -303,7 +303,7 @@ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
add_compile_definitions(${HOST_OS} PACKAGE_NAME="ats"
PACKAGE_VERSION="${TS_VERSION_STRING}")
-add_compile_options(-Wno-invalid-offsetof)
+add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-invalid-offsetof>)
# Common includes for everyone
include_directories(
diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
index 738cf1c873..9d150c79a2 100644
--- a/plugins/CMakeLists.txt
+++ b/plugins/CMakeLists.txt
@@ -43,6 +43,7 @@ add_subdirectory(esi)
add_subdirectory(generator)
add_subdirectory(header_rewrite)
+add_subdirectory(libloader)
add_subdirectory(multiplexer)
add_subdirectory(prefetch)
add_subdirectory(s3_auth)
diff --git a/plugins/healthchecks/CMakeLists.txt
b/plugins/healthchecks/CMakeLists.txt
index 93a70ef4dd..ba2474d87f 100644
--- a/plugins/healthchecks/CMakeLists.txt
+++ b/plugins/healthchecks/CMakeLists.txt
@@ -15,10 +15,4 @@
#
#######################
-# GCC warns that -Wno-invalid-offset, set in top-level CMakeListsitxt,
-# is invalid for C language
-set_directory_properties(PROPERTIES COMPILE_OPTIONS "")
-
add_atsplugin(healthchecks healthchecks.c)
-
-target_compile_options(healthchecks PRIVATE -Wall -Wextra)
diff --git a/plugins/healthchecks/CMakeLists.txt
b/plugins/libloader/CMakeLists.txt
similarity index 76%
copy from plugins/healthchecks/CMakeLists.txt
copy to plugins/libloader/CMakeLists.txt
index 93a70ef4dd..e917590c6b 100644
--- a/plugins/healthchecks/CMakeLists.txt
+++ b/plugins/libloader/CMakeLists.txt
@@ -15,10 +15,6 @@
#
#######################
-# GCC warns that -Wno-invalid-offset, set in top-level CMakeListsitxt,
-# is invalid for C language
-set_directory_properties(PROPERTIES COMPILE_OPTIONS "")
+add_atsplugin(libloader libloader.c)
-add_atsplugin(healthchecks healthchecks.c)
-
-target_compile_options(healthchecks PRIVATE -Wall -Wextra)
+target_include_directories(libloader PRIVATE "${CMAKE_SOURCE_DIR}/include/ts")