Skip to content

Commit

Permalink
Add README message that compdb now works
Browse files Browse the repository at this point in the history
  • Loading branch information
Kev committed Feb 24, 2015
1 parent b87d1c8 commit 1fb8361
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ The .clang-complete is used by vim's clang-complete script. It contains all the
flags needed by a project, one flag per line. It's fairly coarse, not allowing
different flags per file, but is still easy to generate, and sufficient for
most projects.

### CompDB

CompDB is a JSON format for specifying the per-file compilation flags (http://clang.llvm.org/docs/JSONCompilationDatabase.html). Clang-flags will look for such a definition recursively up the tree in files called compile-commands.json, treating the location of such a file as the root of the project for relative paths. How to generate such a file depends on the build system in use - ninja and cmake can both generate them natively, and a tool called 'bear' can generate them for other build systems. For example, with ninja a command such as `ninja -t compdb cc cxx > compile_commands.json` might get you what you need.

0 comments on commit 1fb8361

Please sign in to comment.