-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild_dune.sh
More file actions
executable file
·42 lines (38 loc) · 1.28 KB
/
Copy pathbuild_dune.sh
File metadata and controls
executable file
·42 lines (38 loc) · 1.28 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
#!/bin/bash
# Edit the next two variables to match your wishes and system.
install_prefix="/Users/FCUR/duneinstall"
parallel_build_tasks=4
# Set of modules to build
modules="dune-common dune-geometry dune-grid dune-istl"
# Clone modules, check out the 2.9 release.
for m in $modules; do
echo "==================================================="
echo "= Cloning module: $m"
echo "==================================================="
(
if [ ! -d "$m" ]; then
git clone -b releases/2.9 https://gitlab.dune-project.org/core/$m.git
else
echo "******** Skipping $m, module already cloned."
fi
)
done
# Build the modules, and install them to the chosen directory
for m in $modules; do
echo "==================================================="
echo "= Building module: $m"
echo "==================================================="
(
cd $m
builddir="build-cmake"
if [ ! -d "$builddir" ]; then
mkdir "$builddir"
cd "$builddir"
cmake -DCMAKE_INSTALL_PREFIX=$install_prefix ".."
make -j $parallel_build_tasks
make install
else
echo "******** Skipping $m, build dir $builddir already exists."
fi
)
done