[CMake] FindCUDA ignores project dependencies when separable compilation is on

Irwin Zaid irwin.zaid at physics.ox.ac.uk
Mon Jan 5 07:32:09 EST 2015


Just wanted to send this again, as the problem still exists. While 
working on the libdynd project (https://github.com/libdynd/libdynd), 
we've discovered two CUDA CMake issues that we'd like to help resolve.

Who are the right people to speak with about these?

Irwin

Irwin Zaid wrote:
> 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