If I have cudaKernel.cu file which contains definitions for device and host functions , and I have cudaKernelHeader.h which has prototypes for these functions defined in cudaKernal . I used
nvcc -c cudaKernel.cu
to compile the cuda program but unfortunately nvcc could not find cudaKernelHeader.h which is included in cudaKernel.cu file .
The question :
1- how can I compile cudaKernel.cu along with its header file cudaKernelHeader.h in command line .
2- Also , I am wondering how to compile them in CMake , actually I used these two statments but also the CMake could not find the header file :
cuda_add_executable(cudaExecutable cudaKernelHeader.h cudaKernel.cu )
Thank you in advance .