language: cpp
sudo: false
dist: precise
matrix:
  include:
    - os: linux
      compiler: gcc-4.8.1
      script:
        - git submodule update --init --recursive
        - mkdir external/glfw/include/GL
        - wget --no-check-certificate -P external/glfw/include/GL http://www.opengl.org/registry/api/GL/glcorearb.h
        - cd python
        - mkdir build
        - cd build
        - cmake -DCMAKE_CXX_COMPILER=g++-4.8 -DCMAKE_C_COMPILER=gcc-4.8 -DLIBIGL_WITH_EMBREE=OFF -DLIBIGL_USE_STATIC_LIBRARY=ON ../
        - make -j 2
        - cd ../tutorial
        - python3 101_FileIO.py || { cd ../; mkdir build2; cd build2; cmake -DCMAKE_CXX_COMPILER=g++-4.8 -DCMAKE_C_COMPILER=gcc-4.8 -DLIBIGL_WITH_EMBREE=OFF -DLIBIGL_USE_STATIC_LIBRARY=ON - DCHECK_UNDEFINED=ON ../; make -j 2; }
        - cd ../../
        - cd tutorial
        - mkdir build
        - cd build
        - cmake -DLIBIGL_USE_STATIC_LIBRARY=ON  -DCMAKE_CXX_COMPILER=g++-4.8 -DCMAKE_C_COMPILER=gcc-4.8 -DLIBIGL_WITH_EMBREE=OFF ../
        - make -j 2
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - george-edison55-precise-backports
          packages:
            - xorg-dev
            - libglu1-mesa-dev
            - g++-4.8
            - cmake
            - cmake-data
            - libblas-dev
            - liblapack-dev
    #         - binutils
    #         - libx11-dev
    #         - mesa-common-dev
    #         - libgl1-mesa-dev
    #         - libglu1-mesa-dev
    #         - libxrandr-dev
    #         - libxi-dev
    #         - libxmu-dev
    #         - libblas-dev
    #         - xorg-dev
    - os: osx
      compiler: clang
      script:
        # - brew update
        # - brew upgrade cmake
        # - brew upgrade cgal
        - git submodule update --init --recursive
        - cd python
        - mkdir build
        - cd build
        - cmake ../
        - make -j 2
        - cd ../tutorial
        - python 101_FileIO.py
        - cd ../../
        - cd tutorial
        - mkdir build
        - cd build
        - cmake -DLIBIGL_USE_STATIC_LIBRARY=ON ../
        - make -j 2
