Upgrade travis to use CMake 2.8.12 and add Clang builders
diff --git a/.travis-setup.sh b/.travis-setup.sh
new file mode 100644
index 0000000..c900fa9
--- /dev/null
+++ b/.travis-setup.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+# Before install
+
+sudo add-apt-repository -y ppa:kalakris/cmake
+if [ "$STD" = "c++11" ]; then
+    sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
+    if [ "$CXX" = "clang++" ]; then
+        wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
+        sudo add-apt-repository -y "deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.6 main"
+    fi
+fi
+sudo apt-get update -qq
+
+# Install
+sudo apt-get install -qq cmake
+if [ "$STD" = "c++11" ] && [ "$CXX" = "g++" ]; then
+    sudo apt-get install -qq gcc-4.8 g++-4.8
+    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 90
+    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90
+elif [ "$CXX" = "clang++" ]; then
+    sudo apt-get install -qq clang-3.6
+    sudo update-alternatives --install /usr/local/bin/clang   clang   /usr/bin/clang-3.6 90
+    sudo update-alternatives --install /usr/local/bin/clang++ clang++ /usr/bin/clang++-3.6 90
+    export PATH=/usr/local/bin:$PATH
+fi
diff --git a/.travis.yml b/.travis.yml
index c07ee0f..91e82eb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,32 +1,24 @@
+language: cpp
+
+# NOTE: The COMPILER variable is unused. It simply makes the display on
+# travis-ci.org more readable.
 matrix:
-  include:
-    - os: linux
-      env: BUILD_TYPE=Debug   STD=c++0x
-    - os: linux
-      env: BUILD_TYPE=Debug   STD=c++11
-    - os: linux
-      env: BUILD_TYPE=Release STD=c++0x
-    - os: linux
-      env: BUILD_TYPE=Release STD=c++11
-    - os: osx
-      env: BUILD_TYPE=Debug   STD=c++11
-    - os: osx
-      env: BUILD_TYPE=Release STD=c++11
-
-language:
-    - cpp
-
-before_install:
-    - uname -a
-    - cmake --version
-    - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$STD" = "c++11" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
-    - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$STD" = "c++11" ]; then sudo apt-get update -qq; fi
-
-install:
-    - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$STD" = "c++11" ]; then sudo apt-get install -qq gcc-4.8 g++-4.8; fi
-    - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$STD" = "c++11" ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90; fi
+    include:
+        - compiler: gcc
+          env: COMPILER=g++-4.6     STD=c++0x BUILD_TYPE=Debug
+        - compiler: gcc
+          env: COMPILER=g++-4.6     STD=c++0x BUILD_TYPE=Release
+        - compiler: gcc
+          env: COMPILER=g++-4.8     STD=c++11 BUILD_TYPE=Debug
+        - compiler: gcc
+          env: COMPILER=g++-4.8     STD=c++11 BUILD_TYPE=Release
+        - compiler: clang
+          env: COMPILER=clang++-3.6 STD=c++11 BUILD_TYPE=Debug
+        - compiler: clang
+          env: COMPILER=clang++-3.6 STD=c++11 BUILD_TYPE=Release
 
 before_script:
+    - source .travis-setup.sh
     - mkdir build && cd build
 
 script: