JosiahWI commented on code in PR #10037: URL: https://github.com/apache/trafficserver/pull/10037#discussion_r1263689258
########## plugins/experimental/cookie_remap/CMakeLists.txt: ########## @@ -0,0 +1,50 @@ +####################### +# +# 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. +# +####################### + +project(cookie_remap) + +add_atsplugin(cookie_remap + cookie_remap.cc + cookiejar.cc + strip.cc +) + +target_include_directories(cookie_remap PRIVATE "${PROJECT_SOURCE_DIR}/include") + +target_link_libraries(cookie_remap + PRIVATE + "${YAMLCPP_INCLUDE_DIR}" +) + +if(BUILD_TESTING) + add_executable(test_cookiejar + test_cookiejar.cc + strip.cc + cookiejar.cc + ) + + target_include_directories( + test_cookiejar + PRIVATE + "${CATCH_INCLUDE_DIR}" Review Comment: Redundant. ########## plugins/experimental/access_control/unit_tests/CMakeLists.txt: ########## @@ -0,0 +1,35 @@ +####################### +# +# 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(test_access_control + test_access_control.cc + test_utils.cc + "${PROJECT_SOURCE_DIR}/access_control.cc" + "${PROJECT_SOURCE_DIR}/common.cc" + "${PROJECT_SOURCE_DIR}/utils.cc" +) + +target_include_directories(test_access_control PRIVATE "${PROJECT_SOURCE_DIR}") +target_link_libraries(test_access_control + PRIVATE + ts::tscore + "${OPENSSL_SSL_LIBRARY}" + catch2::catch2 +) +target_compile_definitions(test_access_control PRIVATE ACCESS_CONTROL_UNIT_TEST) + +add_test(NAME test_access_control COMMAND test_traffic_dump) Review Comment: ```suggestion add_test(NAME test_access_control COMMAND test_access_control) ``` ########## plugins/experimental/access_control/CMakeLists.txt: ########## @@ -0,0 +1,40 @@ +####################### +# +# 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. +# +####################### + +project(access_control) + +add_atsplugin(access_control + access_control.cc + common.cc + config.cc + headers.cc + pattern.cc + plugin.cc + utils.cc +) + +target_include_directories(access_control PRIVATE "${PROJECT_SOURCE_DIR}/include") Review Comment: Needs to be relative to the parent CMake project. ########## plugins/experimental/access_control/unit_tests/CMakeLists.txt: ########## @@ -0,0 +1,35 @@ +####################### +# +# 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(test_access_control + test_access_control.cc + test_utils.cc + "${PROJECT_SOURCE_DIR}/access_control.cc" + "${PROJECT_SOURCE_DIR}/common.cc" + "${PROJECT_SOURCE_DIR}/utils.cc" +) + +target_include_directories(test_access_control PRIVATE "${PROJECT_SOURCE_DIR}") +target_link_libraries(test_access_control + PRIVATE + ts::tscore + "${OPENSSL_SSL_LIBRARY}" + catch2::catch2 +) Review Comment: Needs both openssl libraries (`OPENSSL_LIBRARIES`) and `OPENSSL_INCLUDE_DIRS` needs to be added to the target include directories. ########## plugins/experimental/access_control/CMakeLists.txt: ########## @@ -0,0 +1,40 @@ +####################### +# +# 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. +# +####################### + +project(access_control) + +add_atsplugin(access_control + access_control.cc + common.cc + config.cc + headers.cc + pattern.cc + plugin.cc + utils.cc +) + +target_include_directories(access_control PRIVATE "${PROJECT_SOURCE_DIR}/include") + +target_link_libraries(access_control + PRIVATE + "${PCRE_LIBRARY}" + "${OPENSSL_SSL_LIBRARY}" +) Review Comment: Needs both OpenSSL libraries (`OPENSSL_LIBRARIES`) and `OPENSSL_INCLUDE_DIRS` and `PCRE_INCLUDE_DIRS` need to be added to the target include directories. ########## plugins/experimental/cookie_remap/CMakeLists.txt: ########## @@ -0,0 +1,50 @@ +####################### +# +# 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. +# +####################### + +project(cookie_remap) + +add_atsplugin(cookie_remap + cookie_remap.cc + cookiejar.cc + strip.cc +) + +target_include_directories(cookie_remap PRIVATE "${PROJECT_SOURCE_DIR}/include") Review Comment: Needs to be relative to the parent CMake project. ########## plugins/experimental/cert_reporting_tool/CMakeLists.txt: ########## @@ -0,0 +1,28 @@ +####################### +# +# 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. +# +####################### + +project(cert_reporting_tool) + +add_atsplugin(cert_reporting_tool cert_reporting_tool.cc) + +target_include_directories(cert_reporting_tool PRIVATE "${PROJECT_SOURCE_DIR}/include") + +target_link_libraries(cert_reporting_tool + PRIVATE + libswoc Review Comment: Why does it need libswoc? ########## plugins/experimental/cert_reporting_tool/CMakeLists.txt: ########## @@ -0,0 +1,28 @@ +####################### +# +# 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. +# +####################### + +project(cert_reporting_tool) + +add_atsplugin(cert_reporting_tool cert_reporting_tool.cc) + +target_include_directories(cert_reporting_tool PRIVATE "${PROJECT_SOURCE_DIR}/include") Review Comment: Needs to be relative to the parent CMake project. ########## plugins/experimental/cookie_remap/CMakeLists.txt: ########## @@ -0,0 +1,50 @@ +####################### +# +# 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. +# +####################### + +project(cookie_remap) + +add_atsplugin(cookie_remap + cookie_remap.cc + cookiejar.cc + strip.cc +) + +target_include_directories(cookie_remap PRIVATE "${PROJECT_SOURCE_DIR}/include") + +target_link_libraries(cookie_remap + PRIVATE + "${YAMLCPP_INCLUDE_DIR}" Review Comment: Does this compile? I wonder what the linker does with an include path on the link line? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
