mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-25 17:11:59 +00:00
Add xcodebuild option to generate compile_commands
parent
2256fa6a25
commit
3b5358b52d
@ -87,6 +87,14 @@ buck build :helloworld#compilation-database
|
||||
ln -s $(buck targets --show-output :helloworld#compilation-database | cut -d ' ' -f 2)
|
||||
```
|
||||
|
||||
### [xcodebuild](https://developer.apple.com/library/archive/technotes/tn2339/_index.html)
|
||||
|
||||
[xcpretty](https://github.com/xcpretty/xcpretty) is a 3rd party tool that can parse the output of `xcodebuild` and generate a compile_commands.
|
||||
|
||||
```sh
|
||||
xcodebuild | xcpretty -r json-compilation-database --output compile_commands.json
|
||||
```
|
||||
|
||||
### stdout of an external command
|
||||
|
||||
If the initialization option `"compilationDatabaseCommand"` is set, the command will be executed by ccls 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)
|
||||
|
Loading…
Reference in New Issue
Block a user