forked from devsim/devsim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_fedora.sh
More file actions
executable file
·51 lines (44 loc) · 1.16 KB
/
build_fedora.sh
File metadata and controls
executable file
·51 lines (44 loc) · 1.16 KB
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
#!/bin/bash
set -e
DSDIR=$PWD
# Fedora Specific
#https://fedoraproject.org/wiki/EPEL
# in Docker, the default user is root, and sudo is not installed
SUDO=""
if [[ ${EUID} -ne 0 ]]; then
SUDO=sudo
fi
${SUDO} dnf install -y git bison flex tcl tcl-devel cmake3 gcc gcc-c++ libquadmath-devel \
gcc-gfortran bzip2 boost boost-devel cgnslib cgnslib-devel \
sqlite-devel python3-devel blas-devel lapack-devel SuperLU SuperLU-devel \
make rsync
export CMAKE="cmake"
export CMAKE_CXX_FLAGS=""
export CC=gcc
export CXX=g++
export F77=gfortran
export PYTHON3_BIN=python3
export PYTHON3_INCLUDE=$(python3 -c "from sysconfig import get_paths as gp; print(gp()['include'])")
export PYTHON3_ARCHIVE=""
git submodule init &&
git submodule update
# quad precision getrf
(
cd ${DSDIR}/external/getrf &&
mkdir -p build &&
cd build &&
cmake -DCMAKE_Fortran_FLAGS="-freal-8-real-16 -ffixed-line-length-0 -fPIC" -DCMAKE_BUILD_TYPE=RELEASE .. &&
make -j4
)
# SYMDIFF build
(
cd ${DSDIR}/external/symdiff &&
${DSDIR}/scripts/setup_fedora.sh &&
cd linux_x86_64_release && make -i -j4
)
# Finally, build devsim
(
cd ${DSDIR} &&
scripts/setup_fedora.sh &&
cd linux_x86_64_release && make -j4
)