Created
January 27, 2019 14:29
-
-
Save natanaeljr/52fcf0436c060bcfe05ddf68a3c59093 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
## Setup GTest/GMock | |
set -Eeuxo pipefail | |
# Require root | |
[ "$UID" -eq 0 ] || exec sudo "$0" "$@" | |
# Check required packages are installed | |
dpkg -s libgtest-dev | |
# Save current directory | |
pushd $(pwd) | |
# Build and install GoogleTest | |
cd /usr/src/googletest | |
cmake CMakeLists.txt | |
make | |
make install | |
# Rollback to entrance directory | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment