language: cpp
compiler: gcc
before_install: 
- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get update && sudo apt-get install libssl-dev cmake libboost-all-dev; fi
- if [ $TRAVIS_OS_NAME == osx ]; then 
       brew update 
    && brew unlink  boost 
    && brew install boost 
    && brew unlink  openssl 
    && brew install openssl 
    && brew unlink  cmake
    && brew install cmake; 
  fi
script: cd build && cmake .. && make
branches:
    only:
    - master
notification:
    email: true
os:
- linux
- osx

language: cpp
compiler: g++
before_install:
- if [ $TRAVIS_OS_NAME == linux ]; then 
    sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
    sudo apt-get update
  fi
install:
- if [ $TRAVIS_OS_NAME == linux ]; then 
    sudo apt-get install g++-4.8 libssl-dev cmake libboost-all-dev;
    export CXX="g++-4.8";
  fi
- if [ $TRAVIS_OS_NAME == osx ]; then 
       brew update 
    && brew unlink  boost 
    && brew install boost 
    && brew link --force boost
    && brew unlink  openssl 
    && brew install openssl 
    && brew link --force openssl
    && brew unlink  cmake
    && brew install cmake 
    && brew link --force cmake
  fi
script: cd build && cmake .. && make
branches:
    only:
    - master
notification:
    email: true
os:
- linux
- osx

Use gcc4.8, force brew link
Use gcc4.8, force brew link
