EasyClangComplete icon indicating copy to clipboard operation
EasyClangComplete copied to clipboard

Cuda support - How to recognize .cu files and set clang conditional clang compiler flags -x cuda

Open pdales opened this issue 10 months ago • 1 comments

Hello,

I am having trouble integrating ECC with Cuda .cu files.

First is recognizing .cu files. I have tried adding back the cuda flag in valid_lang_syntaxes but ECC still not recognizing .cu files. CPP": ["C++", "C++11", "cuda-c++"],

Also I tried instead setting the filename to .cpp and adding these flags to the common_flags

"-I/opt/cuda/include", "-x", "cuda",

but the "-x", "cuda" breaks compilation somehow.

Is there a way to get ECC to recognize .cu files and have clang correctly interpret them as cuda files so things like "blockDim" and "vectorAdd<<<blocksPerGrid.." are not seen as errors.

Thanks

pdales avatar Mar 13 '25 23:03 pdales

Unfortunately, I do not know much about cuda and I have never tried them with this plugin. If somebody finds out the answer to this question, please feel free to comment!

niosus avatar Mar 29 '25 17:03 niosus