Skip to content

VS: Update workaround for CUDA compiler PDB location

Brad King requested to merge brad.king/cmake:vs-cuda-pdb into master

The workaround added by !1960 (merged) is not necessary on CUDA 9.2+ because the CUDA Toolkit Visual Studio Integration has fixed the original bug and forwards the ProgramDataBaseFileName to the host compiler itself. Make the workaround conditional on the CUDA version.

Unfortunately it does not quote paths with spaces correctly:

-Xcompiler "... /Fd"C:\path\with space\foo.pdb" ..."

Work around this by converting the PDB location to a relative path. Likely we could always do this, but for now make a minimal change just for CUDA support.

Fixes: #18440 (closed)

Merge request reports