os:
  - linux

addons:
  apt:
    sources:
      - kubuntu-backports
    packages:
      - cmake

language: c

compiler:
  - gcc
  - clang

install:
  # powercap dependency
  - git clone git@github.com:powercap/powercap.git libpowercap
  - cd libpowercap
  - mkdir _build
  - cd _build
  - cmake -DCMAKE_INSTALL_PREFIX=_install ..
  - make
  - make install
  - cd ../..
  # libmsr dependency (force version 0.3.0) (force Ivy Bridge architecture)
  - git clone git@github.com:LLNL/libmsr.git libmsr_src
  - cd libmsr_src
  - git checkout v0.3.0
  # libmsr only claims to support gcc, so don't let it build with clang
  - CC=gcc ./install.sh _install -f3E
  - cd ..

script:
  - mkdir _build
  - cd _build
  - PKG_CONFIG_PATH="../libpowercap/_build/_install/lib/pkgconfig" cmake -DCMAKE_PREFIX_PATH="`pwd`/../libmsr_src/_install/" ..
  - make

os:
  - linux

addons:
  apt:
    sources:
      - kubuntu-backports
    packages:
      - cmake

language: c

compiler:
  - gcc
  - clang

install:
  # powercap dependency
  - git clone https://github.com/powercap/powercap.git libpowercap
  - cd libpowercap
  - mkdir _build
  - cd _build
  - cmake -DCMAKE_INSTALL_PREFIX=_install ..
  - make
  - make install
  - cd ../..
  # libmsr dependency (force version 0.3.0) (force Ivy Bridge architecture)
  - git clone https://github.com/LLNL/libmsr.git libmsr_src
  - cd libmsr_src
  - git checkout v0.3.0
  # libmsr only claims to support gcc, so don't let it build with clang
  - CC=gcc ./install.sh _install -f3E
  - cd ..

script:
  - mkdir _build
  - cd _build
  - PKG_CONFIG_PATH="../libpowercap/_build/_install/lib/pkgconfig" cmake -DCMAKE_PREFIX_PATH="`pwd`/../libmsr_src/_install/" ..
  - make

Use https to clone dependencies for Travis CI
Use https to clone dependencies for Travis CI
