mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 06:37:55 +08:00
9f69089cb9
s2n fails to build with gcc 11 (see https://github.com/aws/s2n-tls/issues/2989) due to problematic type declarations which generate compiler warnings, coupled with the fact that s2n builds with -Werror by default. The underlying bug is not yet fixed upstream. Building with -Werror is not helpful for an end user trying to use s2n from vcpkg, since a build failure like this is not actionable. This change therefore uses the UNSAFE_TREAT_AS_ERRORS=OFF option to disable -Werror.
41 lines
1.2 KiB
CMake
41 lines
1.2 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO aws/s2n-tls
|
|
REF ab9a3be5a8abcbc5bd7bdba662497a717737c838 # v1.3.0
|
|
SHA512 0150cba56f7940253ffa5af0c27fdc8db08961d4c8a80377d25f588fa8a56249eb02723304969d0fdebe570388545527ee826a3070c21e50e63c4f021d425728
|
|
PATCHES
|
|
fix-cmake-target-path.patch
|
|
use-openssl-crypto.patch
|
|
)
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
tests BUILD_TESTING
|
|
)
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
${FEATURE_OPTIONS}
|
|
-DUNSAFE_TREAT_WARNINGS_AS_ERRORS=OFF
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_copy_pdbs()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/s2n/cmake)
|
|
|
|
if(BUILD_TESTING)
|
|
message(STATUS Testing)
|
|
vcpkg_cmake_build(TARGET test LOGFILE_BASE test)
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/s2n"
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
"${CURRENT_PACKAGES_DIR}/lib/s2n"
|
|
"${CURRENT_PACKAGES_DIR}/share/s2n/modules"
|
|
)
|
|
|
|
# Handle copyright
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|