cmake: add `BORINGSSL_VERSION` configuration variable, test in CI
No binary (build failed)
—
(log yok)
| @@ -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 \ | |
| @@ -821,6 +821,9 @@ if(CURL_USE_OPENSSL) | |
| endif() | |
| if(HAVE_BORINGSSL) | |
| + | if(BORINGSSL_VERSION) |
| + | set(CURL_BORINGSSL_VERSION "\"${BORINGSSL_VERSION}\"") |
| + | endif() |
| set(_openssl "BoringSSL") | |
| elseif(HAVE_AWSLC) | |
| set(_openssl "AWS-LC") | |
| @@ -406,6 +406,7 @@ Details via CMake | |
| - `AMISSL_INCLUDE_DIR`: Absolute path to AmiSSL include directory. | |
| - `AMISSL_STUBS_LIBRARY`: Absolute path to `amisslstubs` library. | |
| - `AMISSL_AUTO_LIBRARY`: Absolute path to `amisslauto` library. | |
| + | - `BORINGSSL_VERSION`: Set BoringSSL version for `curl -V`/`curl --version` output. |
| - `BROTLI_INCLUDE_DIR`: Absolute path to brotli include directory. | |
| - `BROTLICOMMON_LIBRARY`: Absolute path to `brotlicommon` library. | |
| - `BROTLIDEC_LIBRARY`: Absolute path to `brotlidec` library. | |
| @@ -327,6 +327,9 @@ | |
| /* MIT Kerberos version */ | |
| #cmakedefine CURL_KRB5_VERSION ${CURL_KRB5_VERSION} | |
| + | /* BoringSSL version */ |
| + | #cmakedefine CURL_BORINGSSL_VERSION ${CURL_BORINGSSL_VERSION} |
| + | |
| /* Define to 1 if you have the <ifaddrs.h> header file. */ | |
| #cmakedefine HAVE_IFADDRS_H 1 | |