-
Notifications
You must be signed in to change notification settings - Fork 0
/
get-cvc5.sh
executable file
·53 lines (43 loc) · 1.43 KB
/
get-cvc5.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
#!/bin/sh
tag="cvc5-1.2.0"
build() {
mkdir -p build
cd build || exit 1
# get cvc5 release
if [ ! -d cvc5 ]
then
echo "Cloning $tag"
git clone --depth 1 --branch "$tag" https://github.com/cvc5/cvc5.git || exit 1
cd cvc5 || exit 1
else
echo "Updating to $tag"
cd cvc5 || exit 1
git fetch origin tag "$tag"
git checkout "$tag" || exit 1
fi
# prepare build
./configure.sh production --static-binary --java-bindings --no-poly --auto-download --prefix=build/install || exit 1
cd build || exit 1
# build on all cores
make -j"$(nproc)" || exit 1
make install || exit 1
# move back to start directory
cd ../../..
cp -L build/cvc5/build/install/share/java/cvc5.jar lib/
cp -L build/cvc5/build/install/lib/libcvc5.so.1 lib/
cp -L build/cvc5/build/install/lib/libcvc5jni.so lib/
cp -L build/cvc5/build/install/lib/libcvc5parser.so.1 lib/
}
download() {
cd lib || exit 1
curl -LO "https://github.com/cvc5/cvc5/releases/download/$tag/cvc5-Linux-x86_64-shared.zip" || exit 1
unzip -oj "cvc5-Linux-x86_64-shared.zip" \
"cvc5-Linux-x86_64-shared/lib/libcvc5jni.so" \
"cvc5-Linux-x86_64-shared/lib/libcvc5.so.1" \
"cvc5-Linux-x86_64-shared/lib/libcvc5parser.so.1" \
"cvc5-Linux-x86_64-shared/lib/libpoly.so.0" \
"cvc5-Linux-x86_64-shared/lib/libpolyxx.so.0" \
"cvc5-Linux-x86_64-shared/share/java/cvc5.jar" || exit 1
rm "cvc5-Linux-x86_64-shared.zip"
}
download