clang: Update README with CMake details.

pull/1/head
Joshua Potter 2023-12-19 15:50:58 -07:00
parent 4a0f1aa919
commit 5ad9ed7f06
1 changed files with 7 additions and 9 deletions

View File

@ -1,7 +1,7 @@
# Clang Flake Template # Clang Flake Template
This is a template for constructing a working environment for C development with This is a template for constructing a working environment for C/C++ development
the [clang](https://clang.llvm.org/) (version 16.0.6) toolchain. [direnv](https://direnv.net/) with the [clang](https://clang.llvm.org/) (version 16.0.6) toolchain. [direnv](https://direnv.net/)
can be used to launch a dev shell upon entering this directory (refer to can be used to launch a dev shell upon entering this directory (refer to
`.envrc`). Otherwise run via: `.envrc`). Otherwise run via:
```bash ```bash
@ -14,13 +14,11 @@ The [clangd](https://clangd.llvm.org/) LSP (version 14.0.6) is included in this
flake. The [codelldb](https://github.com/vadimcn/codelldb) VSCode plugin is also flake. The [codelldb](https://github.com/vadimcn/codelldb) VSCode plugin is also
included to interface with the LSP. Note this plugin, despite its name, is included to interface with the LSP. Note this plugin, despite its name, is
compatible with other editors (e.g. neovim). To configure, refer to your compatible with other editors (e.g. neovim). To configure, refer to your
editor's documentation. To use the LSP across files, a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) editor's documentation. To use the LSP across files, a
must be generated. For this reason, [bear](https://github.com/rizsotto/Bear) [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)
(version 3.1.3) is included in this flake. Use as follows to generate a must be generated. [CMake](https://cmake.org/) (version 3.27.7) is included in
`compile_commands.json` file: this flake with `CMAKE_EXPORT_COMPILE_COMMANDS` already set from the
```bash `CMakeLists.txt` file.
$ bear -- <your-build-command>
```
## Documentation ## Documentation