Is it possible to get Travis CI working with Clang that is capable of C++11? (I want Clang, not GCC, I already have GCC 4.8 working in Travis CI.) It appears that the version th
sudo: false
dist: trusty
language: cpp
os:
- linux
compiler:
- gcc
- clang
install:
# /usr/bin/gcc is 4.6 always, but gcc-X.Y is available.
- if [[ $CXX = g++ ]]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
# /usr/bin/clang has a conflict with gcc, so use clang-X.Y.
- if [[ $CXX = clang++ ]]; then export CXX="clang++-3.5" CC="clang-3.5"; fi
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5 # not sure why we needed this
packages:
- gcc-4.9
- g++-4.9
- clang-3.5
(The explicit sudo: false
will let it build in Docker (for speed) even if you have a pre-docker repo, according to Travis support.)
Thanks to solarce at Travis support for noticing my error and fixing the docs.