> Can I link to CUDA libraries with GCC while not using FindCUDA Yes you can if you have enabled the CUDA language. You will need to use find_package and can use the CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES as the location(s) to search.
> Instead of modifying what FindCUDA does, which would break backwards > compatibility, FindCUDA could be split into FindCUDA and FindCUDALibraries or > something like that. That is something I have wanted to do, but haven't had the time to formalize and finish. You can find my initial implementation at https://gitlab.kitware.com/robertmaynard/find_cuda_wrappers On Wed, Aug 30, 2017 at 5:06 AM, Mueller-Roemer, Johannes Sebastian <johannes.sebastian.mueller-roe...@igd.fraunhofer.de> wrote: > Hi, > > we have encountered this issue as well, in our case when using thrust on the > host side. We currently solve this by still using FindCUDA, even when using > CMake 3.8/3.9, but only using the CUDA_*_LIBRARY and CUDA_TOOLKIT_INCLUDE > variables and nothing else. > > Instead of modifying what FindCUDA does, which would break backwards > compatibility, FindCUDA could be split into FindCUDA and FindCUDALibraries or > something like that. > > Regards > Johannes > > Fraunhofer-Institut für Graphische Datenverarbeitung IGD > Fraunhoferstr. 5 | 64283 Darmstadt | Germany > Tel +49 6151 155-606 | Fax +49 6151 155-139 > johannes.mueller-roe...@igd.fraunhofer.de | www.igd.fraunhofer.de > > > -----Original Message----- > From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Siyuan Liu > Sent: Wednesday, August 30, 2017 07:05 > To: cmake@cmake.org > Subject: [CMake] Future direction for FindCUDA > > Dear all, > > I've noticed the change to CUDA as a language in CMake 3.8. I've migrated to > this new syntax, but this change leads to some difficulties for me with > CMake. I think we should treat CUDA as not just a language but rather a > language with some libraries. > > Now that the FindCUDA module is deprecated, I cannot compile a file with GCC > while linking to a CUDA library (since the CUDA_xxx_LIBRARY variables are > gone). The reason for not using NVCC is to save compilation time. Personally, > I think FindCUDA should become a module for purely finding CUDA libraries for > linking without anything related to the NVCC compiler (e.g. the > cuda_add_executable macro). > > My questions in short: > 1. Can I link to CUDA libraries with GCC while not using FindCUDA? > 2. What's your opinion on my suggestion about FindCUDA? > > Regards, > Siyuan > -- > > 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 > -- > > 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 -- 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