diff options
author | 2023-03-06 20:25:41 +0530 | |
---|---|---|
committer | 2023-03-06 20:25:41 +0530 | |
commit | 079dd8737bbaaaeeca3a95c2b858a62d8a620d5a (patch) | |
tree | 6af54966e17bcfe48ecdb0b5cdf43cc953d5358c /CMake/install_test_project/test.sh | |
parent | 2bbc47f307f1e24f3f44a108d571bffa5a3faa63 (diff) | |
parent | f5afcb784c9b1c501c1144b7aab84555881ca871 (diff) |
Merge tag '20220623.1-1' into bullseye-backports-staging
Diffstat (limited to 'CMake/install_test_project/test.sh')
-rwxr-xr-x | CMake/install_test_project/test.sh | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/CMake/install_test_project/test.sh b/CMake/install_test_project/test.sh index a3d39773..cc028bac 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,18 +30,35 @@ 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 \ + -DABSL_BUILD_TESTING=ON \ -DBUILD_SHARED_LIBS="${build_shared_libs}" make -j $(nproc) -ctest -j $(nproc) +ctest -j $(nproc) --output-on-failure make install ldconfig popd |