I’m writing a static library with GPU code inside. Kernels employ “dynamic parallelism” so I have “–device-c” mode on (actually I use cmake “separable compilation” option which in turn enables everything). Therefore CMake invokes additional link stage (nvcc with --dlink) and that generates “cmake_device_link.o” (the same as “a_dlink.o”).
The question is:
Should I export/install that file? Currently I don’t, only libmylib.a is installed and seemingly it doesn’t contain device code. Otherwise I’m not sure how users of my library would be able to link everything together. What is the common approach?
Env: Ubuntu 16.04, CUDA 10.1, CMake 3.14.4