diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2018-07-17 16:59:34 +0200 |
---|---|---|
committer | Anand Thakker <github@anandthakker.net> | 2018-07-20 10:58:50 -0400 |
commit | 1985b893b7c50f56e10ecc07776d60103a5a3e5b (patch) | |
tree | 83f42d3e3b0674d1ae8bc45cbd6a4ab310d94c12 /scripts | |
parent | 418bcc2f2199cfa38291a9a5b9a71180ddd8deea (diff) | |
download | qtlocation-mapboxgl-1985b893b7c50f56e10ecc07776d60103a5a3e5b.tar.gz |
[build] vendor Google Test
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vendor/gtest.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/vendor/gtest.sh b/scripts/vendor/gtest.sh new file mode 100755 index 0000000000..3bae5266fb --- /dev/null +++ b/scripts/vendor/gtest.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +source "$(dirname "${BASH_SOURCE[0]}")/common.sh" + +NAME=gtest +VERSION=1.8.0 +ROOT=googletest-release-1.8.0/googletest + +download "https://github.com/google/googletest/archive/release-$VERSION.tar.gz" +init +STRIP_COMPONENTS=2 extract --exclude "gtest-all.cc" --exclude "gtest_main.cc" "$ROOT/include/*.h" "$ROOT/src" "$ROOT/LICENSE" + +for FILE in $(find include src -name "*.h" -o -name "*.cc"); do + sed -e 's/^#include \"src\/\([^\"]\{1,\}\)\"/#include "\1"/' \ + -e 's/^#include \"\(gtest\/[^\"]\{1,\}\)\"/#include <\1>/' \ + "$FILE" > "$FILE.bak" && mv "$FILE.bak" "$FILE" +done + +file_list include src -name "*.h" -o -name "*.cc" + |