Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 654 Bytes

File metadata and controls

25 lines (19 loc) · 654 Bytes

A set of tools to generate compilation databases for bazel-based projects

Usage

Note

Use the workspace branch for older versions of bazel that use the WORKSPACE file

Add the following lines to the MODULE.bazel file of the project:

bazel_dep(name = "compile_commands_generator", dev_dependency = True)
git_override(
    module_name = "compile_commands_generator",
    branch = "main",
    remote = "https://github.com/xulongwu4/bazel-compilation-database.git",
)

Then run the following command to generate the compilation database:

bazel run @compile_commands_generator//:generate_compilation_database