Skip to content

lhttp WIP #565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions proxygen/external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,38 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

# Add lhttp library
add_library(
proxygen_lhttp OBJECT
lhttp/api.c
lhttp/http.c
lhttp/llhttp.c
)

target_compile_options(
proxygen_lhttp PRIVATE
${_PROXYGEN_COMMON_COMPILE_OPTIONS}
)

if (BUILD_SHARED_LIBS)
set_property(TARGET proxygen_lhttp PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()

target_include_directories(
proxygen_lhttp PRIVATE
${PROXYGEN_FBCODE_ROOT}
${CMAKE_CURRENT_SOURCE_DIR}/lhttp
)

# Add http_parser URL parsing functionality
add_library(
proxygen_http_parser OBJECT
http_parser/http_parser_cpp.cpp
http_parser/http_parser_url.cpp
)

target_compile_options(
proxygen_http_parser PRIVATE
${_PROXYGEN_COMMON_COMPILE_OPTIONS}
"-DHTTP_PARSER_STRICT_URL=1"
"-Wno-implicit-fallthrough"
)

if (BUILD_SHARED_LIBS)
Expand All @@ -24,5 +46,9 @@ target_include_directories(
proxygen_http_parser PRIVATE
${PROXYGEN_FBCODE_ROOT}
)

# Install headers
install(FILES http_parser/http_parser.h DESTINATION
include/proxygen/external/http_parser)
install(FILES lhttp/api.h DESTINATION
include/proxygen/external/lhttp)
Loading
Loading