Re: [CMake] "modern" CUDA handling and static libraries

2017-12-20 Thread Crni Gorac
On Wed, Dec 20, 2017 at 10:41 PM, Robert Maynard wrote: >> If a .cpp file is added to library, then it won't work. > > If this is occurring it is a bug. Can you fill a bug report at: > https://gitlab.kitware.com/cmake/cmake I just did it, it's here:

Re: [CMake] "modern" CUDA handling and static libraries

2017-12-20 Thread Robert Maynard
> If a .cpp file is added to library, then it won't work. If this is occurring it is a bug. Can you fill a bug report at: https://gitlab.kitware.com/cmake/cmake > CUDA_PROPAGATE_HOST_FLAGS CUDA as a first class language propagates zero C++ flags as it is a separate language, and we expect

Re: [CMake] "modern" CUDA handling and static libraries

2017-12-20 Thread Crni Gorac
Thanks for your reply. That seems to work, but only if the library consist solely of .cu files. If a .cpp file is added to library, then it won't work. Is this a known limitation? On a related note: what is the equivalent of "set(CUDA_PROPAGATE_HOST_FLAGS OFF)" now? Regards. On Tue, Dec 19,

Re: [CMake] "modern" CUDA handling and static libraries

2017-12-19 Thread Robert Maynard
Hi, The CUDA_RESOLVE_DEVICE_SYMBOLS property was added for this exact situation. You can find it documented at https://cmake.org/cmake/help/v3.10/prop_tgt/CUDA_RESOLVE_DEVICE_SYMBOLS.html Here is an example of it being used:

[CMake] "modern" CUDA handling and static libraries

2017-12-19 Thread Crni Gorac
Hello, My project is alike for what is described by following CMakeLists.txt for Cuda/Complex test case from CMake source distribution: # cmake_minimum_required(VERSION 3.8) project (CudaComplex CXX CUDA) string(APPEND CMAKE_CUDA_FLAGS " -gencode