Commit a98e704a authored by Sophie Wenzel-Teuber's avatar Sophie Wenzel-Teuber
Browse files

external/proxygen: Update Proxygen to v2021.10.11.00

parents b99e0f3d 6e8a68ce
on:
push:
tags:
# Only match TagIt tags, which always start with this prefix
- 'v20*'
name: TagIt
jobs:
build:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Archive project
id: archive_project
run: |
FILE_NAME=${GITHUB_REPOSITORY#*/}-${GITHUB_REF##*/}
git archive ${{ github.ref }} -o ${FILE_NAME}.zip
git archive ${{ github.ref }} -o ${FILE_NAME}.tar.gz
echo "::set-output name=file_name::${FILE_NAME}"
- name: Compute digests
id: compute_digests
run: |
echo "::set-output name=tgz_256::$(openssl dgst -sha256 ${{ steps.archive_project.outputs.file_name }}.tar.gz)"
echo "::set-output name=tgz_512::$(openssl dgst -sha512 ${{ steps.archive_project.outputs.file_name }}.tar.gz)"
echo "::set-output name=zip_256::$(openssl dgst -sha256 ${{ steps.archive_project.outputs.file_name }}.zip)"
echo "::set-output name=zip_512::$(openssl dgst -sha512 ${{ steps.archive_project.outputs.file_name }}.zip)"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
Automated release from TagIt
<details>
<summary>File Hashes</summary>
<ul>
<li>${{ steps.compute_digests.outputs.zip_256 }}</li>
<li>${{ steps.compute_digests.outputs.zip_512 }}</li>
<li>${{ steps.compute_digests.outputs.tgz_256 }}</li>
<li>${{ steps.compute_digests.outputs.tgz_512 }}</li>
</ul>
</details>
draft: false
prerelease: false
- name: Upload zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ steps.archive_project.outputs.file_name }}.zip
asset_name: ${{ steps.archive_project.outputs.file_name }}.zip
asset_content_type: application/zip
- name: Upload tar.gz
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ steps.archive_project.outputs.file_name }}.tar.gz
asset_name: ${{ steps.archive_project.outputs.file_name }}.tar.gz
asset_content_type: application/gzip
......@@ -15,95 +15,101 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Install system deps
run: sudo python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive proxygen
- name: Fetch zlib
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests zlib
- name: Fetch boost
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests boost
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests boost
- name: Fetch ninja
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests ninja
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests ninja
- name: Fetch cmake
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests cmake
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests cmake
- name: Fetch double-conversion
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests double-conversion
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests double-conversion
- name: Fetch fmt
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fmt
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests fmt
- name: Fetch gflags
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests gflags
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests gflags
- name: Fetch glog
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests glog
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests glog
- name: Fetch googletest
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests googletest
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests googletest
- name: Fetch libevent
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libevent
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests libevent
- name: Fetch lz4
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests lz4
- name: Fetch snappy
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests snappy
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests snappy
- name: Fetch zstd
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests zstd
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests zstd
- name: Fetch folly
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests folly
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests folly
- name: Fetch autoconf
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests autoconf
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests autoconf
- name: Fetch automake
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests automake
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests automake
- name: Fetch libtool
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libtool
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests libtool
- name: Fetch gperf
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests gperf
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests gperf
- name: Fetch libsodium
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libsodium
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests libsodium
- name: Fetch fizz
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fizz
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests fizz
- name: Fetch mvfst
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests mvfst
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests mvfst
- name: Fetch wangle
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests wangle
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests wangle
- name: Build zlib
run: python3 build/fbcode_builder/getdeps.py build --no-tests zlib
- name: Build boost
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests boost
run: python3 build/fbcode_builder/getdeps.py build --no-tests boost
- name: Build ninja
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests ninja
run: python3 build/fbcode_builder/getdeps.py build --no-tests ninja
- name: Build cmake
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests cmake
run: python3 build/fbcode_builder/getdeps.py build --no-tests cmake
- name: Build double-conversion
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests double-conversion
run: python3 build/fbcode_builder/getdeps.py build --no-tests double-conversion
- name: Build fmt
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests fmt
run: python3 build/fbcode_builder/getdeps.py build --no-tests fmt
- name: Build gflags
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests gflags
run: python3 build/fbcode_builder/getdeps.py build --no-tests gflags
- name: Build glog
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests glog
run: python3 build/fbcode_builder/getdeps.py build --no-tests glog
- name: Build googletest
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests googletest
run: python3 build/fbcode_builder/getdeps.py build --no-tests googletest
- name: Build libevent
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libevent
run: python3 build/fbcode_builder/getdeps.py build --no-tests libevent
- name: Build lz4
run: python3 build/fbcode_builder/getdeps.py build --no-tests lz4
- name: Build snappy
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests snappy
run: python3 build/fbcode_builder/getdeps.py build --no-tests snappy
- name: Build zstd
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests zstd
run: python3 build/fbcode_builder/getdeps.py build --no-tests zstd
- name: Build folly
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests folly
run: python3 build/fbcode_builder/getdeps.py build --no-tests folly
- name: Build autoconf
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests autoconf
run: python3 build/fbcode_builder/getdeps.py build --no-tests autoconf
- name: Build automake
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests automake
run: python3 build/fbcode_builder/getdeps.py build --no-tests automake
- name: Build libtool
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libtool
run: python3 build/fbcode_builder/getdeps.py build --no-tests libtool
- name: Build gperf
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests gperf
run: python3 build/fbcode_builder/getdeps.py build --no-tests gperf
- name: Build libsodium
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libsodium
run: python3 build/fbcode_builder/getdeps.py build --no-tests libsodium
- name: Build fizz
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests fizz
run: python3 build/fbcode_builder/getdeps.py build --no-tests fizz
- name: Build mvfst
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests mvfst
run: python3 build/fbcode_builder/getdeps.py build --no-tests mvfst
- name: Build wangle
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests wangle
run: python3 build/fbcode_builder/getdeps.py build --no-tests wangle
- name: Build proxygen
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. proxygen --project-install-prefix proxygen:/usr/local
run: python3 build/fbcode_builder/getdeps.py build --src-dir=. proxygen --project-install-prefix proxygen:/usr/local
- name: Copy artifacts
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fixup-dyn-deps --strip --src-dir=. proxygen _artifacts/linux --project-install-prefix proxygen:/usr/local --final-install-prefix /usr/local
run: python3 build/fbcode_builder/getdeps.py fixup-dyn-deps --strip --src-dir=. proxygen _artifacts/linux --project-install-prefix proxygen:/usr/local --final-install-prefix /usr/local
- uses: actions/upload-artifact@master
with:
name: proxygen
path: _artifacts
- name: Test proxygen
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. proxygen --project-install-prefix proxygen:/usr/local
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. proxygen --project-install-prefix proxygen:/usr/local
......@@ -15,99 +15,105 @@ jobs:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: Install system deps
run: sudo python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive proxygen
- name: Fetch zlib
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests zlib
- name: Fetch boost
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests boost
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests boost
- name: Fetch openssl
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests openssl
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests openssl
- name: Fetch ninja
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests ninja
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests ninja
- name: Fetch cmake
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests cmake
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests cmake
- name: Fetch double-conversion
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests double-conversion
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests double-conversion
- name: Fetch fmt
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fmt
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests fmt
- name: Fetch gflags
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests gflags
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests gflags
- name: Fetch glog
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests glog
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests glog
- name: Fetch googletest
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests googletest
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests googletest
- name: Fetch libevent
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libevent
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests libevent
- name: Fetch lz4
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests lz4
- name: Fetch snappy
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests snappy
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests snappy
- name: Fetch zstd
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests zstd
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests zstd
- name: Fetch folly
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests folly
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests folly
- name: Fetch autoconf
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests autoconf
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests autoconf
- name: Fetch automake
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests automake
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests automake
- name: Fetch libtool
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libtool
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests libtool
- name: Fetch gperf
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests gperf
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests gperf
- name: Fetch libsodium
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libsodium
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests libsodium
- name: Fetch fizz
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fizz
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests fizz
- name: Fetch mvfst
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests mvfst
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests mvfst
- name: Fetch wangle
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests wangle
run: python3 build/fbcode_builder/getdeps.py fetch --no-tests wangle
- name: Build zlib
run: python3 build/fbcode_builder/getdeps.py build --no-tests zlib
- name: Build boost
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests boost
run: python3 build/fbcode_builder/getdeps.py build --no-tests boost
- name: Build openssl
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests openssl
run: python3 build/fbcode_builder/getdeps.py build --no-tests openssl
- name: Build ninja
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests ninja
run: python3 build/fbcode_builder/getdeps.py build --no-tests ninja
- name: Build cmake
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests cmake
run: python3 build/fbcode_builder/getdeps.py build --no-tests cmake
- name: Build double-conversion
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests double-conversion
run: python3 build/fbcode_builder/getdeps.py build --no-tests double-conversion
- name: Build fmt
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests fmt
run: python3 build/fbcode_builder/getdeps.py build --no-tests fmt
- name: Build gflags
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests gflags
run: python3 build/fbcode_builder/getdeps.py build --no-tests gflags
- name: Build glog
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests glog
run: python3 build/fbcode_builder/getdeps.py build --no-tests glog
- name: Build googletest
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests googletest
run: python3 build/fbcode_builder/getdeps.py build --no-tests googletest
- name: Build libevent
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libevent
run: python3 build/fbcode_builder/getdeps.py build --no-tests libevent
- name: Build lz4
run: python3 build/fbcode_builder/getdeps.py build --no-tests lz4
- name: Build snappy
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests snappy
run: python3 build/fbcode_builder/getdeps.py build --no-tests snappy
- name: Build zstd
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests zstd
run: python3 build/fbcode_builder/getdeps.py build --no-tests zstd
- name: Build folly
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests folly
run: python3 build/fbcode_builder/getdeps.py build --no-tests folly
- name: Build autoconf
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests autoconf
run: python3 build/fbcode_builder/getdeps.py build --no-tests autoconf
- name: Build automake
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests automake
run: python3 build/fbcode_builder/getdeps.py build --no-tests automake
- name: Build libtool
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libtool
run: python3 build/fbcode_builder/getdeps.py build --no-tests libtool
- name: Build gperf
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests gperf
run: python3 build/fbcode_builder/getdeps.py build --no-tests gperf
- name: Build libsodium
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libsodium
run: python3 build/fbcode_builder/getdeps.py build --no-tests libsodium
- name: Build fizz
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests fizz
run: python3 build/fbcode_builder/getdeps.py build --no-tests fizz
- name: Build mvfst
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests mvfst
run: python3 build/fbcode_builder/getdeps.py build --no-tests mvfst
- name: Build wangle
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests wangle
run: python3 build/fbcode_builder/getdeps.py build --no-tests wangle
- name: Build proxygen
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. proxygen --project-install-prefix proxygen:/usr/local
run: python3 build/fbcode_builder/getdeps.py build --src-dir=. proxygen --project-install-prefix proxygen:/usr/local
- name: Copy artifacts
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fixup-dyn-deps --src-dir=. proxygen _artifacts/mac --project-install-prefix proxygen:/usr/local --final-install-prefix /usr/local
run: python3 build/fbcode_builder/getdeps.py fixup-dyn-deps --src-dir=. proxygen _artifacts/mac --project-install-prefix proxygen:/usr/local --final-install-prefix /usr/local
- uses: actions/upload-artifact@master
with:
name: proxygen
path: _artifacts
- name: Test proxygen
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. proxygen --project-install-prefix proxygen:/usr/local
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. proxygen --project-install-prefix proxygen:/usr/local
......@@ -24,3 +24,7 @@ _build/
# common editor artifacts
*~
*.vscode*
# Generated document
html/
latex/
# Licensed 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.
# Facebook projects that use `fbcode_builder` for continuous integration
# share this Travis configuration to run builds via Docker.
......
......@@ -11,6 +11,10 @@ project(
proxygen
)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
# for in-fbsource builds
......@@ -19,6 +23,16 @@ set(CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/build/fbcode_builder/CMake"
${CMAKE_MODULE_PATH})
option(BUILD_SHARED_LIBS
"If enabled, build proxygen as a shared library. \
This is generally discouraged, since proxygen does not commit to having \
a stable ABI."
OFF
)
# Mark BUILD_SHARED_LIBS as an "advanced" option, since enabling it
# is generally discouraged.
mark_as_advanced(BUILD_SHARED_LIBS)
include(FBBuildOptions)
fb_activate_static_library_option()
......@@ -34,7 +48,7 @@ set(PROXYGEN_GENERATED_ROOT ${CMAKE_CURRENT_BINARY_DIR}/generated)
file(MAKE_DIRECTORY ${PROXYGEN_GENERATED_ROOT})
# Build-time program requirements.
find_program(PROXYGEN_PYTHON python)
find_program(PROXYGEN_PYTHON python3)
if(NOT PROXYGEN_PYTHON)
message(FATAL_ERROR "python is required for the proxygen build")
endif()
......@@ -45,11 +59,17 @@ if(NOT PROXYGEN_GPERF)
endif()
# Dependencies
#
# IMPORTANT: If you change this, make the analogous update in:
# cmake/proxygen-config.cmake.in
find_package(fmt REQUIRED)
find_package(folly REQUIRED)
find_package(wangle REQUIRED)
find_package(Fizz REQUIRED)
find_package(mvfst QUIET)
if (BUILD_QUIC)
find_package(mvfst REQUIRED)
else()
find_package(Fizz REQUIRED)
endif()
find_package(Zstd REQUIRED)
find_package(ZLIB REQUIRED)
find_package(OpenSSL REQUIRED)
......@@ -68,7 +88,6 @@ find_package(Boost 1.58 REQUIRED
list(APPEND
_PROXYGEN_COMMON_COMPILE_OPTIONS
-std=c++14
-Wall
-Wextra
)
......@@ -128,21 +147,29 @@ include(ProxygenTest)
add_subdirectory(proxygen)
if (NOT DEFINED LIB_INSTALL_DIR)
set(LIB_INSTALL_DIR "lib")
endif()
if (NOT DEFINED CMAKE_INSTALL_DIR)
set(CMAKE_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/proxygen/")
endif()
install(
EXPORT proxygen-exports
FILE proxygen-targets.cmake
NAMESPACE proxygen::
DESTINATION lib/cmake/proxygen/
DESTINATION ${CMAKE_INSTALL_DIR}
)
include(CMakePackageConfigHelpers)
configure_package_config_file(
cmake/proxygen-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/proxygen-config.cmake
INSTALL_DESTINATION lib/cmake/proxygen/
INSTALL_DESTINATION ${CMAKE_INSTALL_DIR}
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/proxygen-config.cmake
DESTINATION lib/cmake/proxygen/
DESTINATION ${CMAKE_INSTALL_DIR}
)
# uninstall target
......
......@@ -12,7 +12,7 @@ requests are cherry-picked into our repo and then pushed back out.
## Pull Requests
We actively welcome your pull requests.
1. Fork the repo and create your branch from `master`.
1. Fork the repo and create your branch from `main`.
1. If you've added code that should be tested, add tests
1. If you've changed APIs, update the documentation.
1. Ensure the test suite passes.
......
## Proxygen: Facebook's C++ HTTP Libraries
[![Build Status](https://github.com/facebook/proxygen/workflows/CI/badge.svg)](https://github.com/facebook/proxygen/actions?workflow=CI)
[![Linux Build Status](https://github.com/facebook/proxygen/workflows/linux/badge.svg)](https://github.com/facebook/proxygen/actions?workflow=linux)
[![macOS Build Status](https://github.com/facebook/proxygen/workflows/mac/badge.svg)](https://github.com/facebook/proxygen/actions?workflow=mac)
This project comprises the core C++ HTTP abstractions used at
Facebook. Internally, it is used as the basis for building many HTTP
......@@ -147,7 +148,7 @@ knobs to tune both the quic transport and the http layer.
### Documentation
We use Doxygen for Proxygen's internal documentation. You can generate a
copy of these docs by running `Doxygen Doxyfile` from the project
copy of these docs by running `doxygen Doxyfile` from the project
root. You'll want to look at `html/namespaceproxygen.html` to start. This
will also generate `folly` documentation.
......
Subproject commit 2c9b2aadbc0801ee3309934f9e37c8a01ed51d20
Subproject commit c47d0c778950043cbbc6af7fde616e9aeaf054ca
Subproject commit 5b3422af1d0fa559c049d6f414542147544a60c7
Subproject commit ec3171c57708f254461e593eb41c9481233396a7
Subproject commit 8a6c4415899d198cefe97f3443ede922aac9e2fc
Subproject commit 37f1079eb3050e7209cb78921244c61817373d52
Subproject commit 20c2ee07f2c90101cde6f6266fbf50d6632fa216
Subproject commit ae4494720db589eb2a45fb69c569a214e676430d
......@@ -6,6 +6,4 @@
# to these shared compiler settings in order to avoid accidentally
# breaking a build in another project!
set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra -Wno-deprecated -Wno-deprecated-declarations")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_COMMON}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON} -O3")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -Wno-deprecated -Wno-deprecated-declarations")
......@@ -127,8 +127,14 @@ function(add_fbthrift_cpp_library LIB_NAME THRIFT_FILE)
)
# Now emit the library rule to compile the sources
if (BUILD_SHARED_LIBS)
set(LIB_TYPE SHARED)
else ()
set(LIB_TYPE STATIC)
endif ()
add_library(
"${LIB_NAME}" STATIC
"${LIB_NAME}" ${LIB_TYPE}
${generated_sources}
)
......
......@@ -41,6 +41,16 @@ if (gflags_FOUND)
# Re-export the config-specified libs with our local names
set(LIBGFLAGS_LIBRARY ${gflags_LIBRARIES})
set(LIBGFLAGS_INCLUDE_DIR ${gflags_INCLUDE_DIR})
if(NOT EXISTS "${gflags_INCLUDE_DIR}")
# The gflags-devel RPM on recent RedHat-based systems is somewhat broken.
# RedHat symlinks /lib64 to /usr/lib64, and this breaks some of the
# relative path computation performed in gflags-config.cmake. The package
# config file ends up being found via /lib64, but the relative path
# computation it does only works if it was found in /usr/lib64.
# If gflags_INCLUDE_DIR does not actually exist, simply default it to
# /usr/include on these systems.
set(LIBGFLAGS_INCLUDE_DIR "/usr/include")
endif()
set(LIBGFLAGS_FOUND ${gflags_FOUND})
# cmake module compat
set(GFLAGS_FOUND ${gflags_FOUND})
......@@ -76,6 +86,20 @@ endif()
# Compat with the gflags CONFIG based detection
if (LIBGFLAGS_FOUND AND NOT TARGET gflags)
add_library(gflags UNKNOWN IMPORTED)
set_target_properties(gflags PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBGFLAGS_INCLUDE_DIR}")
set_target_properties(gflags PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION "${LIBGFLAGS_LIBRARY}")
if(TARGET gflags-shared)
# If the installed gflags CMake package config defines a gflags-shared
# target but not gflags, just make the gflags target that we define
# depend on the gflags-shared target.
target_link_libraries(gflags INTERFACE gflags-shared)
# Export LIBGFLAGS_LIBRARY as the gflags-shared target in this case.
set(LIBGFLAGS_LIBRARY gflags-shared)
else()
set_target_properties(
gflags
PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${LIBGFLAGS_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBGFLAGS_INCLUDE_DIR}"
)