cmake: add BORINGSSL_VERSION configuration variable, test in CI

To simplify setting BoringSSL version, using:
`-DBORINGSSL_VERSION=0.20260211.0`
or
`-DBORINGSSL_VERSION=${boringssl_version}`

Previously it could be set via C flags, using complicated shell quotes:
`-DCMAKE_C_FLAGS="-DCURL_BORINGSSL_VERSION=\\\"${boringssl_version}\\\""`
(the C flags method remains, also for autotools)

It'd be nice if BoringSSL published its version not just via
`MODULE.bazel` in its source tree, but from its public headers, to make
these workarounds unnecessary.

Also:
- GHA/http3-linux: test both options.

Closes #20571
This commit is contained in:
Viktor Szakats 2026-02-12 15:21:12 +01:00
parent 61df5f466c
commit 516a0cd382
No known key found for this signature in database
4 changed files with 10 additions and 1 deletions

View file

@ -639,14 +639,16 @@ jobs:
run: |
[ -n "${MATRIX_PKG_CONFIG_PATH}" ] && export PKG_CONFIG_PATH="${MATRIX_PKG_CONFIG_PATH}"
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
[[ "${MATRIX_GENERATE}" = *'boringssl'* ]] && options=" -DBORINGSSL_VERSION=${BORINGSSL_VERSION}"
cmake -B bld -G Ninja \
-DCMAKE_C_COMPILER_TARGET="$(uname -m)-pc-linux-gnu" -DBUILD_STATIC_LIBS=ON \
-DCURL_WERROR=ON -DENABLE_DEBUG=ON \
-DCURL_USE_LIBUV=ON \
-DTEST_NGHTTPX=/home/runner/nghttp2/build/bin/nghttpx \
-DHTTPD_NGHTTPX=/home/runner/nghttp2/build/bin/nghttpx \
${MATRIX_GENERATE}
${MATRIX_GENERATE} ${options}
else
[[ "${MATRIX_CONFIGURE}" = *'boringssl'* ]] && export CPPFLAGS="-DCURL_BORINGSSL_VERSION=\\\"${BORINGSSL_VERSION}\\\""
mkdir bld && cd bld && ../configure --enable-warnings --enable-werror --enable-debug --disable-static \
--disable-dependency-tracking --enable-option-checking=fatal \
--with-libuv \