Merge pull request #212 from MultiMC/feature_travis_clang

Get Travis to build GCC and Clang versions on Linux as we consider moving to Clang on Linux in general
This commit is contained in:
Sky 2014-04-12 17:30:21 +01:00
commit 04b36a3e55
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
language: cpp language: cpp
compiler: compiler:
- gcc - gcc
- clang
cache: apt cache: apt
before_install: before_install:
- sudo apt-add-repository -y ppa:beineri/opt-qt521 - sudo apt-add-repository -y ppa:beineri/opt-qt521
@ -9,7 +10,7 @@ before_install:
- sudo apt-get update -qq - sudo apt-get update -qq
install: install:
- sudo apt-get install -y -qq cmake qt52base qt52svg qt52tools qt52x11extras - sudo apt-get install -y -qq cmake qt52base qt52svg qt52tools qt52x11extras
- if [ "$CXX" = "g++" ]; then sudo apt-get install -y -qq g++-4.8; fi - sudo apt-get install -y -qq g++-4.8
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
before_script: before_script:
- mkdir build - mkdir build

View File

@ -4,7 +4,7 @@ endif()
set(__USECXX11_CMAKE__ TRUE) set(__USECXX11_CMAKE__ TRUE)
if(APPLE) if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++11")
elseif(UNIX) elseif(UNIX)
# assume GCC, add C++0x/C++11 stuff # assume GCC, add C++0x/C++11 stuff
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")