Hi,

Here is a example that uses CUDA_WRAP_SRCS and separable compilation.
I quickly ported the code from a project, so it most likely has some
minor issues.

https://git.io/vMga3

On Thu, Jan 12, 2017 at 5:04 PM, Ingmar Rieger <d...@irieger.net> wrote:
> Hey,
>
> thank you for your answer. I already tried with CUDA_WRAP_SRCS but didn't
> really get how to use it and the
> https://cmake.org/cmake/help/v3.7/module/FindCUDA.html lacks of any samples
> really showing what is going on. How can I use CUDA_WRAP_SRCS to create the
> OBJECT and then add it to a library? add_library also only supports source
> files (Cannot find source file error when trying to add an object).
>
> Is there an example anywhere that demonstrates how to manually add a CUDA
> object there?
>
>
> On 2017-01-11 21:42, Robert Maynard wrote:
>>
>> I believe you will want to use the low level command CUDA_WRAP_SRCS
>> with the MODULE option. Since CUDA_WRAP_SRCS is a low level command,
>> If you need separable compilation you will need to manually invoke
>> those steps too ( read CUDA_SEPARABLE_COMPILATION documentation on
>> what methods you will need to use ).
>
>
>
> --
> Regards,
> Ingmar
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to