You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a robotics developer who uses colcon to build and test multiple C++ packages.
An example repository is navigation2, which contains a number of folders with CMakeLists in each project. There is no top-level CMakeLists. The repository contains a VSCode devcontainer at the top level. Developers will usually be making code changes in multiple projects in a single development task.
In CLI, to build the whole project, you type colcon build, which recursively builds each project in the correct order (specified by the package.xml).
As a ROS developer who uses CMake a lot, I really struggle to use the CMake Tools when working in a colcon project because of the multi-root workspace.
Desired behavior
I can run a build task that "builds everything" under the CMake tools. If there is an error at configure time, the CMake tools will automatically add a breakpoint and open the CMake tools debugger
Actual behavior
I have to build all the dependent packages, then configure with VSCode to select the failing package as the root, source the workspace, and rebuild with the debugger. If I am doing a build system rework, such as changing the name of a target used in many other projects in the workspace, this workflow is very tedius and time consuming.
Request
Are there any recommendations for working in a multi-root workspace where there is not a single top level workspace.
I understand colcon is a tool not all CMake developers use, however I can imagine there are others with similar repository layouts that use build scripts to build multiple packages and want a similar debug experience for CMake configuration.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Background
I'm a robotics developer who uses colcon to build and test multiple C++ packages.
An example repository is navigation2, which contains a number of folders with CMakeLists in each project. There is no top-level CMakeLists. The repository contains a VSCode devcontainer at the top level. Developers will usually be making code changes in multiple projects in a single development task.
In CLI, to build the whole project, you type
colcon build
, which recursively builds each project in the correct order (specified by thepackage.xml
).As a ROS developer who uses CMake a lot, I really struggle to use the CMake Tools when working in a
colcon
project because of the multi-root workspace.Desired behavior
I can run a build task that "builds everything" under the CMake tools. If there is an error at configure time, the CMake tools will automatically add a breakpoint and open the CMake tools debugger
Actual behavior
I have to build all the dependent packages, then configure with VSCode to select the failing package as the root, source the workspace, and rebuild with the debugger. If I am doing a build system rework, such as changing the name of a target used in many other projects in the workspace, this workflow is very tedius and time consuming.
Request
Are there any recommendations for working in a multi-root workspace where there is not a single top level workspace.
I understand
colcon
is a tool not all CMake developers use, however I can imagine there are others with similar repository layouts that use build scripts to build multiple packages and want a similar debug experience for CMake configuration.Beta Was this translation helpful? Give feedback.
All reactions