Pick one of the following approaches. It is highly recommended to have
jq
installed
so that the generated compile_commands.json
is formatted nicely.
Copy (or symlink) the kythe
directory to the workspace of your project. Then add
the following lines to the WORKSPACE
file:
load("//kythe/generate_compile_commands:deps.bzl", "load_kythe_deps")
load_kythe_deps()
One can generate the compilation database by using the following command in the workspace directory:
kythe/generate_compile_commands/generate_compilation_database.sh
Copy (or symlink) the tools
directory to the workspace of your project. Then
run the script tools/generate_compilation_database.sh
in the workspace directory
to generate the compilation database:
tools/generate_compilation_database.sh