Skip to content

Commit

Permalink
[vscode] update env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Apr 26, 2024
1 parent b0fa20e commit efa4aa8
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions vscode/install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ code --install-extension ms-iot.vscode-ros\
--force

# Configure workspace
workspacefile="${TUE_SYSTEM_DIR}/.vscode/settings.json"
mkdir -p "${TUE_SYSTEM_DIR}/.vscode"
workspacefile="${TUE_ENV_WS_DIR}/.vscode/settings.json"
mkdir -p "${TUE_ENV_WS_DIR}/.vscode"
if [[ ! -f "${workspacefile}" ]]
then
tue-install-cp workspace_settings.json "${workspacefile}"
Expand All @@ -23,14 +23,17 @@ else
fi
fi

# Install and configure catkin tools extension
if ! catkin config --workspace "$TUE_SYSTEM_DIR" | grep -q "DCMAKE_EXPORT_COMPILE_COMMANDS"
if [[ "${TUE_ENV_ROS_VERSION}" == "1" ]]
then
catkin config --workspace "$TUE_SYSTEM_DIR" --append-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
# Install and configure catkin tools extension
if ! catkin config --workspace "$TUE_ENV_WS_DIR" | grep -q "DCMAKE_EXPORT_COMPILE_COMMANDS"
then
catkin config --workspace "$TUE_ENV_WS_DIR" --append-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
fi
fi

# Configure to build only active package
tasksfile="${TUE_SYSTEM_DIR}/.vscode/tasks.json"
tasksfile="${TUE_ENV_WS_DIR}/.vscode/tasks.json"
if [[ ! -f "${tasksfile}" ]] # If user already has one, don't overwrite
then
tue-install-cp tasks.json "${tasksfile}"
Expand Down

0 comments on commit efa4aa8

Please sign in to comment.