language: cpp

compiler:
  - gcc
  - clang

env:
  - USE_SYSTEM_CURL="TRUE" USE_SYSTEM_CMAKE="TRUE"
  - USE_SYSTEM_CURL="" USE_SYSTEM_CMAKE="TRUE"
  - USE_SYSTEM_CURL="" USE_SYSTEM_CMAKE=""
  - USE_SYSTEM_CURL="TRUE" USE_SYSTEM_CMAKE=""

sudo: required

before_install:
  - if [ -z "$USE_SYSTEM_CURL" ]; then sudo apt-get remove curl libcurl3; fi
  - if [ -z "$USE_SYSTEM_CMAKE" ]; then sudo apt-get remove cmake && wget http://www.cmake.org/files/v3.2/cmake-3.2.1.tar.gz && tar -xzf cmake-3.2.1.tar.gz && cd cmake-3.2.1 && ./bootstrap > /dev/null && make -j8 > /dev/null && sudo make install && cd .. && rm -rf cmake-3.2.1 cmake-3.2.1.tar.gz; fi

before_script:
  - cmake --version
  - mkdir build
  - cd build
  - cmake ..

script:
  - make

language: cpp

compiler:
  - gcc
  - clang

env:
  - USE_SYSTEM_CURL="TRUE" USE_SYSTEM_CMAKE="TRUE"
  - USE_SYSTEM_CURL="" USE_SYSTEM_CMAKE="TRUE"
  - USE_SYSTEM_CURL="" USE_SYSTEM_CMAKE=""
  - USE_SYSTEM_CURL="TRUE" USE_SYSTEM_CMAKE=""

sudo: required

before_install:
  - if [ -z "$USE_SYSTEM_CURL" ]; then sudo apt-get remove curl libcurl3; fi
  - if [ -z "$USE_SYSTEM_CMAKE" ]; then sudo apt-get remove cmake && wget http://www.cmake.org/files/v3.2/cmake-3.2.1.tar.gz && tar -xzf cmake-3.2.1.tar.gz && cd cmake-3.2.1 && ./bootstrap > /dev/null && make -j8 > /dev/null && sudo make install && cd .. && rm -rf cmake-3.2.1 cmake-3.2.1.tar.gz; else sudo apt-get update && sudo apt-get install -y cmake; fi

before_script:
  - cmake --version
  - mkdir build
  - cd build
  - cmake ..

script:
  - make

Install a system cmake in case there isn't one
Install a system cmake in case there isn't one
