cuda in the *. cpp

Hello!
Whether it is possible to write the cuda code only to *.cpp files?

As far as I know kernel-code and kernel launches need to be in .cu files.