Skip to content
Snippets Groups Projects
Commit e3f404fe authored by Brad King's avatar Brad King
Browse files

CUDA: Implement nvcc implicit link line extraction more robustly

Do not assume that the implicit link line is the last line of the output
from `nvcc -v`.  Instead first find the `LIBRARIES=` line, and then look
for that content on a later line.  It appears twice.  First on a call to
`nvlink`, which we ignore.  Later it appears on the implicit link line.
Extract the latter line.  On failure, abort with a `FATAL_ERROR` so that
the user does not try to build without proper link information.

Once we have the line, parse it with `separate_arguments` using the
`UNIX_COMMAND` option just like `CMakeParseImplicitLinkInfo` already
does.  This robustly parses the command line and removes quoting.
Then extract the first argument as the host link launcher.
parent 3d3d3f94
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment