Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .devcontainer/config/sailbot_workspace.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
"label": "Build All",
"detail": "Build all packages in the workspace",
"type": "shell",
"command": "./build.sh ${input:quickBuild}",
"command": "./build.sh",
"group": {
"kind": "build",
"isDefault": true
Expand All @@ -310,7 +310,7 @@
"label": "Build Package",
"detail": "Build a specific package in the workspace",
"type": "shell",
"command": "./build.sh ${input:quickBuild} -p ${input:package}",
"command": "./build.sh -p ${input:package}",
"group": {
"kind": "build",
"isDefault": true
Expand Down Expand Up @@ -457,12 +457,6 @@
"network_systems",
]
},
{
"id": "quickBuild",
"type": "promptString",
"description": "Build arguments: -q disables static analysis and unit tests for quicker builds",
"default": "-q"
},
]
}
}
18 changes: 3 additions & 15 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,23 @@ function helpMessage() {
# If still empty after argument parsing, all ROS packages are built
PACKAGE=""

# Boolean for quick build (default is full build)
QUICK_BUILD="false"

# Parse command-line options (all are optional arguments)
while getopts "hp:q" flag; do
case ${flag} in
p ) PACKAGE="${OPTARG}" ;;
q ) QUICK_BUILD="true" ;;
h ) helpMessage; exit 0 ;;
\? ) echo "Invalid option: -${flag}"; helpMessage; exit 1 ;;
: ) echo "Option -${flag} requires an argument"; helpMessage; exit 1 ;;
esac
done

# Assign build type default
BUILD_TYPE="RelWithDebInfo"
# Assign build type debug
BUILD_TYPE="Debug"

# Whether to run clang-tidy during build (unnecessary since we have separate CI and task)
STATIC_ANALYSIS="OFF"

# Configuration for build (full or quick)
if [[ $QUICK_BUILD = "true" ]]; then
UNIT_TEST="OFF"
else
UNIT_TEST="ON"
fi
if [[ $UNIT_TEST = "ON" ]]; then
BUILD_TYPE="Debug"
fi
UNIT_TEST="ON"

# Build ROS packages in src directory
colcon build \
Expand Down