move compile_commands.json to build/

This commit is contained in:
dzaima 2024-11-12 03:11:50 +02:00
parent b72fe465a2
commit 0a4925e84f
3 changed files with 7 additions and 3 deletions

2
.gitignore vendored
View File

@ -44,7 +44,7 @@ perf.data*
# clangd # clangd
compile_commands.json compile_commands.json
/.cache/ .cache/
# things not used anymore, but still may be present in existing clones # things not used anymore, but still may be present in existing clones
/SingeliClone/ /SingeliClone/

View File

@ -94,7 +94,11 @@ Finish ⇐ { 𝕊 write:
"file""directory""arguments" JObj JStr name, JStr AtRoot "", ", " JArr JStr¨ flags "file""directory""arguments" JObj JStr name, JStr AtRoot "", ", " JArr JStr¨ flags
} }
res (","n) JArr FileObj¨ objects res (","n) JArr FileObj¨ objects
resPath AtRoot "compile_commands.json" {
•Out {write? "Removing"; "Would remove"} " old "𝕩
•file.Removewrite 𝕩
}•file.Exists AtRoot "compile_commands.json"
resPath AtRoot "build/compile_commands.json"
{ {
write? write?
resPath •FChars res resPath •FChars res

View File

@ -3,7 +3,7 @@
## clangd ## clangd
Run `build/build clangd` to generate a `compile_commands.json` file which clangd will use to resolve the flags CBQN expects. Other `build/build` flags will also be respected, e.g. `build/build replxx singeli native clangd` will result in clangd assuming the `SINGELI` and `USE_REPLXX` macros are defined, and will resolve generated Singeli sources to ones `build/build replxx singeli native` generates (along with everything else the configurations change). Run `build/build clangd` to generate a `compile_commands.json` file which clangd will use to resolve the flags CBQN expects. Other `build/build` flags will also be respected, e.g. `build/build replxx singeli native clangd` will result in clangd assuming the `SINGELI` and `USE_REPLXX` macros are defined, and will resolve generated Singeli sources to ones `build/build replxx singeli native` generates (along with everything else the configurations change).
(depending on the LSP in use, you may need to restart the LSP/clangd/editor after a modified `compile_commands.json`) (you may need to restart clangd or your editor after a modified `compile_commands.json`)
## Conventions ## Conventions