fix travis error for MacOS

This commit is contained in:
tangxifan 2019-10-24 22:51:24 -06:00
parent c38513c838
commit a1cd1ea8b4
2 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@ matrix:
- os: osx - os: osx
osx_image: xcode10.2 # we target latest MacOS Mojave osx_image: xcode10.2 # we target latest MacOS Mojave
sudo: true sudo: true
compiler: gcc-4.9 # Use clang instead of gcc in MacOS compiler: gcc-6 # Use clang instead of gcc in MacOS
addons: addons:
homebrew: homebrew:
packages: packages:

View File

@ -31,12 +31,12 @@ function end_section() {
# For Mac OS, we use g++ and gcc as default compilers # For Mac OS, we use g++ and gcc as default compilers
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
export CC=gcc-4.9 export CC=gcc-6
export CXX=g++-4.9 export CXX=g++-6
# export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH" # export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"
# export PATH="/usr/local/opt/qt/bin:$PATH" # export PATH="/usr/local/opt/qt/bin:$PATH"
# Install header files in Mojave, if not gcc-4.9 cannot spot stdio.h # Install header files in Mojave, if not gcc-4.9 cannot spot stdio.h
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / -allowUntrusted
else else
# For linux, we use g++-8 and gcc-8 as default compilers # For linux, we use g++-8 and gcc-8 as default compilers
export CC=gcc-8 export CC=gcc-8