Files
qt6-migration-pipeline/app/build_gtest.sh
T
torsten 77c67c12ca Execute the same instructions but now for tools in folders you are getti
Entire-Metadata: .entire/metadata/fb87247f-2a75-407e-b336-cbc8c20ba5a6
Entire-Session: fb87247f-2a75-407e-b336-cbc8c20ba5a6
Entire-Strategy: manual-commit
2026-09-24 16:24:51 +00:00

23 lines
677 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Build and install GoogleTest on Debian/Ubuntu when libgtest-dev provides sources
# Installs static libs into /usr/local so cmake can find GTest::gtest
if [ -d /usr/src/googletest ] || [ -d /usr/src/gtest ]; then
echo "Building GoogleTest from system sources"
if [ -d /usr/src/googletest ]; then
src=/usr/src/googletest
else
src=/usr/src/gtest
fi
builddir="${src}/build"
mkdir -p "$builddir"
pushd "$builddir"
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
cmake --build . -- -j"$(nproc)"
cmake --install . --prefix=/usr/local
popd
else
echo "No system gtest sources found in /usr/src; skipping build."
fi