Skip to content

xulongwu4/bazel-compilation-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Usage

Note

It is highly recommended to have jq installed so that the generated compile_commands.json is formatted nicely.

Add the following lines to MODULE.bazel:

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

Copy the generate_compile_commands/generate_compilation_database.sh to the workspace of your project.

Then one can generate compile_commands.json by running the following command from the workspace of the project:

./generate_compilation_database.sh

About

Generation of bazel compilation database

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published