Skip to content

Support multiple compile commands files per project #7029

@stertingen

Description

@stertingen

Type: LanguageService

This is a feature request.

Describe the bug

  • OS and Version: Ubuntu 20.04
  • VS Code Version: 1.53.2
  • C/C++ Extension Version: v1.2.1
  • Other extensions you installed (and if the issue persists after disabling them): ROS (ms-iot.vscode-ros), disabling makes no difference.
  • Does this issue involve using SSH remote to run the extension on a remote machine?: no
  • A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).

Some ROS build systems (catkin_tools, catkin_make_isolated) run CMake separately in different repositories. Thus, passing CMAKE_EXPORT_COMPILE_COMMANDS=ON generates n files for n projects. Merging the files manually is cumbersome, so the ideal solution would be the possibility to specify multiple compile commands files and/or support wildcards in the config.

Expected behavior

This configuration to be valid and all compilation databases merged:

{
    "configurations": [
        {
            "compileCommands": [
              "${workspaceFolder}/build/foo_pkg/compile_commands.json",
              "${workspaceFolder}/build/bare_pkg/compile_commands.json",
              "${workspaceFolder}/build/**/compile_commands.json",
            ]
        }
    ],
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions