forked from FHW-AutonomousDriving/Cariosity2018
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_user.sh
executable file
·56 lines (39 loc) · 1.01 KB
/
build_user.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
#!/bin/sh
if which cmake > /dev/null; then
echo "cmake found"
else
echo "cmake not found. Make sure it's in your PATH."
exit 1
fi
## if commandline cleanup before build
## rm -rf _build_user
## fi
## configure debug
if [ -d ./_build_user_debug ]; then
echo "Debug build exists. Will using it."
else
mkdir ./_build_user_debug
echo "Creating build directory _build_user_debug."
fi
cd ./_build_user_debug
echo "Generate cmake config debug"
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../src/aadcUser
## build debug
echo "Build debug ..."
cmake --build . --target install -- -j4
cd ..
## configure release
if [ -d ./_build_user ]; then
echo "Build exists. Will using it."
else
mkdir ./_build_user
echo "Creating build directory _build_user"
fi
echo "Entering build directory"
cd ./_build_user
echo "generate cmake config"
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../src/aadcUser
## build release
echo "Build release ..."
cmake --build . --target install -- -j4
cd ..