Re: [CMake] FindCUDA: Specify nvcc language in cuda_add_executable

2014-11-24 Thread James Bigler
cuda_add_executable(mytarget foo.cc OPTIONS -x cu) Unfortunately, FindCUDA is setup to ignore any files that aren't .cu files. CUDA_WRAP_SRCS() ... foreach(file ${ARGN}) # Ignore any file marked as a HEADER_FILE_ONLY get_source_file_property(_is_header ${file} HEADER_FILE_ONLY) if($

[CMake] FindCUDA: Specify nvcc language in cuda_add_executable

2014-11-14 Thread Joan Puigcerver
Hi, I'm trying to use CMake with FindCUDA to compile a C++/CUDA code, and I am having a small issue with cuda_add_executable. One of my files has the .cc extension, but it may import headers which contain CUDA kernels definitions (depending on wheather I want to use CUDA or not). So, I need to co