per target cuda compiler options with cmake
<p>So I have a bit of an issue with setting up pdbs in cuda when using cmake and visual studio (2013 in the case).</p>

<p>Basically I think I want to do something like :</p>

<pre><code>-Xcompiler "/Fd whatever.pdb"
</code></pre>

<p>to each <code>add_cuda_library</code>, but I can only seem to set <code>CUDA_NVCC_FLAGS, CUDA_NVCC_FLAGS_RELEASE, CUDA_NVCC_FLAGS_DEBUG</code> etc globally.</p>

<p>Right now I use </p>

<pre><code>SET(CUDA_NVCC_FLAGS_RELEASE ${CUDA_NVCC_FLAGS}; -Xcompiler "/Fd nvcc_all.pdb") 
</code></pre>

<p>And this dumps all the symbols into one file.</p>

<p>Problem is sometimes the build breaks when there are concurrent writes to that pdb. I've tried adding /FS, but it doesn't help.</p>

<p>Is there a cmake incantation to allow me to add a per lib cuda pdbs ?</p>