When adding this flag to imported targets, wrap it in a generator expression to use `-Xcompiler` to pass the flag for CUDA. Fixes: #17929