language: c

sudo: false

matrix:
  include:
    - os: linux
      compiler: gcc
      env: COVERAGE=gcov-4.9
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test']
          packages: [ 'g++-4.9', 'protobuf-compiler', 'libprotobuf-dev' ]
    - os: linux
      compiler: clang
      addons:
        apt:
          packages: [ 'protobuf-compiler', 'libprotobuf-dev' ]
    - os: osx
      compiler: clang


install:
 - if [[ $(uname -s) == 'Darwin' ]]; then brew install protobuf; fi;
 - if [ -n "${COVERAGE}" ]; then
       export CXX=g++-4.9;
       export CC=gcc-4.9;
       export CXXFLAGS="--coverage -g";
       export CFLAGS="--coverage -g";
       export LDFLAGS="--coverage";
   elif [[ $(uname -s) == 'Linux' ]]; then
       export CXX=clang++;
       export CXXFLAGS="-stdlib=libc++";
   fi;
 - make

script:
 - make test
 - if [ -n "${COVERAGE}" ]; then
       rm vector_tile.pb.o;
       ${COVERAGE} -lp *.o;
       pip install --user cpp-coveralls;
       ~/.local/bin/coveralls --no-gcov -i ./ --exclude clipper --exclude vector_tile.pb.cc --exclude vector_tile.pb.h;
   fi

language: c

sudo: false

matrix:
  include:
    - os: linux
      compiler: gcc
      env: COVERAGE=gcov-4.9
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test']
          packages: [ 'g++-4.9', 'protobuf-compiler', 'libprotobuf-dev' ]
    - os: linux
      compiler: clang
      addons:
        apt:
          packages: [ 'protobuf-compiler', 'libprotobuf-dev', 'libc++-dev' ]
    - os: osx
      compiler: clang


install:
 - if [[ $(uname -s) == 'Darwin' ]]; then brew install protobuf; fi;
 - if [ -n "${COVERAGE}" ]; then
       export CXX=g++-4.9;
       export CC=gcc-4.9;
       export CXXFLAGS="--coverage -g";
       export CFLAGS="--coverage -g";
       export LDFLAGS="--coverage";
   elif [[ $(uname -s) == 'Linux' ]]; then
       export CXX=clang++;
       export CXXFLAGS="-stdlib=libc++";
   fi;
 - make

script:
 - make test
 - if [ -n "${COVERAGE}" ]; then
       rm vector_tile.pb.o;
       ${COVERAGE} -lp *.o;
       pip install --user cpp-coveralls;
       ~/.local/bin/coveralls --no-gcov -i ./ --exclude clipper --exclude vector_tile.pb.cc --exclude vector_tile.pb.h;
   fi

Install libc++-dev in another attempt to fix the build
Install libc++-dev in another attempt to fix the build
