Hello everybody !
I’m working on a project which uses CUDA for some functions. But I also want the program to be run on a computer without cuda installed using equivalent (but of course slower) versions of the functions.
To compile my project, I’m currently using cmake together with ccmake to produce the Makefiles. I’ve been trying to write some CMakelists file for ages but I’ve not been able to achieve what I am looking for.
I’d like nvcc to compile the .cu files, gcc to compile the standard c++ files and the usual linker to link everything if needed. At the same time, I’d like to be able to switch off the cuda-compilation so that gcc only compiles the whole project.
Do you have any advice on how I could manage that ?
I’ve tried with the findCUDA script, but as far as I understood, I cannot use it on a computer without CUDA and hence switch off the GPU part.
Thanks in advance !