<div dir="ltr">I was planning on fixing a bug related to flags and separable compilation for FindCUDA when I discovered something peculiar.  I'm asking here in case I missed something with how source files are processed.<div>

<br></div><div>I branched off of origin/master this morning.</div><div><br></div><div>I have a macro that generates some custom commands for building object files for cuda (found in FindCUDA.cmake).</div><div><br></div><div>

<div>CUDA_COMPILE(CUDA_FILES <a href="http://test_bin.cu">test_bin.cu</a>)</div><div>message("CUDA_FILES = ${CUDA_FILES}")</div><div><br></div><div>ADD_EXECUTABLE(cuda_compile_example</div><div>  ${CUDA_FILES}</div>

<div>  ${source_files}</div><div>  main.cc</div><div>  external_dependency.h</div><div>  )</div></div><div><br></div><div>When print out CUDA_FILES I get a full path:</div><div><br></div><div><div>CUDA_FILES = /Users/jbigler/code/FindCUDA/build-cmake-git/src/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_test_bin.cu.o</div>

</div><div><br></div><div>Great!</div><div><br></div><div>When I try to compile cuda_compile_example I get this, though:</div><div><br></div><div><div>make[2]: *** No rule to make target `src/CMakeFiles/cuda_compile.dir/cuda_compile_generated_test_bin.cu.o', needed by `src/cuda_compile_example'.  Stop.</div>

</div><div><br></div><div>What I don't see in my makefiles is the build rule for the object file.</div><div><br></div><div>I can provide a reproducer, but it would require having CUDA installed.</div><div><br></div><div>

This is for OSX 10.8 with Xcode 5.1 (command line utils, so Makefile).</div><div><br></div><div>James</div></div>