Skip to content

Add compile-commands.json generation for Managed Build Projects #689

Closed
@Kummallinen

Description

@Kummallinen

To support the CDT-LSP editor & other uses of language servers or external tools that expect a cmake compilation database we should add support for generating "compile-commands.json" to managed build projects.

There is already enough data in the existing managed build system to generate the file, so long as any extenders are using the command generator interfaces where they needed to customise tool commands.

Should be enabled by default, but have an option to disable on a per-project basis.

Need to consider how multiple configurations, probably just 1 file which matches active project unless we can make the language launcher aware of them.

File should be placed where ClangD expects to find it, so either in the project root or "build" directory. I suggest the "build" directory.

Renesas already has an internal version of this feature, we will contribute this & work with the community to modify as needed to fit CDTs requirements.

Metadata

Metadata

Assignees

Labels

buildBuild components of CDT, anything to do with running the compiler, using Make, CMake, or any builderfeaturerequestA new feature or enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions