FindCUDA: Allow the user to use the modern form of target_link_libraries
Currently, FindCUDA
always uses the plain form of target_link_libraries
internally. It should default to this form (for backward compatibility) but offer the option to use the modern form of the signature (with (<PRIVATE|PUBLIC|INTERFACE>
keyword) . Otherwise CMake project code using modern CMake best practices is faced with:
The plain signature for target_link_libraries has already been used with
the target "MyCudaModule". All uses of target_link_libraries with a target
must be either all-keyword or all-plain.