[CMake] Convenience libraries with CUDA

JR Cary cary at txcorp.com
Sat Feb 25 12:56:13 EST 2017


This is partially a continuation of the issue described at
http://public.kitware.com/pipermail/cmake/2015-June/060937.html,
where the hope was to be able to use object libraries with cuda.

There was no solution at that time, so we dropped this path,
but now this has become more important.

I tried to follow the path of using CUDA_WRAP_SRCS to get a
list of the object files that would be produced by an nvcc
compilation.  I did get those files, but then when I configure
in a clean directory, cuda_add_library fails with

CMake Error at ...:537 (add_library):
  Cannot find source file:

    /somepath/foo.dir/foo_generated_bar.cu.o

I suppose I could hack with a touch, but perhaps there is a
better way?

Thx....John Cary




More information about the CMake mailing list