-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·48 lines (39 loc) · 1.18 KB
/
build.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
#!/bin/bash
BUILD_TYPE="Release"
GENERATOR="Unix Makefiles"
SRC_DIR=$(pwd)
EXT_SRC_DIR="${SRC_DIR}/external"
export VTRSRC="${SRC_DIR}/vtr3"
export EXPSSRC="${SRC_DIR}/exps"
# BUILD_DIR="${SRC_DIR}/cmake-build-${BUILD_TYPE}"
# EXT_BUILD_DIR=$BUILD_DIR/external
# mkdir -p $BUILD_DIR
# mkdir -p $EXT_BUILD_DIR
check_status_code() {
if [ $1 -ne 0 ]; then
echo "[VTR3] Failure. Exiting."
exit 1
fi
}
# echo "[VTR3] -- [EXTERNAL DEPENDENCIES] -- Generating the cmake project"
# cd ${EXT_BUILD_DIR}
# cmake -G "$GENERATOR" -S $EXT_SRC_DIR -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
# check_status_code $?
# echo "[VTR3] -- [EXTERNAL DEPENDENCIES] -- building CMake Project"
# cmake --build . --config $BUILD_TYPE
# check_status_code $?
echo "[VTR3] -- [VTR3] -- building vtr3 packages"
cd ${VTRSRC}/main
source /opt/ros/galactic/setup.bash
colcon build --symlink-install \
--packages-up-to vtr_lidar vtr_radar vtr_radar_lidar \
--cmake-args \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE}
check_status_code $?
echo "[EXPS] -- [EXPS] -- building exps package"
cd ${EXPSSRC}
source ${VTRSRC}/main/install/setup.bash
colcon build --symlink-install \
--cmake-args \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE}
check_status_code $?