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

external/folly: Update Folly to v2021.10.11.00

parents 8ee724a5 773a9537
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,59 +15,61 @@ 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 folly
- 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: 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 --src-dir=. folly --project-install-prefix folly:/usr/local
run: python3 build/fbcode_builder/getdeps.py build --src-dir=. folly --project-install-prefix folly:/usr/local
- name: Copy artifacts
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fixup-dyn-deps --strip --src-dir=. folly _artifacts/linux --project-install-prefix folly:/usr/local --final-install-prefix /usr/local
run: python3 build/fbcode_builder/getdeps.py fixup-dyn-deps --strip --src-dir=. folly _artifacts/linux --project-install-prefix folly:/usr/local --final-install-prefix /usr/local
- uses: actions/upload-artifact@master
with:
name: folly
path: _artifacts
- name: Test folly
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. folly --project-install-prefix folly:/usr/local
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. folly --project-install-prefix folly:/usr/local
......@@ -15,63 +15,65 @@ 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 folly
- 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: 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 --src-dir=. folly --project-install-prefix folly:/usr/local
run: python3 build/fbcode_builder/getdeps.py build --src-dir=. folly --project-install-prefix folly:/usr/local
- name: Copy artifacts
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages fixup-dyn-deps --src-dir=. folly _artifacts/mac --project-install-prefix folly:/usr/local --final-install-prefix /usr/local
run: python3 build/fbcode_builder/getdeps.py fixup-dyn-deps --src-dir=. folly _artifacts/mac --project-install-prefix folly:/usr/local --final-install-prefix /usr/local
- uses: actions/upload-artifact@master
with:
name: folly
path: _artifacts
- name: Test folly
run: python3 build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. folly --project-install-prefix folly:/usr/local
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. folly --project-install-prefix folly:/usr/local
......@@ -16,73 +16,77 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Export boost environment
run: "echo ::set-env name=BOOST_ROOT::%BOOST_ROOT_1_69_0%"
run: "echo BOOST_ROOT=%BOOST_ROOT_1_69_0% >> %GITHUB_ENV%"
shell: cmd
- name: Fix Git config
run: git config --system core.longpaths true
- name: Fetch boost
run: python build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests boost
run: python build/fbcode_builder/getdeps.py fetch --no-tests boost
- name: Fetch perl
run: python build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests perl
run: python build/fbcode_builder/getdeps.py fetch --no-tests perl
- name: Fetch openssl
run: python build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests openssl
run: python build/fbcode_builder/getdeps.py fetch --no-tests openssl
- name: Fetch ninja
run: python build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests ninja
run: python build/fbcode_builder/getdeps.py fetch --no-tests ninja
- name: Fetch cmake
run: python build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests cmake
run: python build/fbcode_builder/getdeps.py fetch --no-tests cmake
- name: Fetch double-conversion
run: python build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests double-conversion
run: python build/fbcode_builder/getdeps.py fetch --no-tests double-conversion
- name: Fetch fmt
run: python build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fmt
run: python build/fbcode_builder/getdeps.py fetch --no-tests fmt
- name: Fetch gflags
run: python build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests gflags
run: python build/fbcode_builder/getdeps.py fetch --no-tests gflags
- name: Fetch glog
run: python build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests glog
run: python build/fbcode_builder/getdeps.py fetch --no-tests glog
- name: Fetch googletest
run: python build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests googletest
run: python build/fbcode_builder/getdeps.py fetch --no-tests googletest
- name: Fetch libevent
run: python build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests libevent
run: python build/fbcode_builder/getdeps.py fetch --no-tests libevent
- name: Fetch lz4
run: python build/fbcode_builder/getdeps.py fetch --no-tests lz4
- name: Fetch snappy
run: python build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests snappy
run: python build/fbcode_builder/getdeps.py fetch --no-tests snappy
- name: Fetch zlib
run: python build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests zlib
run: python build/fbcode_builder/getdeps.py fetch --no-tests zlib
- name: Fetch zstd
run: python build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests zstd
run: python build/fbcode_builder/getdeps.py fetch --no-tests zstd
- name: Build boost
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests boost
run: python build/fbcode_builder/getdeps.py build --no-tests boost
- name: Build perl
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests perl
run: python build/fbcode_builder/getdeps.py build --no-tests perl
- name: Build openssl
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests openssl
run: python build/fbcode_builder/getdeps.py build --no-tests openssl
- name: Build ninja
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests ninja
run: python build/fbcode_builder/getdeps.py build --no-tests ninja
- name: Build cmake
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests cmake
run: python build/fbcode_builder/getdeps.py build --no-tests cmake
- name: Build double-conversion
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests double-conversion
run: python build/fbcode_builder/getdeps.py build --no-tests double-conversion
- name: Build fmt
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests fmt
run: python build/fbcode_builder/getdeps.py build --no-tests fmt
- name: Build gflags
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests gflags
run: python build/fbcode_builder/getdeps.py build --no-tests gflags
- name: Build glog
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests glog
run: python build/fbcode_builder/getdeps.py build --no-tests glog
- name: Build googletest
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests googletest
run: python build/fbcode_builder/getdeps.py build --no-tests googletest
- name: Build libevent
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests libevent
run: python build/fbcode_builder/getdeps.py build --no-tests libevent
- name: Build lz4
run: python build/fbcode_builder/getdeps.py build --no-tests lz4
- name: Build snappy
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests snappy
run: python build/fbcode_builder/getdeps.py build --no-tests snappy
- name: Build zlib
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests zlib
run: python build/fbcode_builder/getdeps.py build --no-tests zlib
- name: Build zstd
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --no-tests zstd
run: python build/fbcode_builder/getdeps.py build --no-tests zstd
- name: Build folly
run: python build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. folly
run: python build/fbcode_builder/getdeps.py build --src-dir=. folly
- name: Copy artifacts
run: python build/fbcode_builder/getdeps.py --allow-system-packages fixup-dyn-deps --src-dir=. folly _artifacts/windows --final-install-prefix /usr/local
run: python build/fbcode_builder/getdeps.py fixup-dyn-deps --src-dir=. folly _artifacts/windows --final-install-prefix /usr/local
- uses: actions/upload-artifact@master
with:
name: folly
path: _artifacts
- name: Test folly
run: python build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. folly
run: python build/fbcode_builder/getdeps.py test --src-dir=. folly
# 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.
......
......@@ -23,14 +23,9 @@ find_path(DOUBLE_CONVERSION_INCLUDE_DIR double-conversion/double-conversion.h)
find_library(DOUBLE_CONVERSION_LIBRARY NAMES double-conversion)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
DOUBLE_CONVERSION DEFAULT_MSG
DOUBLE_CONVERSION_LIBRARY DOUBLE_CONVERSION_INCLUDE_DIR)
if (NOT DOUBLE_CONVERSION_FOUND)
message(STATUS "Using third-party bundled double-conversion")
else()
message(STATUS "Found double-conversion: ${DOUBLE_CONVERSION_LIBRARY}")
endif (NOT DOUBLE_CONVERSION_FOUND)
find_package_handle_standard_args(
DoubleConversion
DEFAULT_MSG
DOUBLE_CONVERSION_LIBRARY DOUBLE_CONVERSION_INCLUDE_DIR)
mark_as_advanced(DOUBLE_CONVERSION_INCLUDE_DIR DOUBLE_CONVERSION_LIBRARY)
......@@ -29,7 +29,7 @@ endif()
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
# clang only rejects unknown warning flags if -Werror=unknown-warning-option
# is also specified.
CHECK_CXX_COMPILER_FLAG(
check_cxx_compiler_flag(
-Werror=unknown-warning-option
COMPILER_HAS_UNKNOWN_WARNING_OPTION)
if (COMPILER_HAS_UNKNOWN_WARNING_OPTION)
......@@ -37,8 +37,8 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
"${CMAKE_REQUIRED_FLAGS} -Werror=unknown-warning-option")
endif()
CHECK_CXX_COMPILER_FLAG(-Wshadow-local COMPILER_HAS_W_SHADOW_LOCAL)
CHECK_CXX_COMPILER_FLAG(
check_cxx_compiler_flag(-Wshadow-local COMPILER_HAS_W_SHADOW_LOCAL)
check_cxx_compiler_flag(
-Wshadow-compatible-local
COMPILER_HAS_W_SHADOW_COMPATIBLE_LOCAL)
if (COMPILER_HAS_W_SHADOW_LOCAL AND COMPILER_HAS_W_SHADOW_COMPATIBLE_LOCAL)
......@@ -46,31 +46,31 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
list(APPEND FOLLY_CXX_FLAGS -Wshadow-compatible-local)
endif()
CHECK_CXX_COMPILER_FLAG(-Wnoexcept-type COMPILER_HAS_W_NOEXCEPT_TYPE)
check_cxx_compiler_flag(-Wnoexcept-type COMPILER_HAS_W_NOEXCEPT_TYPE)
if (COMPILER_HAS_W_NOEXCEPT_TYPE)
list(APPEND FOLLY_CXX_FLAGS -Wno-noexcept-type)
endif()
CHECK_CXX_COMPILER_FLAG(
check_cxx_compiler_flag(
-Wnullability-completeness
COMPILER_HAS_W_NULLABILITY_COMPLETENESS)
if (COMPILER_HAS_W_NULLABILITY_COMPLETENESS)
list(APPEND FOLLY_CXX_FLAGS -Wno-nullability-completeness)
endif()
CHECK_CXX_COMPILER_FLAG(
check_cxx_compiler_flag(
-Winconsistent-missing-override
COMPILER_HAS_W_INCONSISTENT_MISSING_OVERRIDE)
if (COMPILER_HAS_W_INCONSISTENT_MISSING_OVERRIDE)
list(APPEND FOLLY_CXX_FLAGS -Wno-inconsistent-missing-override)
endif()
CHECK_CXX_COMPILER_FLAG(-faligned-new COMPILER_HAS_F_ALIGNED_NEW)
check_cxx_compiler_flag(-faligned-new COMPILER_HAS_F_ALIGNED_NEW)
if (COMPILER_HAS_F_ALIGNED_NEW)
list(APPEND FOLLY_CXX_FLAGS -faligned-new)
endif()
CHECK_CXX_COMPILER_FLAG(-fopenmp COMPILER_HAS_F_OPENMP)
check_cxx_compiler_flag(-fopenmp COMPILER_HAS_F_OPENMP)
if (COMPILER_HAS_F_OPENMP)
list(APPEND FOLLY_CXX_FLAGS -fopenmp)
endif()
......@@ -85,9 +85,6 @@ string(REGEX REPLACE
check_symbol_exists(pthread_atfork pthread.h FOLLY_HAVE_PTHREAD_ATFORK)
# Unfortunately check_symbol_exists() does not work for memrchr():
# it fails complaining that there are multiple overloaded versions of memrchr()
check_function_exists(memrchr FOLLY_HAVE_MEMRCHR)
check_symbol_exists(accept4 sys/socket.h FOLLY_HAVE_ACCEPT4)
check_symbol_exists(getrandom sys/random.h FOLLY_HAVE_GETRANDOM)
check_symbol_exists(preadv sys/uio.h FOLLY_HAVE_PREADV)
......@@ -131,10 +128,11 @@ check_cxx_source_compiles("
}"
FOLLY_HAVE_VLA
)
check_cxx_source_compiles("
extern \"C\" void configure_link_extern_weak_test() __attribute__((weak));
check_cxx_source_runs("
extern \"C\" int folly_example_undefined_weak_symbol() __attribute__((weak));
int main(int argc, char** argv) {
return configure_link_extern_weak_test == nullptr;
auto f = folly_example_undefined_weak_symbol; // null pointer
return f ? f() : 0; // must compile, link, and run with null pointer
}"
FOLLY_HAVE_WEAK_SYMBOLS
)
......@@ -151,30 +149,6 @@ check_cxx_source_runs("
FOLLY_HAVE_LINUX_VDSO
)
check_type_size(__int128 INT128_SIZE LANGUAGE CXX)
if (NOT INT128_SIZE STREQUAL "")
set(FOLLY_HAVE_INT128_T ON)
check_cxx_source_compiles("
#include <functional>
#include <type_traits>
#include <utility>
static_assert(
::std::is_same<::std::make_signed<unsigned __int128>::type,
__int128>::value,
\"signed form of 'unsigned __uint128' must be '__int128'.\");
static_assert(
sizeof(::std::hash<__int128>{}(0)) > 0, \
\"std::hash<__int128> is disabled.\");
int main() { return 0; }"
HAVE_INT128_TRAITS
)
if (HAVE_INT128_TRAITS)
set(FOLLY_SUPPLY_MISSING_INT128_TRAITS OFF)
else()
set(FOLLY_SUPPLY_MISSING_INT128_TRAITS ON)
endif()
endif()
check_cxx_source_runs("
#include <cstddef>
#include <cwchar>
......@@ -235,6 +209,8 @@ if (FOLLY_HAVE_LIBGFLAGS)
# use "google" but also make symbols available in the deprecated "gflags"
# namespace too. The folly code internally uses "gflags" unless we tell it
# otherwise.
list(APPEND CMAKE_REQUIRED_LIBRARIES ${FOLLY_LIBGFLAGS_LIBRARY})
list(APPEND CMAKE_REQUIRED_INCLUDES ${FOLLY_LIBGFLAGS_INCLUDE})
check_cxx_source_compiles("
#include <gflags/gflags.h>
int main() {
......@@ -244,6 +220,8 @@ if (FOLLY_HAVE_LIBGFLAGS)
"
GFLAGS_NAMESPACE_IS_GFLAGS
)
list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${FOLLY_LIBGFLAGS_LIBRARY})
list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${FOLLY_LIBGFLAGS_INCLUDE})
if (GFLAGS_NAMESPACE_IS_GFLAGS)
set(FOLLY_UNUSUAL_GFLAGS_NAMESPACE OFF)
set(FOLLY_GFLAGS_NAMESPACE gflags)
......
......@@ -202,7 +202,7 @@ function(folly_define_tests)
set(test_${cur_test}_content_dir)
set(test_${cur_test}_headers)
set(test_${cur_test}_sources)
set(test_${cur_test}_tag "NONE")
set(test_${cur_test}_tag)
set(argumentState 0)
while (currentArg LESS ${ARGC})
......@@ -221,13 +221,15 @@ function(folly_define_tests)
break()
elseif (argumentState EQUAL 0)
if ("x${ARGV${currentArg}}" STREQUAL "xBROKEN")
set(test_${cur_test}_tag "BROKEN")
list(APPEND test_${cur_test}_tag "BROKEN")
elseif ("x${ARGV${currentArg}}" STREQUAL "xHANGING")
set(test_${cur_test}_tag "HANGING")
list(APPEND test_${cur_test}_tag "HANGING")
elseif ("x${ARGV${currentArg}}" STREQUAL "xSLOW")
set(test_${cur_test}_tag "SLOW")
list(APPEND test_${cur_test}_tag "SLOW")
elseif ("x${ARGV${currentArg}}" STREQUAL "xWINDOWS_DISABLED")
set(test_${cur_test}_tag "WINDOWS_DISABLED")
list(APPEND test_${cur_test}_tag "WINDOWS_DISABLED")
elseif ("x${ARGV${currentArg}}" STREQUAL "xAPPLE_DISABLED")
list(APPEND test_${cur_test}_tag "APPLE_DISABLED")
else()
message(FATAL_ERROR "Unknown test tag '${ARGV${currentArg}}'!")
endif()
......@@ -264,11 +266,14 @@ function(folly_define_tests)
set(cur_test 0)
while (cur_test LESS test_count)
if ("x${test_${cur_test}_tag}" STREQUAL "xNONE" OR
("x${test_${cur_test}_tag}" STREQUAL "xBROKEN" AND BUILD_BROKEN_TESTS) OR
("x${test_${cur_test}_tag}" STREQUAL "xSLOW" AND BUILD_SLOW_TESTS) OR
("x${test_${cur_test}_tag}" STREQUAL "xHANGING" AND BUILD_HANGING_TESTS) OR
("x${test_${cur_test}_tag}" STREQUAL "xWINDOWS_DISABLED" AND NOT WIN32)
if (
1
# TODO: Use IN_LIST after cmake 3.3
AND (test_${cur_test}_tag MATCHES "\\bBROKEN\\b" OR BUILD_BROKEN_TESTS)
AND (test_${cur_test}_tag MATCHES "\\bSLOW\\b" OR BUILD_SLOW_TESTS)
AND (test_${cur_test}_tag MATCHES "\\bHANGING\\b" OR BUILD_HANGING_TESTS)
AND (test_${cur_test}_tag MATCHES "\\bWINDOWS_DISABLED\\b" OR NOT WIN32)
AND (test_${cur_test}_tag MATCHES "\\bAPPLE_DISABLED\\b" OR NOT APPLE)
)
set(cur_test_name ${test_${cur_test}_name})
set(cur_dir_name ${directory_${test_${cur_test}_directory}_name})
......
......@@ -92,7 +92,19 @@ function(gen_pkgconfig_vars)
# Set the output variables
string(REPLACE ";" " " cflags "${cflags}")
set("${var_prefix}_CFLAGS" "${cflags}" PARENT_SCOPE)
string(REPLACE ";" " " private_libs "${private_libs}")
# Since CMake 3.18 FindThreads may include a generator expression requiring
# a target, which gets propagated to us through INTERFACE_COMPILE_OPTIONS.
# Before CMake 3.19 there's no way to solve this in a general way, so we
# work around the specific case. See #1414 and CMake bug #21074.
if(CMAKE_VERSION VERSION_LESS 3.19)
string(REPLACE
"<COMPILE_LANG_AND_ID:CUDA,NVIDIA>" "<COMPILE_LANGUAGE:CUDA>"
cflags "${cflags}"
)