mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-28 02:21:57 +00:00
Updated compile_commands.json (markdown)
parent
3e9f847b51
commit
d6d7983b06
@ -47,7 +47,7 @@ ln -s build/compile_commands.json
|
||||
|
||||
### stdout of an external command
|
||||
|
||||
You may use the initialization option `"compilationDatabaseCommand"` to provide the JSON compilation database. cquery will read its stdout rather than read `compile_commands.json`. This may be useful when cquery cannot parse the `compile_commands.json` correctly (e.g. MSVC cl.exe, Intel C++ Compiler options)
|
||||
You may use the initialization option `"compilationDatabaseCommand"` to provide the JSON compilation database. ccls will read its stdout rather than read `compile_commands.json`. This may be useful when ccls cannot parse the `compile_commands.json` correctly (e.g. MSVC cl.exe, Intel C++ Compiler options)
|
||||
|
||||
```sh
|
||||
# extra command line option
|
||||
@ -55,7 +55,7 @@ You may use the initialization option `"compilationDatabaseCommand"` to provide
|
||||
```
|
||||
|
||||
```elisp
|
||||
(setq cquery-extra-init-params '(:compilationDatabaseCommand "mycompdb"))
|
||||
(setq ccls-extra-init-params '(:compilationDatabaseCommand "mycompdb"))
|
||||
```
|
||||
|
||||
Suppose the project is at `/tmp/c`, `mycompdb /tmp/c` will be executed with stdin=initializationOptions and the stdout should be a JSON compilation database.
|
||||
@ -97,8 +97,4 @@ with open(os.path.join(sys.argv[1], 'compile_commands.json')) as f:
|
||||
wget 'https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/linux' -O .config
|
||||
yes '' | make config
|
||||
bear make -j bzImage modules
|
||||
```
|
||||
|
||||
## Misc
|
||||
|
||||
`compile_commands.json` should reside in the project root because Emacs/VSCode plugins use it to indicate the project root, which will be used to initialize `InitializeParams.rootUri`.
|
||||
```
|
Loading…
Reference in New Issue
Block a user