FindCUDAToolkit doesn't create a target for header only nvToolsExt
FindCUDAToolkit
creates a CUDA::nvToolsExt
target for the NVTX shared library object libnvToolsExt.so
.
There is also a header-only variant of NVTX present in cuda/include/nvtx3/nvToolsExt.h
. Using the header only variant does require the application to link against libdl.so
, so the target should encapsulate that dependency. See https://github.com/NVIDIA/NVTX/blob/473d5d4bea392462e00047b71ce2e58377327223/c/CMakeLists.txt for the target I defined for the NVTX C headers (eventually this configuration should make it's way into the CUDA toolkit).
The header-only and binary versions of the library are identical. Typically the header-only variant is preferred and the binary version will eventually be deprecated.
It would be nice if FindCUDAToolkit
would create a target for the header-only version of NVTX. Maybe call it CUDA::nvToolsExtHeaderOnly
?