Re: [CMake] Using CMake to link C++ and CUDA Object file

2018-07-06 Thread Robert Maynard
To be clear the FindCUDA module currently does two things it finds the location of the CUDA SDK and it also adds the 'cuda_' commands. In your case you might still need to use FindCUDA to find the location of the thrust include directory, or you can find the location yourself by using find_path li

Re: [CMake] Using CMake to link C++ and CUDA Object file

2018-07-06 Thread Quang Ha
Thanks for your response, Robert. If I don't use find_package(CUDA), I run into the following problem: fatal error: thrust/host_vector.h: No such file or directory I guess this is needed if I am using Thrust/CUDA? Thanks, Quang On Fri, 6 Jul 2018 at 06:38, Robert Maynard wrote: > if you are

Re: [CMake] Using CMake to link C++ and CUDA Object file

2018-07-06 Thread Robert Maynard
if you are using the new first class cuda language, as seen by `project(MyTest LANGUAGES CXX CUDA)` you shouldn't use the old find cuda package or the associated cuda_add_library calls. When using the first class cuda language simply use add_library. The other difference I notice is that you makef

[CMake] Using CMake to link C++ and CUDA Object file

2018-07-05 Thread Quang Ha
Hi all, Following upon how to perform code linking between CUDA and C++ (here at https://devblogs.nvidia.com/separate-compilation-linking-cuda-device-code/), I have successfully come up with a Makefile that is currently working for my test case: ##Makefile#