build: support building with system gtest (#8196)

* build: support building with system gtest

* chore: include gtest headers with h-char include
This commit is contained in:
Yat Ho
2026-01-28 10:15:11 +08:00
committed by GitHub
parent 4e1b092a17
commit 02ca4e3e2b
42 changed files with 116 additions and 65 deletions

View File

@@ -112,6 +112,12 @@ runs:
xz-utils
)
# Debian wants to build Transmission with system gtest
# https://github.com/transmission/transmission/pull/6900
if [ "$DISTRO" = 'debian' ]; then
BASE_PACKAGES+=(libgtest-dev)
fi
# Compiler packages
if [[ "${{ inputs.compiler }}" == "clang" ]]; then
BASE_PACKAGES+=(clang)

View File

@@ -771,6 +771,7 @@ jobs:
-DREBUILD_WEB=${{ (needs.what-to-make.outputs.make-web == 'true') && 'ON' || 'OFF' }} \
-DENABLE_WERROR=ON \
-DRUN_CLANG_TIDY=OFF \
-DUSE_SYSTEM_GTEST=ON \
-DUSE_SYSTEM_DEFAULT=ON \
-DUSE_SYSTEM_CRC32C=OFF `# Not packaged in Debian 11` \
-DUSE_SYSTEM_DHT=OFF `# Not packaged in Debian 11` \
@@ -851,6 +852,7 @@ jobs:
-DREBUILD_WEB=${{ (needs.what-to-make.outputs.make-web == 'true') && 'ON' || 'OFF' }} \
-DENABLE_WERROR=ON \
-DRUN_CLANG_TIDY=OFF \
-DUSE_SYSTEM_GTEST=ON \
-DUSE_SYSTEM_DEFAULT=ON \
-DUSE_SYSTEM_CRC32C=OFF `# Not packaged in Debian` \
-DUSE_SYSTEM_DHT=OFF `# Not packaged in Debian` \