[CMake] FindCUDA ignores project dependencies when separable compilation is on
Irwin Zaid
irwin.zaid at physics.ox.ac.uk
Mon Dec 8 09:31:46 EST 2014
Hi all,
Just wanted to mention this issue I've run into.
I have a project (libdynd -- https://github.com/libdynd/libdynd) that
uses FindCUDA to deal with CUDA compilation. A part of our library is
generated at compile-time, which we handle by the command
"add_dependencies(libdynd some_exe)", where "some_exe" is an executable
built with a custom command. This part of our library needs to be
present before anything else is built.
So far, everything has worked great, with and without CUDA. However, I
found that by just turning separable compilation on, via
set(CUDA_SEPARABLE_COMPILATION ON), the dependency I've added is then
ignored and the necessary files are not generated. Basically, CMake goes
straight to NVCC without running the custom command.
This seems to me to be something wrong with FindCUDA, but it is of
course possible that I've done something wrong. Any help would be
appreciated!
Irwin
More information about the CMake
mailing list