[CMake] Future direction for FindCUDA

Siyuan Liu me at shawnliu.me
Wed Aug 30 01:04:43 EDT 2017


Dear all,

I've noticed the change to CUDA as a language in CMake 3.8. I've
migrated to this new syntax, but this change leads to some difficulties
for me with CMake. I think we should treat CUDA as not just a language
but rather a language with some libraries. 

Now that the FindCUDA module is deprecated, I cannot compile a file with
GCC while linking to a CUDA library (since the CUDA_xxx_LIBRARY
variables are gone). The reason for not using NVCC is to save
compilation time. Personally, I think FindCUDA should become a module
for purely finding CUDA libraries for linking without anything related
to the NVCC compiler (e.g. the cuda_add_executable macro).

My questions in short:
1. Can I link to CUDA libraries with GCC while not using FindCUDA?
2. What's your opinion on my suggestion about FindCUDA?

Regards,
Siyuan


More information about the CMake mailing list