language: cpp
matrix:
  include:
    - os: linux
      compiler: gcc
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test']
          packages: ['g++-4.8']
      env: COMPILER=g++-4.8
    - os: linux
      compiler: gcc
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test']
          packages: ['g++-4.9']
      env: COMPILER=g++-4.9
    - os: linux
      compiler: gcc
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test']
          packages: ['g++-5']
      env: COMPILER=g++-5
    - os: linux
      compiler: clang
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5']
          packages: ['clang-3.5']
      env: COMPILER=clang++-3.5
    - os: linux
      compiler: clang
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.6']
          packages: ['clang-3.6']
      env: COMPILER=clang++-3.6
    - os: osx
      compiler: clang
script:
  make CXX=$COMPILER -j2

language: cpp
matrix:
  include:
    - os: linux
      compiler: gcc
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test']
          packages: ['g++-4.8']
      env: COMPILER=g++-4.8
    - os: linux
      compiler: gcc
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test']
          packages: ['g++-4.9']
      env: COMPILER=g++-4.9
    - os: linux
      compiler: gcc
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test']
          packages: ['g++-5']
      env: COMPILER=g++-5
    - os: linux
      compiler: clang
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5']
          packages: ['clang-3.5']
      env: COMPILER=clang++-3.5
    - os: linux
      compiler: clang
      addons:
        apt:
          sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.6']
          packages: ['clang-3.6']
      env: COMPILER=clang++-3.6
    - os: osx
      compiler: clang
      env: COMPILER=clang++

script:
  make CXX=$COMPILER -j2

Fix build on MacOS X
Fix build on MacOS X