forked from NHERI-SimCenter/R2DTool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makeEXE.sh
executable file
·46 lines (39 loc) · 979 Bytes
/
makeEXE.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
#!/bin/bash
release=${1:-"NO_RELEASE"}
#
# create build dir if does not exist, cd to build, conan install and then qmake
#
mkdir -p build
cd build
# conan install
conan install .. --build missing
cmd_status=$?
if [[ $cmd_status != 0 ]]
then
echo "R2D: conan install failed";
exit $cmd_status;
fi
# qmake
if [ -n "$release" ] && [ "$release" = "release" ]; then
echo "******** RELEASE BUILD *************"
qmake QMAKE_CXXFLAGS+=-D_SC_RELEASE ../R2D.pro
cmd_status=$?; if [[ $cmd_status != 0 ]]; then echo "R2D: qmake failed"; exit $cmd_status; fi
else
echo "********* NON RELEASE BUILD ********"
qmake ../RD2.pro
cmd_status=$?; if [[ $cmd_status != 0 ]]; then echo "R2D: qmake failed"; exit $cmd_status; fi
fi
cmd_status=$?
if [[ $cmd_status != 0 ]]
then
echo "R2D: qmake failed";
exit $cmd_status;
fi
# make
make
cmd_status=$?;
if [[ $cmd_status != 0 ]]
then
echo "R2D: make failed";
exit $cmd_status;
fi