Skip to content

Export compile_commands.json #1099

@ZedThree

Description

@ZedThree

Description

It would be lovely to automatically export a compile_commands.json file to the build directory. This would make it easy for other tools to pick up the compile flags.

Possible Solution

No response

Additional Information

This can be done with CMake with the CMAKE_EXPORT_COMPILE_COMMANDS option, or with bear more generically.

The file spec is pretty simple, just a JSON list, one element per file, with a few fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions