forked from lothran/d4v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·125 lines (107 loc) · 2.47 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/bin/bash
set -e
set -u
set -o pipefail
opt=0
while getopts 'dsl' OPTION
do
case "$OPTION" in
d)
opt=1
;;
s)
opt=2
;;
l)
opt=3
;;
esac
done
curRep=$PWD
echo building glucose
if [ $opt -eq 1 ]
then
if ! [ -f 3rdParty/glucose-3.0/core/lib_debug.a ]
then
cd 3rdParty/glucose-3.0/core/
make libd
fi
elif [ $opt -eq 2 ]
then
if ! [ -f 3rdParty/glucose-3.0/core/lib_static.a ]
then
cd 3rdParty/glucose-3.0/core/
make libst
fi
else
if ! [ -f 3rdParty/glucose-3.0/core/lib_standard.a ]
then
cd 3rdParty/glucose-3.0/core/
make libs
fi
fi
echo building kahypar
if [ ! -f 3rdParty/kahypar/build/lib/libkahypar.a ]
then
cd $curRep
cd 3rdParty/kahypar/
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DKAHYPAR_USE_MINIMAL_BOOST=ON
make -j
fi
echo building cryptominisat
if [ ! -f ./3rdParty/cryptominisat/build/lib/libcryptominisat5.so ]
then
cd $curRep
cd 3rdParty/cryptominisat
mkdir -p build
cd build
cmake -DCMAKE_CXX_FLAGS="-include cstdint" -DCMAKE_BUILD_TYPE=Release ..
make -j12
fi
echo building louvain-community
if [ ! -f ./3rdParty/louvain-community/build/lib/liblouvain_communities.so ]
then
cd $curRep
cd 3rdParty/louvain-community
mkdir -p build
cd build
cmake -DCMAKE_CXX_FLAGS="-include cstdint" -DCMAKE_BUILD_TYPE=Release ..
make -j12
fi
echo building gmp
if [ ! -f "./3rdParty/gmp/lib/libgmp.a" ]
then
cd /tmp
wget https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz
tar -xvf gmp-6.3.0.tar.xz
cd gmp-6.3.0
./configure --enable-cxx --prefix=$curRep/3rdParty/gmp/ --enable-fat CFLAGS="-march=native -O3" CXXFLAGS="-march=native -O3"
make -j12 install
fi
echo building arjun
if [ ! -f ./3rdParty/arjun/build/lib/libarjun.so ]
then
cd $curRep
cd 3rdParty/arjun
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH="../../louvain-community/build;../../cryptominisat/build" -DCMAKE_BUILD_TYPE=Release ..
make -j12
fi
echo building mt-kahypar
if [ ! -f 3rdParty/mt-kahypar/build/lib/libmtkahypar.so ]
then
cd $curRep
cd 3rdParty/mt-kahypar
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DKAHYPAR_DOWNLOAD_TBB=On -G Ninja
cmake --build . --target mtkahypar
fi
cd $curRep
mkdir -p build
cd build
cmake -GNinja .. -DBUILD_MODE=$opt
ninja