Quang Ha
2018-08-28 17:06:58 UTC
Hi all,
So this question is again about project(foo LANGUAGES CXX CUDA). Is it
possible to switch off CUDA if Cmake couldn't find CUDA compiler? I.e.
something along the line:
if (CUDA_FOUND)
set_language_to_CUDA_and_CXX
else(CUDA_FOUND)
set_language_to_CXX_only
endif(CUDA_FOUND)
The main reason is I don't want CMake to fail when CUDA compiler isn't
available. Rather, it should continue to compile the source files using CPP
compilers instead.
Thanks,
Quang
So this question is again about project(foo LANGUAGES CXX CUDA). Is it
possible to switch off CUDA if Cmake couldn't find CUDA compiler? I.e.
something along the line:
if (CUDA_FOUND)
set_language_to_CUDA_and_CXX
else(CUDA_FOUND)
set_language_to_CXX_only
endif(CUDA_FOUND)
The main reason is I don't want CMake to fail when CUDA compiler isn't
available. Rather, it should continue to compile the source files using CPP
compilers instead.
Thanks,
Quang