From 3b04dd6cd6b869b789b428cdee4f53fd8e1c1ef2 Mon Sep 17 00:00:00 2001 From: Vitor Bandeira Date: Thu, 22 Aug 2024 13:57:26 -0300 Subject: [PATCH] etc: add gtest to DependencyInstaller Signed-off-by: Vitor Bandeira --- etc/DependencyInstaller.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/etc/DependencyInstaller.sh b/etc/DependencyInstaller.sh index db027185bfe..3b5091ef362 100755 --- a/etc/DependencyInstaller.sh +++ b/etc/DependencyInstaller.sh @@ -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}" @@ -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