This repository has been archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
build-dreal.sh
executable file
·63 lines (53 loc) · 1.61 KB
/
build-dreal.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env bash
# Author: Soonho Kong ([email protected])
OS=`uname`
echo OS: $OS
########################################################################
# Find C++11 Compiler and C Compiler
########################################################################
for CXX in ccache-g++ g++-4.8 g++-4.9 ccache-clang++ clang++-3.5 clang++-3.4 clang++-3.3
do
CXX_PATHNAME=`which $CXX`
if [ -e "${CXX_PATHNAME}" ]; then
echo CXX: ${CXX} found at ${CXX_PATHNAME}...
break;
fi
done
if [ ! -e "${CXX_PATHNAME}" ]; then
cat <<EOF
It seems that C++11-compatible compilers are not installed on your system.
Please install either g++ 4.8 (or newer) or clang++ 3.3 (or newer).
Ubuntu + g++-4.8
================
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo add-apt-repository ppa:dns/gnu -y
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo apt-get update
sudo apt-get install -qq g++-4.8
sudo apt-get upgrade
sudo apt-get dist-upgrade -y
OSX + g++-4.8
=============
brew install gcc
EOF
exit 1
fi
for CC in gcc-4.8 gcc-4.9 clang-3.5 clang-3.4 clang-3.3
do
CC_PATHNAME=`which $CC`
if [ -e "$CC_PATHNAME" ]; then
echo CC: $CC found at ${CC_PATHNAME}...
break;
fi
done
########################################################################
# Build Solver (C++)
########################################################################
if [ ! -d build ]; then
mkdir build
fi
cd build
cmake -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -DCMAKE_BUILD_TYPE=RELEASE ../src
make -j
cd ../