I want to use sublime text as my c++ editor.
I added LSP-clangd in the editor. I generate some compile_commands.json
and clangd works on almost every files in my project but not with cuda files.
I saw in clangd FAQ that we must ensure :
compile_commands.json
?clang --cuda-path=my/cuda/path
but it returns me clang: error; no input files
Have you any idea to solve one of these 3 problems ? or did someone suceed to use cuda with clangd in sublime text ?
Thanks to @HighCommander4, I solve this issue by adding a clang config file to my project. Moreover, I found an issue on clangd github that shares a similar problem.
Here is the .clangd
configuration file that I use for my project :
CompileFlags:
Add:
- --cuda-path=C://Program Files//NVIDIA GPU Computing Toolkit//CUDA//v12.1
- -LC://Program Files//NVIDIA GPU Computing Toolkit//CUDA//v12.1//lib
- -IC://Program Files//NVIDIA GPU Computing Toolkit//CUDA//v12.1//include