mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 07:35:08 +00:00
Updated Project Setup (markdown)
parent
c25f994e98
commit
97513bcf37
@ -85,6 +85,12 @@ Caveat on Windows: CMake dumps Windows shell command line directly into `command
|
||||
jq '[.[] | {directory: .directory, file: .file, arguments: .command | split(" ") | map(select(length > 0)) | map(sub("\\\\\""; "\""; "g"))}]' < compile_commands.json
|
||||
```
|
||||
|
||||
In some setups, CMake also puts source file of a translation unit (i.e. `*.cpp` file) after two dashes `--`, which means that after it no command-line options can be given. Unfortunately, `ccls` currently tries to add them just to the end. This modification of above helps:
|
||||
|
||||
```sh
|
||||
jq '[.[] | {directory: .directory, file: .file, arguments: .command | split(" ") | map(select(length > 0 and . != "--")) | map(sub("\\\\\""; "\""; "g"))}]' < compile_commands.json
|
||||
```
|
||||
|
||||
### [Build EAR](https://github.com/rizsotto/Bear)
|
||||
|
||||
Bear is a tool that generates a compilation database for clang tooling. It can be used for any project based on `Makefile`.
|
||||
|
Loading…
Reference in New Issue
Block a user