Hi all (and James), I just have two other quick questions about FindCUDA. Here we go!
1) I have a project that tries to keep all its CUDA code in .cpp files. I'm currently making this work with a lot of dummy .cu files that simply include the .cpp, but I'd like to get rid of these.
nvcc does support a -x flag for specifying whether it should treat files as .c, .cpp, or .cu. However, FindCUDA seems unable to handle this and things break immediately. Is it because FindCUDA uses the file extension to determine what action to take?
Is there a way to force FindCUDA to either treat everything as a CUDA file, or treat specific files as CUDA files?
2) Is there a way to tell FindCUDA that a library needs to be linked in nvcc? What I have is a library built with nvcc that should go through the device linker. If I just pass it to target_link_libraries, then nvcc doesn't get it and only the host linker does.
Also, I'm in a subproject (think of a test program), and I find that using NVCC_FLAGS doesn't get it there either. What has worked is simply passing it as an option to cuda_add_executable, but that feels a little raw.
Thanks all (and James), Irwin -- 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/mailman/listinfo/cmake
