Hi Quang,
I believe this should be doable with setting the source file's LANGUAGE
property ( https://cmake.org/cmake/help/latest/prop_sf/LANGUAGE.html ):
add_executable(foo_cuda foo.cpp)
set_property(SOURCE foo.cpp PROPERTY LANGUAGE CUDA)
Petr
On Mon, 27 Aug 2018 at 17:40, Quang Ha wrote:
>
Hi all,
With the new way CMake is treating CUDA codes, now we can do:
project(foo LANGUAGES CXX CUDA)
and can do:
add_executable(foo_cuda foo.cu) # will use NVCC
add_executable(foo_cpp foo.cpp) # will use host compilers
Now since CUDA can take *.cpp files as extension (see