-
|
I use clangd as an LSP in my editor. To get it to resolve includes, standards versions, etc. it uses a file compile_commands.json with the details of the build of each object. This gets super tedious and often incorrect if doing it manually, so bear was designed to record calls to the compiler during a build and dump those into a compile_command.json, allowing you be perfectly accurate to what your build system is doing and keep it up-to-date easily. One of the rubs is that scikit-build-core builds in a temp directory that is cleaned up after compilation, and the recorded commands refer to these temp directories, causing clangd to fail. Does anyone know a good way to resolve this short of writing a script to fixup compile_commands.json after generation? This isn't an issue for setuptools since it dumps its builds into a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
You can set the build-dir to get identical behavior to setuptools. What's the difference with using bear vs using cmake's built in support? That's what I've used for clangd. I'll edit in the actual configuration I use when I'm at a computer. |
Beta Was this translation helpful? Give feedback.
You can set the build-dir to get identical behavior to setuptools.
What's the difference with using bear vs using cmake's built in support? That's what I've used for clangd.
I'll edit in the actual configuration I use when I'm at a computer.