You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by cm...@apache.org on 2023/02/10 19:33:37 UTC
[trafficserver] branch master updated: improve cmake support (#9290)
This is an automated email from the ASF dual-hosted git repository.
cmcfarlen 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 7cdb749203 improve cmake support (#9290)
7cdb749203 is described below
commit 7cdb74920304cf29b54d09c1cc592bc78ee17550
Author: Chris McFarlen <ch...@mcfarlen.us>
AuthorDate: Fri Feb 10 13:33:29 2023 -0600
improve cmake support (#9290)
* add a bunch of CMakeLists.txt
* Add license headers
* yamlcpp doesnt need apache license
* add license
* license
* build traffic_server
* catch tests
---------
Co-authored-by: Chris McFarlen <cm...@apple.com>
---
CMakeLists.txt | 204 ++++++++++++++++---------------
cmake/FindPCRE.cmake | 34 ++++++
include/tscore/ink_config.h.cmake.in | 97 +++++++++++++++
iocore/CMakeLists.txt | 34 ++++++
iocore/aio/CMakeLists.txt | 21 ++++
iocore/cache/CMakeLists.txt | 49 ++++++++
iocore/dns/CMakeLists.txt | 37 ++++++
iocore/eventsystem/CMakeLists.txt | 37 ++++++
iocore/eventsystem/I_MIOBufferWriter.h | 2 +-
iocore/hostdb/CMakeLists.txt | 38 ++++++
iocore/net/CMakeLists.txt | 81 ++++++++++++
iocore/utils/CMakeLists.txt | 32 +++++
lib/CMakeLists.txt | 25 ++++
lib/fastlz/CMakeLists.txt | 20 +++
lib/yamlcpp/CMakeLists.txt | 2 +-
mgmt/CMakeLists.txt | 44 +++++++
mgmt/utils/CMakeLists.txt | 46 +++++++
proxy/CMakeLists.txt | 63 ++++++++++
proxy/hdrs/CMakeLists.txt | 34 ++++++
proxy/http/CMakeLists.txt | 49 ++++++++
proxy/http/remap/CMakeLists.txt | 44 +++++++
proxy/http2/CMakeLists.txt | 37 ++++++
proxy/logging/CMakeLists.txt | 42 +++++++
proxy/shared/CMakeLists.txt | 34 ++++++
src/records/CMakeLists.txt | 59 +++++++++
src/traffic_server/CMakeLists.txt | 57 +++++++++
src/tscore/CMakeLists.txt | 151 +++++++++++++++++++++++
src/tscore/unit_tests/test_Extendible.cc | 6 -
src/tscpp/util/CMakeLists.txt | 33 +++++
29 files changed, 1304 insertions(+), 108 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8402a7a02b..f8b909aac8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,108 +23,112 @@
#
#######################
-cmake_minimum_required(VERSION 3.7)
+cmake_minimum_required(VERSION 3.23)
project(ats)
+enable_testing()
set(CMAKE_CXX_STANDARD 17)
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+
+# Gather some environment info
+string(TOLOWER ${CMAKE_HOST_SYSTEM_NAME} HOST_OS)
+set(BUILD_NUMBER "0" CACHE STRING "The build number")
+execute_process(COMMAND id -nu OUTPUT_VARIABLE BUILD_PERSON OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process(COMMAND id -ng OUTPUT_VARIABLE BUILD_GROUP OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process(COMMAND uname -n OUTPUT_VARIABLE BUILD_MACHINE OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+# Options
+set(DEFAULT_STACK_SIZE 1048576 CACHE STRING "Default stack size (default 1048576)")
+set(TS_MAX_HOST_NAME_LEN 256 CACHE STRING "Max host name length (default 256)")
+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)")
+
+set(TS_VERSION_MAJOR 10)
+set(TS_VERSION_MINOR 0)
+set(TS_VERSION_MICRO 0)
+set(TS_LIBTOOL_MAJOR ${TS_VERSION_MAJOR}${TS_VERSION_MINOR})
+set(TS_LIBTOOL_VERSION ${TS_LIBTOOL_MAJOR}:${TS_VERSION_MICRO}:${TS_VERSION_MINOR})
+set(TS_VERSION_STRING TS_VERSION_S)
+set(TS_VERSION_NUMBER TS_VERSION_N)
+
+# Check include files
+include(CheckIncludeFile)
+include(CheckIncludeFiles)
+include(CheckIncludeFileCXX)
+include(CheckSymbolExists)
+
+CHECK_INCLUDE_FILE(dlfcn.h HAVE_DLFCN_H)
+CHECK_INCLUDE_FILE(float.h HAVE_FLOAT_H)
+CHECK_INCLUDE_FILE(stdlib.h HAVE_STDLIB_H)
+CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
+CHECK_INCLUDE_FILE(inttypes.h HAVE_INTTYPES_H)
+CHECK_INCLUDE_FILE(string.h HAVE_STRING_H)
+CHECK_INCLUDE_FILE(sys/ioctl.h HAVE_SYS_IOCTL_H)
+CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H)
+CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H)
+CHECK_INCLUDE_FILE(sys/statvfs.h HAVE_SYS_STATVFS_H)
+CHECK_INCLUDE_FILE(sys/uio.h HAVE_SYS_UIO_H)
+CHECK_INCLUDE_FILE(sys/mman.h HAVE_SYS_MMAN_H)
+CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H)
+CHECK_INCLUDE_FILE(netinet/in.h HAVE_NETINET_IN_H)
+CHECK_INCLUDE_FILE(netinet/in_systm.h HAVE_NETINET_IN_SYSTM_H)
+CHECK_INCLUDE_FILE(netinet/tcp.h HAVE_NETINET_TCP_H)
+CHECK_INCLUDE_FILE(netinet/ip_icmp.h HAVE_NETINET_IP_ICMP_H)
+CHECK_INCLUDE_FILE(netdb.h HAVE_NETDB_H)
+CHECK_INCLUDE_FILE(arpa/inet.h HAVE_ARPA_INET_H)
+CHECK_INCLUDE_FILE(arpa/nameser.h HAVE_ARPA_NAMESER_H)
+CHECK_INCLUDE_FILE(arpa/nameser_compat.h HAVE_ARPA_NAMESER_COMPAT_H)
+CHECK_INCLUDE_FILE(siginfo.h HAVE_SIGINFO_H)
+
+# Find libraries
+find_package(PCRE)
+include(FindOpenSSL)
+find_package(OpenSSL)
+
+# Check for IO faculties
+check_symbol_exists(epoll_create "sys/epoll.h" TS_USE_EPOLL)
+check_symbol_exists(kqueue "sys/event.h" TS_USE_KQUEUE)
+check_symbol_exists(io_uring_queue_init "liburing.h" HAVE_IOURING)
+option(USE_IOURING "Use experimental io_uring (linux only)" 0)
+if (HAVE_IOURING AND USE_IOUIRNG)
+ set(TS_USE_LINUX_IO_URING)
+endif(HAVE_IOURING AND USE_IOUIRNG)
+
+# Check ssl functionality
+list(APPEND CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+list(APPEND CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
+check_symbol_exists(BIO_meth_new "openssl/bio.h" HAVE_BIO_METH_NEW)
+check_symbol_exists(DH_get_2048_256 "openssl/dh.h" TS_USE_GET_DH_2048_256)
+
+# Catch2 for tests
+set(CATCH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/tests/include)
+
+include(CTest)
+
+message("Configuring for ${HOST_OS}")
+
+configure_file(include/tscore/ink_config.h.cmake.in include/tscore/ink_config.h)
+configure_file(include/ts/apidefs.h.in include/ts/apidefs.h)
+
+add_compile_definitions(${HOST_OS} PACKAGE_NAME="ats" PACKAGE_VERSION="${TS_VERSION_STRING}")
+add_compile_options(-Wno-invalid-offsetof)
+
+# common includes for everyone
include_directories(
- include
- tests/include
- lib
- lib/swoc/include
- lib/yamlcpp/include
- proxy
- proxy/hdrs
- proxy/http
- proxy/http/remap
- proxy/shared
- iocore/eventsystem
- iocore/net
- iocore/dns
- iocore/hostdb
- iocore/aio
- iocore/cache
- iocore/utils
- mgmt
- mgmt/api
- mgmt/utils
- mgmt/api/include
- proxy/api)
-
-macro(CC_EXEC exec path)
- file(GLOB cc_exec_files ${path}/*.cc ${path}/*.h)
- add_executable(${exec} ${cc_exec_files})
-endmacro(CC_EXEC)
-
-macro(CPP_LIB name src_path inc_path)
- file(GLOB cc_lib_files ${inc_path}/*.h ${src_path}/*.cc ${src_path}/*.h ${src_path}/unit_tests/*.cc)
- add_library(${name} SHARED ${cc_lib_files})
-endmacro(CPP_LIB)
-
-macro(CPP_ADD_SOURCES target path)
- file(GLOB cpp_add_src_files ${path}/*.h ${path}/*.cc)
- target_sources(${target} PRIVATE ${cpp_add_src_files})
-endmacro(CPP_ADD_SOURCES)
-
-CC_EXEC(traffic_cache_tool src/traffic_cache_tool)
-CC_EXEC(traffic_crashlog src/traffic_crashlog)
-CC_EXEC(traffic_ctl src/traffic_ctl)
-CC_EXEC(traffic_layout src/traffic_layout)
-CC_EXEC(traffic_logcat src/traffic_logcat)
-CC_EXEC(traffic_logstats src/traffic_logstats)
-CC_EXEC(traffic_server src/traffic_server)
-target_sources(traffic_server PRIVATE src/shared/overridable_txn_vars.cc)
-CC_EXEC(traffic_top src/traffic_top)
-CC_EXEC(traffic_via src/traffic_via)
-CC_EXEC(traffic_wccp src/traffic_wccp)
-
-CPP_LIB(tscore src/tscore include/tscore)
-CPP_LIB(tscpputil src/tscpp/util include/tscpp/util)
-CPP_LIB(tscppapi src/tscpp/api include/tscpp/api)
-
-CC_EXEC(test_tscore src/tscore/unit_tests)
-CC_EXEC(test_tsutil src/tscpp/util/unit_tests)
-CC_EXEC(test_librecords src/records/unit_tests)
-
-CPP_LIB(proxy proxy proxy)
-CPP_ADD_SOURCES(proxy proxy/http)
-CPP_ADD_SOURCES(proxy proxy/http/unit_tests)
-CPP_ADD_SOURCES(proxy proxy/http2)
-CPP_ADD_SOURCES(proxy proxy/http/remap)
-CPP_ADD_SOURCES(proxy proxy/hdrs)
-CPP_ADD_SOURCES(proxy proxy/hdrs/unit_tests)
-CPP_ADD_SOURCES(proxy proxy/logging)
-
-CPP_LIB(iocore iocore iocore)
-CPP_ADD_SOURCES(iocore iocore/eventsystem)
-CPP_ADD_SOURCES(iocore iocore/net)
-CPP_ADD_SOURCES(iocore iocore/cache)
-CPP_ADD_SOURCES(iocore iocore/aio)
-CPP_ADD_SOURCES(iocore iocore/dns)
-CPP_ADD_SOURCES(iocore iocore/hostdb)
-CPP_ADD_SOURCES(iocore iocore/utils)
-
-CPP_LIB(mgmt mgmt mgmt)
-CPP_ADD_SOURCES(mgmt mgmt/api)
-CPP_ADD_SOURCES(mgmt mgmt/utils)
-
-CPP_LIB(records src/records src/records)
-CPP_LIB(logging proxy/logging proxy/logging)
-
-CPP_LIB(wccp src/wccp include/wccp)
-
-file(GLOB plugin_files
- plugins/*/*.h
- plugins/*/*.c
- plugins/*/*.cc
- plugins/experimental/*/*.h
- plugins/experimental/*/*.c
- plugins/experimental/*/*.cc
- example/*/*.h
- example/*/*.c
- example/*/*.cc
- )
-add_library(plugins SHARED ${plugin_files})
-
-add_custom_target(clang-format WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY} COMMAND make -j clang-format)
+ ${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_BINARY_DIR}/include
+ ${PCRE_INCLUDE_DIRS}
+)
+if (OPENSSL_FOUND)
+ include_directories(${OPENSSL_INCLUDE_DIR})
+endif(OPENSSL_FOUND)
+
+add_subdirectory(lib)
+add_subdirectory(src/tscpp/util)
+add_subdirectory(src/tscore)
+add_subdirectory(src/records)
+add_subdirectory(iocore)
+add_subdirectory(proxy)
+add_subdirectory(mgmt)
+add_subdirectory(src/traffic_server)
diff --git a/cmake/FindPCRE.cmake b/cmake/FindPCRE.cmake
new file mode 100644
index 0000000000..50d804fcf0
--- /dev/null
+++ b/cmake/FindPCRE.cmake
@@ -0,0 +1,34 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+find_path(PCRE_INCLUDE_DIR NAMES pcre.h PATH_SUFFIXES pcre)
+find_library(PCRE_LIBRARY NAMES pcre)
+
+message(PCRE_INCLUDE_DIR=${PCRE_INCLUDE_DIR})
+message(PCRE_LIBRARY=${PCRE_LIBRARY})
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_INCLUDE_DIR)
+
+if(PCRE_FOUND)
+ SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
+ SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
+else(PCRE_FOUND)
+ SET(PCRE_LIBRARIES)
+ SET(PCRE_INCLUDE_DIRS)
+endif(PCRE_FOUND)
diff --git a/include/tscore/ink_config.h.cmake.in b/include/tscore/ink_config.h.cmake.in
new file mode 100644
index 0000000000..ec38aeb3aa
--- /dev/null
+++ b/include/tscore/ink_config.h.cmake.in
@@ -0,0 +1,97 @@
+/** @file
+
+ Some small general interest definitions. The general standard is to
+ prefix these defines with TS_.
+
+ @section license License
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+#pragma once
+
+#define _TS_STR(x) #x
+#define TS_STR(x) _TS_STR(x)
+
+#cmakedefine BUILD_MACHINE "@BUILD_MACHINE@"
+#cmakedefine BUILD_PERSON "@BUILD_PERSON@"
+#cmakedefine BUILD_GROUP "@BUILD_GROUP@"
+#define BUILD_NUMBER "@BUILD_NUMBER@"
+
+#cmakedefine HAVE_DLFCN_H 1
+#cmakedefine HAVE_FLOAT_H 1
+#cmakedefine HAVE_STDLIB_H 1
+#cmakedefine HAVE_STDINT_H 1
+#cmakedefine HAVE_INTTYPES_H 1
+#cmakedefine HAVE_STRING_H 1
+#cmakedefine HAVE_SYS_IOCTL_H 1
+#cmakedefine HAVE_SYS_TYPES_H 1
+#cmakedefine HAVE_SYS_STAT_H 1
+#cmakedefine HAVE_SYS_STATVFS_H 1
+#cmakedefine HAVE_SYS_UIO_H 1
+#cmakedefine HAVE_SYS_MMAN_H 1
+#cmakedefine HAVE_UNISTD_H 1
+#cmakedefine HAVE_NETINET_IN_H 1
+#cmakedefine HAVE_NETINET_IN_SYSTM_H 1
+#cmakedefine HAVE_NETINET_TCP_H 1
+#cmakedefine HAVE_NETINET_IP_ICMP_H 1
+#cmakedefine HAVE_NETDB_H 1
+#cmakedefine HAVE_ARPA_INET_H 1
+#cmakedefine HAVE_ARPA_NAMESER_H 1
+#cmakedefine HAVE_ARPA_NAMESER_COMPAT_H 1
+#cmakedefine HAVE_SIGINFO_H 1
+
+#cmakedefine HAVE_BIO_METH_NEW 1
+
+/* TODO(cmcfarlen): make this configurable */
+#define TS_PKGSYSUSER "@pkgsysuser@"
+#define TS_PKGSYSGROUP "@pkgsysgroup@"
+
+#define TS_BUILD_PREFIX "@CMAKE_INSTALL_PREFIX@"
+#define TS_BUILD_EXEC_PREFIX ""
+#define TS_BUILD_BINDIR "bin"
+#define TS_BUILD_SBINDIR "bin"
+#define TS_BUILD_SYSCONFDIR "etc/trafficserver"
+#define TS_BUILD_DATADIR "share/trafficserver"
+#define TS_BUILD_INCLUDEDIR "include"
+#define TS_BUILD_LIBDIR "lib"
+#define TS_BUILD_LIBEXECDIR "libexec/trafficserver"
+#define TS_BUILD_LOCALSTATEDIR "var"
+#define TS_BUILD_RUNTIMEDIR "var/trafficserver"
+#define TS_BUILD_LOGDIR "var/log/trafficserver"
+#define TS_BUILD_MANDIR "share/man"
+#define TS_BUILD_CACHEDIR "var/trafficserver"
+#define TS_BUILD_INFODIR "info"
+
+#define TS_ABS_TOP_SRCDIR "@CMAKE_SOURCE_DIR@"
+
+/* Build definitions */
+const int DEFAULT_STACKSIZE = @DEFAULT_STACK_SIZE@;
+#define TS_MAX_HOST_NAME_LEN @TS_MAX_HOST_NAME_LEN@
+
+/* Feature Flags */
+#cmakedefine01 TS_USE_EPOLL
+#cmakedefine01 TS_USE_KQUEUE
+#cmakedefine01 TS_USE_LINUX_IO_URING
+#cmakedefine01 TS_USE_SET_RBIO
+#cmakedefine01 TS_USE_DIAGS
+#cmakedefine01 TS_USE_GET_DH_2048_256
+
+#define TS_BUILD_CANONICAL_HOST "@CMAKE_HOST@"
+
+
+
diff --git a/iocore/CMakeLists.txt b/iocore/CMakeLists.txt
new file mode 100644
index 0000000000..da34ad8f26
--- /dev/null
+++ b/iocore/CMakeLists.txt
@@ -0,0 +1,34 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_subdirectory(eventsystem)
+add_subdirectory(net)
+add_subdirectory(aio)
+add_subdirectory(dns)
+add_subdirectory(hostdb)
+add_subdirectory(utils)
+add_subdirectory(cache)
+
+set(IOCORE_INCLUDE_DIRS
+ ${CMAKE_SOURCE_DIR}/iocore/eventsystem
+ ${CMAKE_SOURCE_DIR}/iocore/dns
+ ${CMAKE_SOURCE_DIR}/iocore/aio
+ ${CMAKE_SOURCE_DIR}/iocore/net
+ ${CMAKE_SOURCE_DIR}/iocore/cache
+ ${CMAKE_SOURCE_DIR}/iocore/hostdb
+ ${CMAKE_SOURCE_DIR}/iocore/utils PARENT_SCOPE)
diff --git a/iocore/aio/CMakeLists.txt b/iocore/aio/CMakeLists.txt
new file mode 100644
index 0000000000..944c072b2c
--- /dev/null
+++ b/iocore/aio/CMakeLists.txt
@@ -0,0 +1,21 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(aio)
+target_sources(aio PRIVATE AIO.cc Inline.cc)
+target_include_directories(aio PRIVATE ${CMAKE_SOURCE_DIR}/iocore/eventsystem)
diff --git a/iocore/cache/CMakeLists.txt b/iocore/cache/CMakeLists.txt
new file mode 100644
index 0000000000..f518c40ea8
--- /dev/null
+++ b/iocore/cache/CMakeLists.txt
@@ -0,0 +1,49 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(inkcache STATIC
+ Cache.cc
+ CacheDir.cc
+ CacheDisk.cc
+ CacheHosting.cc
+ CacheHttp.cc
+ CachePages.cc
+ CachePagesInternal.cc
+ CacheRead.cc
+ CacheVol.cc
+ CacheWrite.cc
+ Inline.cc
+ RamCacheCLFUS.cc
+ RamCacheLRU.cc
+ Store.cc
+)
+target_include_directories(inkcache PRIVATE
+ ${CMAKE_SOURCE_DIR}/iocore/eventsystem
+ ${CMAKE_SOURCE_DIR}/iocore/dns
+ ${CMAKE_SOURCE_DIR}/iocore/aio
+ ${CMAKE_SOURCE_DIR}/iocore/net
+ ${CMAKE_SOURCE_DIR}/iocore/cache
+ ${CMAKE_SOURCE_DIR}/iocore/hostdb
+ ${CMAKE_SOURCE_DIR}/proxy
+ ${CMAKE_SOURCE_DIR}/proxy/http
+ ${CMAKE_SOURCE_DIR}/proxy/http/remap
+ ${CMAKE_SOURCE_DIR}/proxy/hdrs
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+ ${CMAKE_SOURCE_DIR}/lib
+)
diff --git a/iocore/dns/CMakeLists.txt b/iocore/dns/CMakeLists.txt
new file mode 100644
index 0000000000..dcb7fbf125
--- /dev/null
+++ b/iocore/dns/CMakeLists.txt
@@ -0,0 +1,37 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(inkdns STATIC
+ DNS.cc
+ DNSConnection.cc
+ Inline.cc
+ SplitDNS.cc
+)
+target_include_directories(inkdns PRIVATE
+ ${CMAKE_SOURCE_DIR}/iocore/eventsystem
+ ${CMAKE_SOURCE_DIR}/iocore/dns
+ ${CMAKE_SOURCE_DIR}/iocore/aio
+ ${CMAKE_SOURCE_DIR}/iocore/net
+ ${CMAKE_SOURCE_DIR}/iocore/cache
+ ${CMAKE_SOURCE_DIR}/iocore/hostdb
+ ${CMAKE_SOURCE_DIR}/proxy
+ ${CMAKE_SOURCE_DIR}/proxy/http
+ ${CMAKE_SOURCE_DIR}/proxy/hdrs
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+)
\ No newline at end of file
diff --git a/iocore/eventsystem/CMakeLists.txt b/iocore/eventsystem/CMakeLists.txt
new file mode 100644
index 0000000000..9fe971a45b
--- /dev/null
+++ b/iocore/eventsystem/CMakeLists.txt
@@ -0,0 +1,37 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(inkevent)
+target_sources(inkevent PRIVATE
+ EventSystem.cc
+ IOBuffer.cc
+ Inline.cc
+ Lock.cc
+ MIOBufferWriter.cc
+ PQ-List.cc
+ Processor.cc
+ ProtectedQueue.cc
+ ProxyAllocator.cc
+ SocketManager.cc
+ Tasks.cc
+ Thread.cc
+ UnixEThread.cc
+ UnixEvent.cc
+ UnixEventProcessor.cc
+ )
+target_include_directories(inkevent PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
\ No newline at end of file
diff --git a/iocore/eventsystem/I_MIOBufferWriter.h b/iocore/eventsystem/I_MIOBufferWriter.h
index 2c3d83ea16..f01ab00dae 100644
--- a/iocore/eventsystem/I_MIOBufferWriter.h
+++ b/iocore/eventsystem/I_MIOBufferWriter.h
@@ -36,7 +36,7 @@
#include "tscore/BufferWriter.h"
#if !defined(UNIT_TEST_BUFFER_WRITER)
-#include <I_IOBuffer.h>
+#include "I_IOBuffer.h"
#endif
/** BufferWriter interface on top of IOBuffer blocks.
diff --git a/iocore/hostdb/CMakeLists.txt b/iocore/hostdb/CMakeLists.txt
new file mode 100644
index 0000000000..c41ce698d0
--- /dev/null
+++ b/iocore/hostdb/CMakeLists.txt
@@ -0,0 +1,38 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(inkhostdb STATIC
+ HostDB.cc
+ Inline.cc
+ RefCountCache.cc
+ HostFile.cc
+ HostDBInfo.cc
+)
+target_include_directories(inkhostdb PRIVATE
+ ${CMAKE_SOURCE_DIR}/iocore/eventsystem
+ ${CMAKE_SOURCE_DIR}/iocore/dns
+ ${CMAKE_SOURCE_DIR}/iocore/aio
+ ${CMAKE_SOURCE_DIR}/iocore/net
+ ${CMAKE_SOURCE_DIR}/iocore/cache
+ ${CMAKE_SOURCE_DIR}/iocore/hostdb
+ ${CMAKE_SOURCE_DIR}/proxy
+ ${CMAKE_SOURCE_DIR}/proxy/http
+ ${CMAKE_SOURCE_DIR}/proxy/hdrs
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+)
diff --git a/iocore/net/CMakeLists.txt b/iocore/net/CMakeLists.txt
new file mode 100644
index 0000000000..6f0502472d
--- /dev/null
+++ b/iocore/net/CMakeLists.txt
@@ -0,0 +1,81 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(inknet STATIC
+ ALPNSupport.cc
+ BIO_fastopen.cc
+ BoringSSLUtils.cc
+ Connection.cc
+ Inline.cc
+ YamlSNIConfig.cc
+ Net.cc
+ NetVConnection.cc
+ ProxyProtocol.cc
+ Socks.cc
+ SSLCertLookup.cc
+ SSLClientCoordinator.cc
+ SSLClientUtils.cc
+ SSLConfig.cc
+ SSLSecret.cc
+ SSLDiags.cc
+ SSLInternal.cc
+ SSLNetAccept.cc
+ SSLNetProcessor.cc
+ SSLNetVConnection.cc
+ SSLNextProtocolAccept.cc
+ SSLNextProtocolSet.cc
+ SSLSNIConfig.cc
+ SSLStats.cc
+ SSLSessionCache.cc
+ SSLSessionTicket.cc
+ SSLUtils.cc
+ OCSPStapling.cc
+ TLSBasicSupport.cc
+ TLSEarlyDataSupport.cc
+ TLSKeyLogger.cc
+ TLSSessionResumptionSupport.cc
+ TLSSNISupport.cc
+ TLSTunnelSupport.cc
+ UDPIOEvent.cc
+ UnixConnection.cc
+ UnixNet.cc
+ UnixNetAccept.cc
+ UnixNetPages.cc
+ UnixNetProcessor.cc
+ UnixNetVConnection.cc
+ UnixUDPConnection.cc
+ UnixUDPNet.cc
+ SSLDynlock.cc
+)
+target_link_libraries(inknet inkevent records_p)
+target_include_directories(inknet PRIVATE
+ ${CMAKE_SOURCE_DIR}/iocore/eventsystem
+ ${CMAKE_SOURCE_DIR}/iocore/dns
+ ${CMAKE_SOURCE_DIR}/iocore/aio
+ ${CMAKE_SOURCE_DIR}/iocore/net
+ ${CMAKE_SOURCE_DIR}/iocore/cache
+ ${CMAKE_SOURCE_DIR}/iocore/hostdb
+ ${CMAKE_SOURCE_DIR}/proxy
+ ${CMAKE_SOURCE_DIR}/proxy/hdrs
+ ${CMAKE_SOURCE_DIR}/proxy/shared
+ ${CMAKE_SOURCE_DIR}/proxy/http
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+ ${OPENSSL_INCLUDE_DIRS}
+ ${YAML_INCLUDE_DIRS}
+)
\ No newline at end of file
diff --git a/iocore/utils/CMakeLists.txt b/iocore/utils/CMakeLists.txt
new file mode 100644
index 0000000000..2035a2dcaf
--- /dev/null
+++ b/iocore/utils/CMakeLists.txt
@@ -0,0 +1,32 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(inkutils STATIC Machine.cc OneWayMultiTunnel.cc OneWayTunnel.cc)
+target_include_directories(inkutils PRIVATE
+ ${CMAKE_SOURCE_DIR}/iocore/eventsystem
+ ${CMAKE_SOURCE_DIR}/iocore/dns
+ ${CMAKE_SOURCE_DIR}/iocore/aio
+ ${CMAKE_SOURCE_DIR}/iocore/net
+ ${CMAKE_SOURCE_DIR}/iocore/cache
+ ${CMAKE_SOURCE_DIR}/iocore/hostdb
+ ${CMAKE_SOURCE_DIR}/proxy
+ ${CMAKE_SOURCE_DIR}/proxy/http
+ ${CMAKE_SOURCE_DIR}/proxy/hdrs
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+ )
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
new file mode 100644
index 0000000000..1a8de4b701
--- /dev/null
+++ b/lib/CMakeLists.txt
@@ -0,0 +1,25 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+
+# yamlcpp shadows a bunch of variables but we don't want to hear bout it
+add_compile_options(-Wno-shadow)
+add_subdirectory(yamlcpp)
+set(YAML_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/lib/yamlcpp/include PARENT_SCOPE)
+add_subdirectory(fastlz)
+set(SWOC_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/lib/swoc/include PARENT_SCOPE)
diff --git a/lib/fastlz/CMakeLists.txt b/lib/fastlz/CMakeLists.txt
new file mode 100644
index 0000000000..38556fc74e
--- /dev/null
+++ b/lib/fastlz/CMakeLists.txt
@@ -0,0 +1,20 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(fastlz)
+target_sources(fastlz PRIVATE fastlz.cc fastlz.h)
diff --git a/lib/yamlcpp/CMakeLists.txt b/lib/yamlcpp/CMakeLists.txt
index b230b9e6de..3092e64336 100644
--- a/lib/yamlcpp/CMakeLists.txt
+++ b/lib/yamlcpp/CMakeLists.txt
@@ -93,7 +93,7 @@ endif()
target_compile_options(yaml-cpp
PRIVATE
- $<${not-msvc}:-Wall -Wextra -Wshadow -Weffc++ -Wno-long-long>
+ $<${not-msvc}:-Wall -Wextra -Weffc++ -Wno-long-long>
$<${not-msvc}:-pedantic -pedantic-errors>
$<$<AND:${backport-msvc-runtime},${msvc-rt-mtd-static}>:-MTd>
diff --git a/mgmt/CMakeLists.txt b/mgmt/CMakeLists.txt
new file mode 100644
index 0000000000..2091ed24aa
--- /dev/null
+++ b/mgmt/CMakeLists.txt
@@ -0,0 +1,44 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+
+add_library(mgmt_c STATIC RecordsConfig.cc)
+add_library(mgmt_p STATIC
+ BaseManager.cc
+ RecordsConfigUtils.cc
+ RecordsConfig.cc
+ ProcessManager.cc
+ ProxyConfig.cc
+ YamlCfg.cc
+)
+add_library(mgmt_lm STATIC
+ BaseManager.cc
+ RecordsConfigUtils.cc
+ Alarms.cc
+ DerivativeMetrics.cc
+ FileManager.cc
+ LocalManager.cc
+ ConfigManager.cc
+ WebMgmtUtils.cc
+)
+include_directories(${IOCORE_INCLUDE_DIRS} ${PROXY_INCLUDE_DIRS} ${YAML_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/utils ${CMAKE_CURRENT_SOURCE_DIR})
+
+#target_link_libraries(mgmt_lm yaml-cpp proxy logging tscore records_lm mgmt_c inkevent utils_lm proxy)
+#target_link_libraries(mgmt_p yaml-cpp proxy logging tscore records_p mgmt_c inkevent utils_p )
+
+add_subdirectory(utils)
\ No newline at end of file
diff --git a/mgmt/utils/CMakeLists.txt b/mgmt/utils/CMakeLists.txt
new file mode 100644
index 0000000000..97f4ac59b8
--- /dev/null
+++ b/mgmt/utils/CMakeLists.txt
@@ -0,0 +1,46 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(utils_lm STATIC
+ MgmtMarshall.cc
+ MgmtSocket.cc
+ MgmtUtils.cc
+ ExpandingArray.cc
+ MgmtLocalCleanup.cc
+)
+add_library(utils_p STATIC
+ MgmtMarshall.cc
+ MgmtSocket.cc
+ MgmtUtils.cc
+ MgmtProcessCleanup.cc
+)
+include_directories(
+ ${IOCORE_INCLUDE_DIRS}
+ ${PROXY_INCLUDE_DIRS}
+ ${YAML_INCLUDE_DIR}
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/proxy
+ ${CMAKE_SOURCE_DIR}/proxy/http
+ ${CMAKE_SOURCE_DIR}/proxy/http2
+ ${CMAKE_SOURCE_DIR}/proxy/http3
+ ${CMAKE_SOURCE_DIR}/proxy/logging
+ ${CMAKE_SOURCE_DIR}/proxy/http/remap
+ ${CMAKE_SOURCE_DIR}/proxy/hdrs
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
diff --git a/proxy/CMakeLists.txt b/proxy/CMakeLists.txt
new file mode 100644
index 0000000000..62083e5ee1
--- /dev/null
+++ b/proxy/CMakeLists.txt
@@ -0,0 +1,63 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(proxy STATIC
+ private/SSLProxySession.cc
+ CacheControl.cc
+ ControlBase.cc
+ ControlMatcher.cc
+ IPAllow.cc
+ ParentConsistentHash.cc
+ ParentRoundRobin.cc
+ ParentSelectionStrategy.cc
+ ParentSelection.cc
+ Plugin.cc
+ PluginVC.cc
+ ProtocolProbeSessionAccept.cc
+ ProxySession.cc
+ ProxyTransaction.cc
+ ReverseProxy.cc
+ StatPages.cc
+ Transform.cc
+)
+
+set(PROXY_INCLUDE_DIRS
+ ${CMAKE_SOURCE_DIR}/proxy
+ ${CMAKE_SOURCE_DIR}/proxy/http
+ ${CMAKE_SOURCE_DIR}/proxy/http2
+ ${CMAKE_SOURCE_DIR}/proxy/http3
+ ${CMAKE_SOURCE_DIR}/proxy/logging
+ ${CMAKE_SOURCE_DIR}/proxy/http/remap
+ ${CMAKE_SOURCE_DIR}/proxy/hdrs
+ ${CMAKE_SOURCE_DIR}/proxy/shared
+)
+set(PROXY_INCLUDE_DIRS ${PROXY_INCLUDE_DIRS} PARENT_SCOPE)
+
+target_include_directories(proxy PRIVATE
+ ${IOCORE_INCLUDE_DIRS}
+ ${PROXY_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+ ${CMAKE_SOURCE_DIR}/lib/yamlcpp/include
+ )
+
+add_subdirectory(hdrs)
+add_subdirectory(shared)
+add_subdirectory(http)
+add_subdirectory(http2)
+add_subdirectory(logging)
diff --git a/proxy/hdrs/CMakeLists.txt b/proxy/hdrs/CMakeLists.txt
new file mode 100644
index 0000000000..232c27c39f
--- /dev/null
+++ b/proxy/hdrs/CMakeLists.txt
@@ -0,0 +1,34 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(hdrs STATIC
+ HTTP.cc
+ HdrHeap.cc
+ HdrTSOnly.cc
+ HdrToken.cc
+ HdrUtils.cc
+ HttpCompat.cc
+ MIME.cc
+ URL.cc
+ VersionConverter.cc
+ HuffmanCodec.cc
+ XPACK.cc
+)
+target_include_directories(hdrs PRIVATE
+ ${IOCORE_INCLUDE_DIRS}
+)
\ No newline at end of file
diff --git a/proxy/http/CMakeLists.txt b/proxy/http/CMakeLists.txt
new file mode 100644
index 0000000000..2aa2f2843d
--- /dev/null
+++ b/proxy/http/CMakeLists.txt
@@ -0,0 +1,49 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(http STATIC
+ HttpSessionAccept.cc
+ HttpBodyFactory.cc
+ HttpCacheSM.cc
+ Http1ClientSession.cc
+ Http1ClientTransaction.cc
+ Http1ServerTransaction.cc
+ HttpConfig.cc
+ HttpConnectionCount.cc
+ HttpDebugNames.cc
+ HttpPages.cc
+ HttpProxyServerMain.cc
+ HttpSM.cc
+ Http1ServerSession.cc
+ HttpSessionManager.cc
+ HttpTransact.cc
+ HttpTransactCache.cc
+ HttpTransactHeaders.cc
+ HttpTunnel.cc
+ ForwardedConfig.cc
+ PreWarmConfig.cc
+ PreWarmManager.cc
+)
+target_include_directories(http PRIVATE
+ ${IOCORE_INCLUDE_DIRS}
+ ${PROXY_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+ ${YAMLCPP_INCLUDE_DIR}
+)
+add_subdirectory(remap)
\ No newline at end of file
diff --git a/proxy/http/remap/CMakeLists.txt b/proxy/http/remap/CMakeLists.txt
new file mode 100644
index 0000000000..8fe9e01d9a
--- /dev/null
+++ b/proxy/http/remap/CMakeLists.txt
@@ -0,0 +1,44 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(http_remap STATIC
+ AclFiltering.cc
+ NextHopSelectionStrategy.cc
+ NextHopConsistentHash.cc
+ NextHopHealthStatus.cc
+ NextHopRoundRobin.cc
+ NextHopStrategyFactory.cc
+ RemapConfig.cc
+ RemapHitCount.cc
+ RemapPluginInfo.cc
+ PluginDso.cc
+ PluginFactory.cc
+ RemapPlugins.cc
+ RemapProcessor.cc
+ UrlMapping.cc
+ UrlMappingPathIndex.cc
+ UrlRewrite.cc
+)
+target_include_directories(http_remap PRIVATE
+ ${IOCORE_INCLUDE_DIRS}
+ ${PROXY_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+ ${CMAKE_SOURCE_DIR}/src/records
+ ${YAML_INCLUDE_DIRS}
+ )
diff --git a/proxy/http2/CMakeLists.txt b/proxy/http2/CMakeLists.txt
new file mode 100644
index 0000000000..6035a655a9
--- /dev/null
+++ b/proxy/http2/CMakeLists.txt
@@ -0,0 +1,37 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(http2 STATIC
+ HPACK.cc
+ HTTP2.cc
+ Http2Frame.cc
+ Http2ClientSession.cc
+ Http2CommonSession.cc
+ Http2ConnectionState.cc
+ Http2DebugNames.cc
+ Http2FrequencyCounter.cc
+ Http2Stream.cc
+ Http2SessionAccept.cc
+)
+target_include_directories(http2 PRIVATE
+ ${IOCORE_INCLUDE_DIRS}
+ ${PROXY_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+ ${YAMLCPP_INCLUDE_DIR}
+)
\ No newline at end of file
diff --git a/proxy/logging/CMakeLists.txt b/proxy/logging/CMakeLists.txt
new file mode 100644
index 0000000000..06e9f1691d
--- /dev/null
+++ b/proxy/logging/CMakeLists.txt
@@ -0,0 +1,42 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(logging STATIC
+ Log.cc
+ LogAccess.cc
+ LogBuffer.cc
+ LogConfig.cc
+ LogField.cc
+ LogFieldAliasMap.cc
+ LogFile.cc
+ LogFilter.cc
+ LogFormat.cc
+ LogObject.cc
+ LogUtils.cc
+ RolledLogDeleter.cc
+ YamlLogConfig.cc
+ YamlLogConfigDecoders.cc
+)
+target_include_directories(logging PRIVATE
+ ${IOCORE_INCLUDE_DIRS}
+ ${PROXY_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+ ${YAML_INCLUDE_DIRS}
+ ${SWOC_INCLUDE_DIR}
+)
\ No newline at end of file
diff --git a/proxy/shared/CMakeLists.txt b/proxy/shared/CMakeLists.txt
new file mode 100644
index 0000000000..f7b58d4ba6
--- /dev/null
+++ b/proxy/shared/CMakeLists.txt
@@ -0,0 +1,34 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(diagsconfig STATIC DiagsConfig.cc)
+target_include_directories(diagsconfig PRIVATE
+ ${IOCORE_INCLUDE_DIRS}
+ ${PROXY_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+ ${YAMLCPP_INCLUDE_DIR}
+)
+add_library(UglyLogStubs STATIC UglyLogStubs.cc)
+target_include_directories(UglyLogStubs PRIVATE
+ ${IOCORE_INCLUDE_DIRS}
+ ${PROXY_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+ ${YAMLCPP_INCLUDE_DIR}
+)
diff --git a/src/records/CMakeLists.txt b/src/records/CMakeLists.txt
new file mode 100644
index 0000000000..71a6b85276
--- /dev/null
+++ b/src/records/CMakeLists.txt
@@ -0,0 +1,59 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(records_lm STATIC
+ P_RecCore.cc
+ RecConfigParse.cc
+ RecCore.cc
+ RecDebug.cc
+ RecFile.cc
+ RecHttp.cc
+ RecMessage.cc
+ RecMutex.cc
+ RecRawStats.cc
+ RecUtils.cc
+ RecLocal.cc
+)
+target_include_directories(records_lm PRIVATE
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/api/include
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+ ${CMAKE_SOURCE_DIR}/iocore/eventsystem
+ ${CMAKE_SOURCE_DIR}/iocore/utils
+)
+
+add_library(records_p STATIC
+ P_RecCore.cc
+ RecConfigParse.cc
+ RecCore.cc
+ RecDebug.cc
+ RecFile.cc
+ RecHttp.cc
+ RecMessage.cc
+ RecMutex.cc
+ RecRawStats.cc
+ RecUtils.cc
+ RecProcess.cc
+ )
+target_include_directories(records_p PRIVATE
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/api/include
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+ ${CMAKE_SOURCE_DIR}/iocore/eventsystem
+ ${CMAKE_SOURCE_DIR}/iocore/utils
+ )
diff --git a/src/traffic_server/CMakeLists.txt b/src/traffic_server/CMakeLists.txt
new file mode 100644
index 0000000000..3a937ea296
--- /dev/null
+++ b/src/traffic_server/CMakeLists.txt
@@ -0,0 +1,57 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+add_executable(traffic_server
+ Crash.cc
+ EventName.cc
+ FetchSM.cc
+ HostStatus.cc
+ InkAPI.cc
+ InkIOCoreAPI.cc
+ SocksProxy.cc
+ traffic_server.cc
+ ${CMAKE_SOURCE_DIR}/src/shared/overridable_txn_vars.cc
+)
+target_include_directories(traffic_server PRIVATE
+ ${IOCORE_INCLUDE_DIRS}
+ ${PROXY_INCLUDE_DIRS}
+ ${CMAKE_SOURCE_DIR}/mgmt
+ ${CMAKE_SOURCE_DIR}/mgmt/utils
+)
+target_link_libraries(traffic_server
+ http
+ http_remap
+ http2
+ logging
+ hdrs
+ diagsconfig
+ mgmt_p
+ utils_p
+ inkutils
+ inkdns
+ inkhostdb
+ inkcache
+ fastlz
+ aio
+ tscore
+ tscpputil
+ proxy
+ inknet
+ records_p
+ inkevent
+ yaml-cpp
+ )
\ No newline at end of file
diff --git a/src/tscore/CMakeLists.txt b/src/tscore/CMakeLists.txt
new file mode 100644
index 0000000000..04d14f03ca
--- /dev/null
+++ b/src/tscore/CMakeLists.txt
@@ -0,0 +1,151 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+
+# This executable generates the parse rules that are included in ParseRules.cc
+# Add custom commands and dependencies to make sure this gets build and run before compiling libtscore
+add_executable(CompileParseRules CompileParseRules.cc)
+
+add_custom_command(
+ OUTPUT ParseRulesCType ParseRulesCTypeToUpper ParseRulesCTypeToLower
+ COMMAND CompileParseRules
+ COMMENT "Generating compile parse rules"
+)
+
+add_custom_target(ParseRules ALL DEPENDS ParseRulesCType ParseRulesCTypeToUpper ParseRulesCTypeToLower)
+
+add_library(tscore SHARED
+ AcidPtr.cc
+ Arena.cc
+ ArgParser.cc
+ BaseLogFile.cc
+ BufferWriterFormat.cc
+ ConsistentHash.cc
+ ContFlags.cc
+ CryptoHash.cc
+ DbgCtl.cc
+ Diags.cc
+ Errata.cc
+ EventNotify.cc
+ Extendible.cc
+ HKDF_openssl.cc
+ Hash.cc
+ HashFNV.cc
+ HashSip.cc
+ HostLookup.cc
+ InkErrno.cc
+ IpMap.cc
+ IpMapConf.cc
+ JeMiAllocator.cc
+ Layout.cc
+ LogMessage.cc
+ MMH.cc
+ MatcherUtils.cc
+ MemArena.cc
+ ParseRules.cc
+ Random.cc
+ RbTree.cc
+ Regex.cc
+ Regression.cc
+ SourceLocation.cc
+ TextBuffer.cc
+ Throttler.cc
+ Tokenizer.cc
+ Version.cc
+ X509HostnameValidator.cc
+ hugepages.cc
+ ink_args.cc
+ ink_assert.cc
+ ink_base64.cc
+ ink_cap.cc
+ ink_defs.cc
+ ink_error.cc
+ ink_file.cc
+ ink_hrtime.cc
+ ink_hw.cc
+ ink_inet.cc
+ ink_memory.cc
+ ink_mutex.cc
+ ink_queue.cc
+ ink_queue_utils.cc
+ ink_rand.cc
+ ink_res_init.cc
+ ink_res_mkquery.cc
+ ink_resource.cc
+ ink_rwlock.cc
+ ink_sock.cc
+ ink_sprintf.cc
+ ink_stack_trace.cc
+ ink_string++.cc
+ ink_string.cc
+ ink_sys_control.cc
+ ink_syslog.cc
+ ink_thread.cc
+ ink_time.cc
+ ink_uuid.cc
+ llqueue.cc
+ lockfile.cc
+ runroot.cc
+ signals.cc
+ ts_file.cc
+)
+add_dependencies(tscore ParseRules tscpputil)
+target_include_directories(tscore PRIVATE
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${YAML_INCLUDE_DIRS}
+)
+target_link_libraries(tscore ${PCRE_LIBRARIES} ${OPENSSL_LIBRARIES} yaml-cpp::yaml-cpp tscpputil resolv)
+
+add_executable(test_tscore
+ unit_tests/test_AcidPtr.cc
+ unit_tests/test_ArgParser.cc
+ unit_tests/test_BufferWriter.cc
+ unit_tests/test_BufferWriterFormat.cc
+ unit_tests/test_CryptoHash.cc
+ unit_tests/test_Errata.cc
+ unit_tests/test_Extendible.cc
+ unit_tests/test_HKDF.cc
+ unit_tests/test_Histogram.cc
+ unit_tests/test_History.cc
+ unit_tests/test_IntrusiveHashMap.cc
+ unit_tests/test_IntrusivePtr.cc
+ unit_tests/test_IpMap.cc
+ unit_tests/test_List.cc
+ unit_tests/test_MMH.cc
+ unit_tests/test_MT_hashtable.cc
+ unit_tests/test_MemArena.cc
+ unit_tests/test_ParseRules.cc
+ unit_tests/test_PluginUserArgs.cc
+ unit_tests/test_PriorityQueue.cc
+ unit_tests/test_Ptr.cc
+ unit_tests/test_Random.cc
+ unit_tests/test_Regex.cc
+ unit_tests/test_Scalar.cc
+ unit_tests/test_Throttler.cc
+ unit_tests/test_Tokenizer.cc
+ unit_tests/test_Version.cc
+ unit_tests/test_arena.cc
+ unit_tests/test_ink_inet.cc
+ unit_tests/test_ink_memory.cc
+ unit_tests/test_layout.cc
+ unit_tests/test_scoped_resource.cc
+ unit_tests/test_ts_file.cc
+ unit_tests/unit_test_main.cc
+)
+target_link_libraries(test_tscore PRIVATE tscore inkevent)
+target_include_directories(test_tscore PRIVATE ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/iocore/eventsystem ${CATCH_INCLUDE_DIR})
\ No newline at end of file
diff --git a/src/tscore/unit_tests/test_Extendible.cc b/src/tscore/unit_tests/test_Extendible.cc
index c91edfe61e..7222aea083 100644
--- a/src/tscore/unit_tests/test_Extendible.cc
+++ b/src/tscore/unit_tests/test_Extendible.cc
@@ -117,9 +117,6 @@ TEST_CASE("Create A", "")
ext::details::areFieldsFinalized() = true;
a_ptr = ext::create<A>();
CHECK(Extendible<A>::schema.no_instances() == false);
-}
-TEST_CASE("Delete A", "")
-{
delete a_ptr;
CHECK(Extendible<A>::schema.no_instances());
}
@@ -127,9 +124,6 @@ TEST_CASE("Create B", "")
{
a_ptr = ext::create<B>();
CHECK(Extendible<A>::schema.no_instances() == false);
-}
-TEST_CASE("Delete B", "")
-{
delete a_ptr;
CHECK(Extendible<A>::schema.no_instances());
}
diff --git a/src/tscpp/util/CMakeLists.txt b/src/tscpp/util/CMakeLists.txt
new file mode 100644
index 0000000000..567ce9bc5e
--- /dev/null
+++ b/src/tscpp/util/CMakeLists.txt
@@ -0,0 +1,33 @@
+#######################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+#######################
+
+
+add_library(tscpputil SHARED
+ string_view_util.cc
+ TextView.cc)
+
+add_executable(test_tscpputil
+ unit_tests/test_LocalBuffer.cc
+ unit_tests/test_MemSpan.cc
+ unit_tests/test_PostScript.cc
+ unit_tests/test_TextView.cc
+ unit_tests/test_Strerror.cc
+ unit_tests/test_ts_meta.cc
+ unit_tests/unit_test_main.cc
+ )
+target_link_libraries(test_tscpputil PRIVATE tscpputil)
+target_include_directories(test_tscpputil PRIVATE ${CMAKE_SOURCE_DIR}/include ${CATCH_INCLUDE_DIR})
\ No newline at end of file