-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.sh
executable file
·76 lines (62 loc) · 1.75 KB
/
make.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
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
# ==================================================================
# Codac - build script
# ==================================================================
#!/bin/bash
# Possible commands:
# ./build.sh
# ./build.sh all
# ./build.sh tests
# ./build.sh examples
# ./build.sh clean
# ./build.sh all clean
# ./build.sh tests clean
# ./build.sh examples clean
CODAC_DIR="$(pwd)"
if [ -z "${WITH_TUBE_TREE}" ]
then
# in case of undefined WITH_TUBE_TREE variable
WITH_TUBE_TREE=OFF
fi
# Cleaning before build
if [ $# -ne 0 ] && ([ "$1" = "clean" ] || [ "$2" = "clean" ])
then
find . -name build | xargs rm -fr
fi
# Building Codac library
mkdir build -p
cd build
# Possibly with tests
if [ $# -ne 0 ] && ([ "$1" = "tests" ] || [ "$1" = "all" ])
then
cmake -DBUILD_TESTS=ON -DTEST_EXAMPLES=ON -DWITH_TUBE_TREE="${WITH_TUBE_TREE}" ..
else
cmake -DBUILD_TESTS=OFF -DWITH_TUBE_TREE="${WITH_TUBE_TREE}" ..
fi
make -j
make api
make doc
cd ..
# Building examples independently
if [ $# -ne 0 ] && ([ "$1" = "examples" ] || [ "$1" = "all" ])
then
cd build
make install
cd ..
cd examples
cd linobs
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ..
cd basics
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ..
cd robotics
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ..
cd tuto
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ..
cd lie_group
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ..
cd ..
fi