diff --git a/README.md b/README.md index 95f60d4..6d2a518 100644 --- a/README.md +++ b/README.md @@ -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).