dist: trusty
language: cpp
sudo: required

notifications:
  email: false

os:
  - linux

compiler:
  - g++
  #- clang

before_install:
  # From: https://gist.github.com/cotsog/3ce84675af0d74438d91
  - if [ "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
  - if [ "$CXX" == "g++" ]; then sudo apt-get update -qq; fi

install:
  - if [ "$CXX" == "g++" ]; then sudo apt-get install -qq g++-6; fi
  - if [ "$CXX" == "g++" ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90; fi

env:
  - BUILD_CONFIGURATION=Debug
  - BUILD_CONFIGURATION=Release

script:
  - mkdir build
  - cd build
  - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=$BUILD_CONFIGURATION -DCMAKE_INSTALL_PREFIX=deploy ..
  - cmake --build . --config $BUILD_CONFIGURATION
  - ctest -C $BUILD_CONFIGURATION --verbose

dist: trusty
language: cpp
sudo: required

notifications:
  email: false

os:
  - linux

compiler:
  - g++
  #- clang

before_install:
  # From: https://gist.github.com/cotsog/3ce84675af0d74438d91
  - if [ "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
  - if [ "$CXX" == "g++" ]; then sudo apt-get update -qq; fi

install:
  - if [ "$CXX" == "g++" ]; then sudo apt-get install -qq g++-6; fi
  - if [ "$CXX" == "g++" ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90; fi

env:
  - config=Debug
  - config=Release

script:
  - mkdir build
  - cd build
  - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=$config -DCMAKE_INSTALL_PREFIX=deploy ..
  - cmake --build . --config $config
  - cmake -DBUILD_TYPE=$config -P cmake_install.cmake
  - ctest -C $config --verbose

Fix runnigng the tests on Travis CI
Fix runnigng the tests on Travis CI
