Skip to content

Commit a4ab0bc

Browse files
authored
Update README.md to add compile_commands.json setup for meson (#954)
2 parents e709192 + 6d5a1e7 commit a4ab0bc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ definitions that cannot be translated.
193193
### Generating `compile_commands.json` Files
194194
195195
The `compile_commands.json` file can be automatically created
196-
using either `cmake`, `intercept-build`, or `bear`.
196+
using either `cmake`, `meson`, `intercept-build`, or `bear`.
197197
198198
It may be a good idea to remove optimizations (`-OX`) from the compilation database,
199199
as there are optimization builtins which we do not support translating.
@@ -209,6 +209,16 @@ This works on Linux and MacOS.
209209
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ...
210210
```
211211
212+
#### ... with `meson`
213+
214+
When creating the initial build directory with `meson`,
215+
it will automatically generate a `compile_commands.json`
216+
file inside of `<build_dir>`.
217+
218+
```sh
219+
meson setup <build_dir>
220+
```
221+
212222
#### ... with `intercept-build`
213223
214224
`intercept-build` (part of the [scan-build tool](https://github.com/rizsotto/scan-build))

0 commit comments

Comments
 (0)