I have a simple project relaying on some cuda libraries, using a slightly older cmake (3.25). I have found that the inclusion of the CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES in the linker command is only done by CMake when at least one of the files in the target has a .cu extension. This seems a bit strange, since it’s possible to have a project using CUDA without a .cu file. I haven’t been able to find any entry in the documentation that explains why/how this is the case.
How does the inclusion work and is it a better way of doing it than just adding the value of the variable to the target link directories? Thanks.