language: cpp
os:
  - linux
  - osx
compiler:
  - gcc
  - clang
install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - gcc-4.8
    - g++-4.8
    - clang
branches:
  only:
    - master
    - develop
script:
  - mkdir build_directory
  - cd build_directory
  # Build in debug mode with double precision
  - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug —DDOUBLE_PRECISION_ENABLED=True -DCOMPILE_TESTS=True ../
  - make && make test ARGS="-V"
  # Build in debug mode with single precision
  - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug —DDOUBLE_PRECISION_ENABLED=False -DCOMPILE_TESTS=True ../
  - make && make test ARGS="-V"
  # Build in release mode with double precision
  - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release —DDOUBLE_PRECISION_ENABLED=True -DCOMPILE_TESTS=True ../
  - make && make test ARGS="-V"
  # Build in release mode with single precision
  - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release —DDOUBLE_PRECISION_ENABLED=False -DCOMPILE_TESTS=True ../
  - make && make test ARGS="-V"