It doesn't have this behavior. For Makefile and Ninja generators we get the proper header dependencies at compile time just like we do for C or C++. For MSBuild we rely on the CUDA extensions written by nvidia which do proper dependency tracking.
On Sat, Mar 30, 2019 at 4:12 PM JR Cary <c...@txcorp.com> wrote: > > Re the thread below, > > Does the newer, enable_languagedo a better job of not having the > repeated reconfigurations and full project rebuilds as described at > > https://cmake.org/pipermail/cmake/2011-January/042173.html > > and many times after? > > John > > > > On 3/30/19 6:45 AM, cmake-requ...@cmake.org wrote: > > ----------------------------- > > Message: 4 > > Date: Sat, 30 Mar 2019 12:45:07 +0000 > > From: Luis Caro Campos <julius.c...@gmail.com> > > > > I believe the closest equivalent to settinga CUDA_TOOLKIT_ROOT_DIR when > > using enable_language(CUDA) is to set either the environment variable > > CUDACXX or the CMake cache entry CMAKE_CUDA_COMPILER to point to the > > location of the nvcc compiler. > > > > However I think there are still some "features" of FindCUDA that > > enable_language don't support, e.g. variables and/or import targets with > > locations, see https://gitlab.kitware.com/cmake/cmake/issues/17816 > > > > Kind regards, > > Luis > > > > On Fri, Mar 29, 2019 at 4:57 PM Dustyn Blasig <dus...@blasig.us> wrote: > > > >> "we should not try to combine enable_language(CUDA) with > >> find_package(CUDA). They do not work together, either use one or another." > >> > >> Absolutely, my goal is to move to the new built-in language support. I'm > >> having trouble doing that because I can't find any documentation on it. For > >> instance, what is the new equivalent CUDA_TOOLKIT_ROOT_DIR? Without > >> find_package(CUDA), I don't see anything set that have the equivalent. > >> Also, in some cases the CUDA include directory is added to targets, and in > >> other cases it isn't, even if the target depends on source with .cu. What > >> is the documented behavior for this? > >> > >> I'm sure there has to be a page somewhere on this, but going to page 4 on > >> Google search didn't uncover anything, and the first 2 pages all point to > >> various versions of FindCUDA : ) > >> > >> On Fri, Mar 29, 2019 at 11:28 AM Dmitry Mikushin < > >> dmi...@parallel-computing.pro> wrote: > >> > >>> Hi, > >>> > >>> That was my confusion as well: to my understanding, we should not try to > >>> combine enable_language(CUDA) with find_package(CUDA). They do not work > >>> together, either use one or another. > >>> > >>> Kind regards, > >>> - Dmitry. > >>> > >>> ??, 29 ???. 2019 ?. ? 19:58, Dustyn Blasig <dus...@blasig.us>: > >>> > >>>> Hi All, > >>>> > >>>> I can't find any documentation on the new-ish "native" CUDA support. I > >>>> need to know all the variables that we can use, and (for instance) > >>>> whether > >>>> checking the CUDA version is now supported. When searching online, I'm > >>>> always directed to the old FindCUDA pages which don't seem to match what > >>>> is > >>>> available with the native language support. > >>>> > >>>> Currently, I'm "hacking" my way through things by using both flows. I > >>>> add CUDA as a language, use the found CUDA compiler to construct a > >>>> CUDA_TOOLKIT_ROOT_DIR and then call find_package(CUDA) to get the old > >>>> environment variables set up. > >>>> > >>>> Cheers! > >>>> > > -- > > 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: > https://cmake.org/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: https://cmake.org/mailman/listinfo/cmake