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 6935af7316 Add option to enable fast SDK in CMake build (#9853)
6935af7316 is described below

commit 6935af7316c6683f7564b07cb83cb9eda5fc3633
Author: JosiahWI <[email protected]>
AuthorDate: Thu Jun 15 17:17:38 2023 -0500

    Add option to enable fast SDK in CMake build (#9853)
    
    * Add option to enable fast SDK in CMake build
    
    This adds a new option that defaults to OFF: ENABLE_FAST_SDK.
    
    * Fix typo in option name
    
    * Put accidentally deleted #cmakedefine01 back in
---
 CMakeLists.txt                       | 8 ++++++--
 include/tscore/ink_config.h.cmake.in | 1 +
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6706513b85..1dafffdbe1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,12 +38,13 @@ execute_process(COMMAND uname -n OUTPUT_VARIABLE 
BUILD_MACHINE OUTPUT_STRIP_TRAI
 
 # Options
 set(DEFAULT_STACK_SIZE 1048576 CACHE STRING "Default stack size (default 
1048576)")
+option(ENABLE_FAST_SDK "Use fast SDK APIs (default OFF)")
+option(ENABLE_JEMALLOC "Use jemalloc (default OFF)")
+option(ENABLE_MIMALLOC "Use mimalloc (default OFF)")
 option(ENABLE_POSIX_CAP
     "Use POSIX capabilities, turn OFF to use id switching. (default ON)"
     ON
 )
-option(ENABLE_JEMALLOC "Use jemalloc (default OFF)")
-option(ENABLE_MIMALLOC "Use mimalloc (default OFF)")
 option(ENABLE_PROFILER "Use gperftools profiler (default OFF)")
 option(ENABLE_TCMALLOC "Use TCMalloc (default OFF)")
 set(TS_MAX_HOST_NAME_LEN 256 CACHE STRING "Max host name length (default 256)")
@@ -51,6 +52,8 @@ set(TS_USE_SET_RBIO 1 CACHE STRING "Use openssl set_rbio 
(default 1)")
 set(TS_USE_DIAGS 1 CACHE STRING "Use diags (default 1)")
 option(TS_USE_HWLOC "Use hwloc (default OFF)")
 
+set(TS_USE_FAST_SDK ${ENABLE_FAST_SDK})
+
 set(TS_VERSION_MAJOR 10)
 set(TS_VERSION_MINOR 0)
 set(TS_VERSION_MICRO 0)
@@ -59,6 +62,7 @@ set(TS_LIBTOOL_VERSION 
${TS_LIBTOOL_MAJOR}:${TS_VERSION_MICRO}:${TS_VERSION_MINO
 set(TS_VERSION_STRING TS_VERSION_S)
 set(TS_VERSION_NUMBER TS_VERSION_N)
 
+
 # Check include files
 include(CheckIncludeFile)
 include(CheckIncludeFiles)
diff --git a/include/tscore/ink_config.h.cmake.in 
b/include/tscore/ink_config.h.cmake.in
index 1c5dadfa60..cc0446822d 100644
--- a/include/tscore/ink_config.h.cmake.in
+++ b/include/tscore/ink_config.h.cmake.in
@@ -118,6 +118,7 @@ const int DEFAULT_STACKSIZE = @DEFAULT_STACK_SIZE@;
 #cmakedefine01 TS_HAS_PROFILER
 #cmakedefine01 TS_USE_DIAGS
 #cmakedefine01 TS_USE_EPOLL
+#cmakedefine01 TS_USE_FAST_SDK
 #cmakedefine01 TS_USE_GET_DH_2048_256
 #cmakedefine01 TS_USE_HWLOC
 #cmakedefine01 TS_USE_KQUEUE

Reply via email to