Skip to content

Commit

Permalink
Merge pull request #5630 from vvbandeira/gtest-dep
Browse files Browse the repository at this point in the history
etc: add gtest to DependencyInstaller
  • Loading branch information
vvbandeira authored Aug 22, 2024
2 parents 42ba30d + 3b04dd6 commit cacdd8a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions etc/DependencyInstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ _installCommonDev() {
cuddVersion=3.0.0
lemonVersion=1.3.1
spdlogVersion=1.8.1
gtestVersion=1.13.0
gtestChecksum="a1279c6fb5bf7d4a5e0d0b2a4adb39ac"


rm -rf "${baseDir}"
mkdir -p "${baseDir}"
Expand Down Expand Up @@ -201,6 +204,20 @@ _installCommonDev() {
echo "spdlog already installed."
fi

# gtest
gtestPrefix=${PREFIX:-"/usr/local"}
if [[ ! -d ${gtestPrefix}/include/gtest ]]; then
cd "${baseDir}"
wget https://github.com/google/googletest/archive/refs/tags/v${gtestVersion}.zip
md5sum -c <(echo "${gtestChecksum} v${gtestVersion}.zip") || exit 1
unzip v${gtestVersion}.zip
cd googletest-${gtestVersion}
${cmakePrefix}/bin/cmake -DCMAKE_INSTALL_PREFIX="${gtestPrefix}" -B build .
${cmakePrefix}/bin/cmake --build build --target install
else
echo "gtest already installed."
fi

if [[ ${equivalenceDeps} == "yes" ]]; then
_equivalenceDeps
fi
Expand Down

0 comments on commit cacdd8a

Please sign in to comment.