forked from ndrplz/self-driving-car
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_ipopt.sh
executable file
·45 lines (38 loc) · 964 Bytes
/
install_ipopt.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
# Pass the Ipopt source directory as the first argument
if [ -z $1 ]
then
echo "Specifiy the location of the Ipopt source directory in the first argument."
exit
fi
cd $1
prefix=/usr/local
srcdir=$PWD
echo "Building Ipopt from ${srcdir}"
echo "Saving headers and libraries to ${prefix}"
# BLAS
cd $srcdir/ThirdParty/Blas
./get.Blas
mkdir -p build && cd build
../configure --prefix=$prefix --disable-shared --with-pic
make install
# Lapack
cd $srcdir/ThirdParty/Lapack
./get.Lapack
mkdir -p build && cd build
../configure --prefix=$prefix --disable-shared --with-pic \
--with-blas="$prefix/lib/libcoinblas.a -lgfortran"
make install
# ASL
cd $srcdir//ThirdParty/ASL
./get.ASL
# MUMPS
cd $srcdir/ThirdParty/Mumps
./get.Mumps
# build everything
cd $srcdir
./configure --prefix=$prefix coin_skip_warn_cxxflags=yes \
--with-blas="$prefix/lib/libcoinblas.a -lgfortran" \
--with-lapack=$prefix/lib/libcoinlapack.a
make
make test
make -j1 install