-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: build GoogleTest 1.14 from source (was 1.11 via
apt install
)
See #72 (comment)
- Loading branch information
1 parent
cd14531
commit ce0f601
Showing
2 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
set -ef | ||
|
||
# Build GoogleTest from source and install it | ||
# | ||
# See https://github.com/google/googletest/blob/d83fee138a9ae6cb7c03688a2d08d4043a39815d/googletest/README.md#build-with-cmake | ||
|
||
gtest_version_tag=v1.14.0 | ||
|
||
temp_dir=$(mktemp -d) | ||
function cleanup { | ||
rm -rf -- "$temp_dir" | ||
} | ||
trap 'cleanup' EXIT | ||
|
||
# Download | ||
git clone --depth 1 -b "$gtest_version_tag" -- https://github.com/google/googletest.git "$temp_dir" | ||
cd -- "$temp_dir" | ||
mkdir build | ||
cd build | ||
# Configure - build only GoogleTest, not GoogleMock | ||
cmake .. -DBUILD_GMOCK=OFF | ||
# Build | ||
make | ||
# Install | ||
sudo make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters