-
Notifications
You must be signed in to change notification settings - Fork 46
/
build.sh
executable file
·43 lines (34 loc) · 1.08 KB
/
build.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
# get the absolute path to this directory
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
set -e
help_message()
{
echo "usage: $0 [--python]"
echo "this script builds smt-switch and the C++ examples"
echo "it also builds and installs the python bindings if run with --python"
exit 0
}
if [[ "$1" == "--help" ]]; then
help_message
fi
if [ $# -gt 2 ]; then
help_message
elif [[ $# -eq 1 && "$1" != "--python" ]]; then
help_message
fi
# go to main repo directory
cd $DIR/..
# configure and build smt-switch with boolector and cvc5 backends
# set it up to be installed in a directory called example-install in the examples directory
# also use a build directory in the examples directory
./configure.sh --btor --cvc5 --prefix=./examples/example-install --build-dir=$DIR/example-build $1
cd $DIR/example-build
make
make test
make install
cd $DIR
# now make the examples
make
# install python bindings with pip
# this line might need to be adjusted depending on your current python environment
python3 -m pip install -e $DIR/example-build/python