aboutsummaryrefslogtreecommitdiff
path: root/travis.sh
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2015-12-21 03:34:28 -0800
committerFeng Xiao <xfxyjwf@gmail.com>2015-12-21 03:38:38 -0800
commit9125863ac0dd00aef1a7b52ca65fff373481ac40 (patch)
tree68551605916d34fc541ecc559620ad22ac437f68 /travis.sh
parentaf81dcfc2c23b9a931bee55544e32da30eb4874c (diff)
downloadprotobuf-9125863ac0dd00aef1a7b52ca65fff373481ac40.tar.gz
protobuf-9125863ac0dd00aef1a7b52ca65fff373481ac40.tar.bz2
protobuf-9125863ac0dd00aef1a7b52ca65fff373481ac40.zip
Only try to install GCC 4.8 on Linux.
Diffstat (limited to 'travis.sh')
-rwxr-xr-xtravis.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/travis.sh b/travis.sh
index b9ff09b7..61a8156d 100755
--- a/travis.sh
+++ b/travis.sh
@@ -11,12 +11,14 @@
# For when some other test needs the C++ main build, including protoc and
# libprotobuf.
internal_build_cpp() {
- # Install GCC 4.8 to replace the default GCC 4.6. We need 4.8 for more
- # decent C++ 11 support in order to compile conformance tests.
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -qq
- sudo apt-get install -qq g++-4.8
- export CXX="g++-4.8" CC="gcc-4.8"
+ if [ $(uname -s) == "Linux" ]; then
+ # Install GCC 4.8 to replace the default GCC 4.6. We need 4.8 for more
+ # decent C++ 11 support in order to compile conformance tests.
+ sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
+ sudo apt-get update -qq
+ sudo apt-get install -qq g++-4.8
+ export CXX="g++-4.8" CC="gcc-4.8"
+ fi
./autogen.sh
./configure