-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_linux.sh
More file actions
70 lines (56 loc) · 1.42 KB
/
build_linux.sh
File metadata and controls
70 lines (56 loc) · 1.42 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
#!/bin/bash -e
NUM_CORES=$(grep -c processor /proc/cpuinfo)
export DAL_DIR=$PWD
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH
export BUILD_TYPE=Release
export SKIP_TESTS=false
export USE_COVERAGE=false # make it `false` when you need a full performance lib
export CMAKE_EXPORT_COMPILE_COMMANDS=on
echo NUM_CORES: $NUM_CORES
echo BUILD_TYPE: $BUILD_TYPE
echo SKIP_TESTS: $SKIP_TESTS
echo USE_COVERAGE: $USE_COVERAGE
echo DAL_DIR: "$DAL_DIR"
echo CMAKE_EXPORT_COMPILE_COMMANDS: $CMAKE_EXPORT_COMPILE_COMMANDS
rm -rf ./bin
rm -rf ./lib
(
cd external/machinist || exit
bash -e ./build_linux.sh
)
if [ $? -ne 0 ]; then
exit 1
fi
export MACHINIST_TEMPLATE_DIR=$PWD/external/machinist/template/
./external/machinist/bin/Machinist -c config/dal.ifc -l config/dal.mgl -d ./dal
./external/machinist/bin/Machinist -c config/dal.ifc -l config/dal.mgl -d ./public
if [ $? -ne 0 ]; then
exit 1
fi
(
cd external/xad || exit
rm -rf build
mkdir -p build
cd build || exit
cmake --preset ${BUILD_TYPE}-linux ..
make -j"${NUM_CORES}"
make install
)
if [ $? -ne 0 ]; then
exit 1
fi
rm -rf build
mkdir -p build
(
cd build || exit
cmake --preset ${BUILD_TYPE}-linux -DUSE_COVERAGE=$USE_COVERAGE -DCMAKE_EXPORT_COMPILE_COMMANDS=$CMAKE_EXPORT_COMPILE_COMMANDS ..
make -j"${NUM_CORES}"
make install
)
if [ $? -ne 0 ]; then
exit 1
fi
if [ "$SKIP_TESTS" = "false" ]; then
bin/test_suite
fi
echo "Finished building of Derivatives Algorithms Library"