This is also causing my CUDA separable compilation feature to break as well.

I'm adding object files to the source list of a target, and this works in 
certain situations, but not all.

James

From: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Date: Thursday, May 8, 2014 12:34 PM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [cmake-developers] Weird dependency on object files generated elsewhere

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.

I branched off of origin/master this morning.

I have a macro that generates some custom commands for building object files 
for cuda (found in FindCUDA.cmake).

CUDA_COMPILE(CUDA_FILES test_bin.cu<http://test_bin.cu>)
message("CUDA_FILES = ${CUDA_FILES}")

ADD_EXECUTABLE(cuda_compile_example
  ${CUDA_FILES}
  ${source_files}
  main.cc
  external_dependency.h
  )

When print out CUDA_FILES I get a full path:

CUDA_FILES = 
/Users/jbigler/code/FindCUDA/build-cmake-git/src/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_test_bin.cu.o

Great!

When I try to compile cuda_compile_example I get this, though:

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.

What I don't see in my makefiles is the build rule for the object file.

I can provide a reproducer, but it would require having CUDA installed.

This is for OSX 10.8 with Xcode 5.1 (command line utils, so Makefile).

James

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to