-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·87 lines (59 loc) · 1.72 KB
/
bootstrap.sh
File metadata and controls
executable file
·87 lines (59 loc) · 1.72 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
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
#!/bin/sh
JOBS=$1
BASE_DIR="$(dirname "$(realpath "$0")")"
if [ -z "$JOBS" ]; then
JOBS=1
fi
function build_numdiff () {
START_DIR=$PWD
echo "=============== Bulding numdiff ==============="
wget https://download.savannah.gnu.org/releases/numdiff/numdiff-5.9.0.tar.gz
tar xfz numdiff-5.9.0.tar.gz
cd numdiff-5.9.0
patch -p1 < $BASE_DIR/patches/numdiff.patch
./configure --prefix=$START_DIR/install
make -j $JOBS && make install
cd $START_DIR
echo " -Dnumdiff_DIR=$START_DIR/install/bin \\" >> cmake_args
}
function build_generator () {
START_DIR=$PWD
echo "=============== Bulding AD DSL generator ==============="
git clone https://github.com/SciCompKL/ad_dsl_generator
cd ad_dsl_generator
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$START_DIR/install -DBUILD_TESTING=OFF
make -j $JOBS && make install
cd $START_DIR
echo " -DGenerator_DIR=$START_DIR/install/bin \\" >> cmake_args
}
function build_eigen() {
START_DIR=$PWD
echo "=============== Bulding eigen ==============="
git clone https://gitlab.com/libeigen/eigen.git
cd eigen
git checkout 3.4.1
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$START_DIR/install
make -j $JOBS && make install
cd $START_DIR
echo " -DEigen_DIR=$START_DIR/install/share/eigen3/cmake \\" >> cmake_args
}
function get_codi () {
START_DIR=$PWD
echo "=============== Getting CoDiPack ==============="
git clone https://github.com/SciCompKL/CoDiPack.git
cd $START_DIR
echo " -DCoDiPack_DIR=$START_DIR/CoDiPack/cmake \\" >> cmake_args
}
mkdir subprojects
cd subprojects
echo "CC=clang CXX=clang++ cmake -B build \\" > cmake_args
build_numdiff
build_generator
build_eigen
get_codi
echo "Configure with:"
cat cmake_args