I need some advice on how to fix a problem I'm having with files with the same name.<br><br>I have two CUDA files with the same name in different directories:<br><br>CUDA_ADD_EXECUTABLE(test-conflict<br>  "path with spaces/conflict.cpp"<br>

  "path with spaces/<a href="http://conflict.cu">conflict.cu</a>"<br>  "path with spaces/no-conflict.cpp"<br>  "path with spaces/<a href="http://no-conflict.cu">no-conflict.cu</a>"<br>  conflict-main.cpp<br>

  conflict.cpp<br>  <a href="http://conflict.cu">conflict.cu</a><br>  )<br><br>I notice that the cpp files get the following outputs:<br><br>path with spaces/no-conflict.cpp: test-conflict.dir\Debug<br>path with spaces/conflict.cpp: "test-conflict.dir\Debug\/path_with_spaces/conflict.cpp.obj"<br>

conflict.cpp: "test-conflict.dir\Debug\/conflict.cpp.obj"<br><br>This seems to work well and everyone is happy.<br><br>The FindCUDA code is a different story, and one I wish to get some more input on.  The current implementation takes the basename and merges it in with the target name like so (one example given):<br>

<br> "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${cuda_target}_generated_${basename}${generated_extension}"<br><br>The problem is two files with the same basename can cause collisions in the naming scheme.  I'm wondering if the best solution is to keep a per target list of basenames as a directory property and when collisions happen, create a new sub-directory to be used by the build script.  My question at this point is what and how to compute the non-conflicting directories.  Does anyone have any good suggestions for how to implement this?<br>

<br>Thanks,<br>James<br><br>