Fix travis configuration for C++14 support

This commit is contained in:
Maxime Coste 2015-05-21 13:33:40 +01:00 committed by Maxime Coste
parent 7a79cbbc81
commit bbaa98c46d
2 changed files with 19 additions and 5 deletions

View File

@ -18,12 +18,21 @@ before_install:
install: install:
- if [ $TRAVIS_OS_NAME = linux ]; then - if [ $TRAVIS_OS_NAME = linux ]; then
if [ "$CXX" = "clang++" ]; then if [ "$CXX" = "clang++" ]; then
export CXX=clang++-3.5; export CXX=clang++-3.7;
elif [ "$CXX" = "g++" ]; then elif [ "$CXX" = "g++" ]; then
export CXX=g++-5; export CXX=g++-5;
fi; fi;
elif [ $TRAVIS_OS_NAME = osx ]; then elif [ $TRAVIS_OS_NAME = osx ]; then
brew outdated boost || brew upgrade boost; if [ "$CXX" = "clang++" ]; then
brew install llvm36 && brew link --force llvm36;
export CXX="clang++-3.6 -stdlib=libc++";
export CXXFLAGS="$CXXFLAGS -nostdinc++ -I/usr/local/opt/llvm36/lib/llvm-3.6/include/c++/v1";
export LDFLAGS="$LDFLAGS -L/usr/local/opt/llvm36/lib/llvm-3.6/lib";
elif [ "$CXX" = "g++" ]; then
brew outdated gcc || brew upgrade gcc;
brew unlink boost; brew install boost --cc=gcc-5;
export CXX=g++-5;
fi;
fi; fi;
env: env:
global: global:
@ -34,9 +43,9 @@ addons:
sources: sources:
- boost-latest - boost-latest
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5 - llvm-toolchain-precise-3.7
packages: packages:
- clang-3.5 - clang-3.7
- libstdc++-5-dev - libstdc++-5-dev
- g++-5 - g++-5
- libncursesw5-dev - libncursesw5-dev
@ -50,4 +59,9 @@ addons:
build_command: "make -j4" build_command: "make -j4"
branch_pattern: coverity-scan branch_pattern: coverity-scan
matrix:
exclude:
- compiler: gcc
os: osx
script: cd src && make && make test script: cd src && make && make test

View File

@ -32,7 +32,7 @@ mandir := $(DESTDIR)$(PREFIX)/share/man/man1
os := $(shell uname) os := $(shell uname)
ifeq ($(os),Darwin) ifeq ($(os),Darwin)
LIBS += -lncurses -lboost_regex-mt LIBS += -lncurses -lboost_regex
CPPFLAGS += -I$(PREFIX)/opt/ncurses/include -I$(PREFIX)/opt/boost/include -I/opt/local/include CPPFLAGS += -I$(PREFIX)/opt/ncurses/include -I$(PREFIX)/opt/boost/include -I/opt/local/include
LDFLAGS += -L$(PREFIX)/opt/ncurses/lib -L$(PREFIX)/opt/boost/lib -L/opt/local/lib LDFLAGS += -L$(PREFIX)/opt/ncurses/lib -L$(PREFIX)/opt/boost/lib -L/opt/local/lib
else ifeq ($(os),FreeBSD) else ifeq ($(os),FreeBSD)