I am using Clion to develop a cuda program. The code highlight works fine when the extension is .h. However, when it is changed to .cuh, Clion just consider the new file a plain text file, and I have not been able to enable code highlight. I understand a complete Cuda toolchain is out of the question, so I will not hope Clion to parse statements like mykernel<<<1024, 100>>>. Still I will be more than satisfied if it can parse the file just like parsing a normal header/cpp file.
Many thanks
Right click file in project tool window -> Associate with file type -> C++
However, Clion doesn't support cuda officially now, it cannot parse cuda syntax.
UPDATE:
From CLion 2020.1, we have official CUDA C/C++ support. CLion could handle them correctly now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With