-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake
More file actions
executable file
·57 lines (42 loc) · 959 Bytes
/
make
File metadata and controls
executable file
·57 lines (42 loc) · 959 Bytes
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
#!/bin/sh
if [ "$1" = "libOpenCOR" -o "$1" = "OpenCOR" ]; then
mode=$1
elif [ "$1" != "" ]; then
echo "Usage: $0 [libOpenCOR|OpenCOR]"
exit 1
fi
if [ "`hash ninja 2>&1`" = "" ]; then
ninjaFound=true
generator="Ninja"
cmakeGenerator="Ninja"
else
ninjaFound=false
generator="Make"
cmakeGenerator="Unix Makefiles"
fi
if [ "$1" == "" ]; then
echo "\033[44;37;1mMaking the general documentation for libOpenCOR and OpenCOR (using $generator)...\033[0m"
else
echo "\033[44;37;1mMaking the general documentation for $mode (using $generator)...\033[0m"
fi
cd build
cmake -G "$cmakeGenerator" -DMODE=$mode -DENABLE_DOWNLOADS=ON ..
exitCode=$?
if [ $exitCode -ne 0 ]; then
cd ..
exit $exitCode
fi
if [ $# -gt 0 ]; then
shift
fi
if [ $ninjaFound = true ]; then
ninja $@
else
make $@
fi
exitCode=$?
cd ..
if [ $exitCode -eq 0 ]; then
echo "\033[42;37;1mAll done!\033[0m"
fi
exit $exitCode