Add note on compile_commands.json to readme

This commit is contained in:
Simon Bruder 2023-04-22 15:14:05 +02:00
parent e138a4d58c
commit 5c8784c9f4

View file

@ -28,6 +28,15 @@ but you can find them in `flake.nix`.
You can use `nix develop` or [`direnv`](https://direnv.net/).
To create a `compile_commands.json` for `ccls` (or similar),
create a `build` directory inside the exercise directory,
and from that, execute:
```bash
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=YES
ln -sf build/compile_commands.json ..
```
## Licence
[GPL-3.0-or-later](https://spdx.org/licenses/GPL-3.0-or-later.html).