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/22 15:57:58 UTC

[trafficserver] branch master updated: Build traffic_layout in CMake build (#9895)

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 e787a1c86a Build traffic_layout in CMake build (#9895)
e787a1c86a is described below

commit e787a1c86a5660edb8a2554b1d5457cdb8390a70
Author: JosiahWI <41...@users.noreply.github.com>
AuthorDate: Thu Jun 22 10:57:52 2023 -0500

    Build traffic_layout in CMake build (#9895)
    
    This allows us to run autests (which are broken with the CMake build!).
---
 CMakeLists.txt                    |  1 +
 src/records/CMakeLists.txt        |  2 +-
 src/traffic_layout/CMakeLists.txt | 48 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 50 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d0ca6a924f..87852717ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -327,6 +327,7 @@ add_subdirectory(mgmt/config)
 add_subdirectory(mgmt/rpc)
 add_subdirectory(src/traffic_server)
 add_subdirectory(src/traffic_ctl)
+add_subdirectory(src/traffic_layout)
 if(ENABLE_WCCP)
     add_subdirectory(src/wccp)
     add_subdirectory(src/traffic_wccp)
diff --git a/src/records/CMakeLists.txt b/src/records/CMakeLists.txt
index 2425082b7c..a414e60b0b 100644
--- a/src/records/CMakeLists.txt
+++ b/src/records/CMakeLists.txt
@@ -35,11 +35,11 @@ add_library(ts::records_p ALIAS records_p)
 target_include_directories(records_p
     PUBLIC
         "${PROJECT_SOURCE_DIR}/include"
+        "${CMAKE_SOURCE_DIR}/iocore/eventsystem"
     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_layout/CMakeLists.txt b/src/traffic_layout/CMakeLists.txt
new file mode 100644
index 0000000000..c2380f2202
--- /dev/null
+++ b/src/traffic_layout/CMakeLists.txt
@@ -0,0 +1,48 @@
+#
+#  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_layout
+    engine.cc
+    file_system.cc
+    info.cc
+    traffic_layout.cc
+)
+
+target_include_directories(traffic_layout
+    PRIVATE
+        ${OPENSSL_INCLUDE_DIRS}
+)
+
+target_link_libraries(traffic_layout
+    PRIVATE
+        ts::inkevent
+        ${OPENSSL_LIBRARY}
+        ts::records_p
+        yaml-cpp::yaml-cpp
+)
+
+if(TS_USE_HWLOC)
+    target_link_libraries(traffic_layout PRIVATE hwloc::hwloc)
+endif()
+
+if(HAVE_LZMA_H)
+    target_link_libraries(traffic_layout PRIVATE LibLZMA::LibLZMA)
+endif()
+
+if(HAVE_BROTLI_ENCODE_H)
+    target_link_libraries(traffic_layout PRIVATE brotli::brotlienc)
+endif()