CMake/Tests/CudaOnly
Robert Maynard 41eab150a8 CUDA: Pass more link libraries to device linking
Previously we dropped non-target items from the device link line because
nvcc rejects paths to shared library files, and only with target items
do we know the kind of library.  However, this also prevents projects
from linking to system-provided libraries like `cublas_device` that
contain device code.

Fix this by passing more link items to device linking.  Items that are
not file paths, such as `-lfoo`, can simply be passed unconditionally.
Items that are targets known to be shared libraries can still be
skipped.  Items that are paths to library files can be passed directly
if they end in `.a`.  Otherwise, pass them using `-Xnvlink` to bypass
nvcc's front-end.  The nvlink tool knows to ignore shared library files.

Issue: #16317
2018-03-28 09:38:43 -04:00
..
EnableStandard Tests: Run clang-format on CUDA code 2017-02-14 10:20:50 -05:00
ExportPTX Tests: Simplify CUDA rpath on macOS 2017-06-21 10:41:49 -04:00
GPUDebugFlag Tests: Add missing error check in CudaOnly.GPUDebugFlag 2018-02-01 09:07:50 -05:00
LinkSystemDeviceLibraries CUDA: Pass more link libraries to device linking 2018-03-28 09:38:43 -04:00
ResolveDeviceSymbols CUDA: gencode signature that list multiple code types now supported. 2018-01-10 10:45:57 -05:00
SeparateCompilation CUDA: gencode signature that list multiple code types now supported. 2018-01-10 10:45:57 -05:00
WithDefs Merge topic 'msvc_cuda_8_explicitly_specify_cuda_language' 2018-01-18 09:41:01 -05:00
CMakeLists.txt CUDA: Pass more link libraries to device linking 2018-03-28 09:38:43 -04:00