summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
Diffstat (limited to 'CMake')
-rwxr-xr-xCMake/install_test_project/test.sh24
1 files changed, 20 insertions, 4 deletions
diff --git a/CMake/install_test_project/test.sh b/CMake/install_test_project/test.sh
index a3d39773..5a78c92c 100755
--- a/CMake/install_test_project/test.sh
+++ b/CMake/install_test_project/test.sh
@@ -19,10 +19,9 @@
# Fail on any error. Treat unset variables an error. Print commands as executed.
set -euox pipefail
-source ci/cmake_common.sh
-
absl_dir=/abseil-cpp
absl_build_dir=/buildfs
+googletest_builddir=/googletest_builddir
project_dir="${absl_dir}"/CMake/install_test_project
project_build_dir=/buildfs/project-build
@@ -31,13 +30,30 @@ if [ "${LINK_TYPE:-}" = "DYNAMIC" ]; then
build_shared_libs="ON"
fi
+# Build and install GoogleTest
+mkdir "${googletest_builddir}"
+pushd "${googletest_builddir}"
+curl -L "${ABSL_GOOGLETEST_DOWNLOAD_URL}" --output "${ABSL_GOOGLETEST_COMMIT}".zip
+unzip "${ABSL_GOOGLETEST_COMMIT}".zip
+pushd "googletest-${ABSL_GOOGLETEST_COMMIT}"
+mkdir build
+pushd build
+cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS="${build_shared_libs}" ..
+make -j $(nproc)
+make install
+ldconfig
+popd
+popd
+popd
+
# Run the LTS transformations
./create_lts.py 99998877
-# Install Abseil
+# Build and install Abseil
pushd "${absl_build_dir}"
cmake "${absl_dir}" \
- -DABSL_GOOGLETEST_DOWNLOAD_URL="${ABSL_GOOGLETEST_DOWNLOAD_URL}" \
+ -DABSL_USE_EXTERNAL_GOOGLETEST=ON \
+ -DABSL_FIND_GOOGLETEST=ON \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=ON \
-DBUILD_SHARED_LIBS="${build_shared_libs}"