language: cpp
compiler: g++-4.9

  
matrix:
  include:
    - env:
        - MATRIX_EVAL="CC=clang && CXX=clang++ && CXX_FLAG-fopenmp=libomp"
    - env:
        - MATRIX_EVAL="CC=gcc && CXX=g++ && CXX_FLAG-fopenmp=libomp"
        


#addons:
#  apt:
#    sources:
#      - george-edison55-precise-backports
#    packages:
#      - cmake-data
#      - cmake
#
#addons:
#  apt:
#    sources:
#    - ubuntu-toolchain-r-test
#    packages:
#    - gcc-4.9
#    - g++-4.9

#before_script:
#  - autoreconf -fi

script:
  - # try automake #./configure && make && make check
  - cd build/automake
  - autoreconf -vif  
  - mkdir mywork 
  - cd mywork
  - fullpath=$(pwd)        # modify fullpath to your destination folder if need
  - ./configure --prefix=${fullpath}  
  - make -j 4              # Where "4" is the number of cores on your machine
  - make install           # install lib and include/ColPack to destination  

script:
  - # Now try building with CMake.
  - cd build/cmake
  - mkdir mywork
  - cd mywork
  - fullpath=$(pwd)
  - cmake .. -DCMAKE_INSTALL_PREFIX:PATH=${fullpath}
  - make #; ctest
  - make install

