forked from jrprice/Oclgrind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis-deps.sh
26 lines (22 loc) · 863 Bytes
/
.travis-deps.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
if [ "$TRAVIS_OS_NAME" == "linux" ]
then
# Add repositories
sudo add-apt-repository -y 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main'
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update -qq
# Remove existing LLVM
sudo apt-get remove llvm
# Install Clang + LLVM
sudo apt-get install -y llvm-4.0-dev libclang-4.0-dev clang-4.0
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-4.0 20
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-4.0 20
sudo rm -f /usr/local/clang-3.5.0/bin/clang
sudo rm -f /usr/local/clang-3.5.0/bin/clang++
# Other dependencies
sudo apt-get install -y libedit-dev
elif [ "$TRAVIS_OS_NAME" == "osx" ]
then
brew update
brew install -v llvm --with-clang
fi