[cuda] Export vcpkg_find_cuda.cmake#13440
Conversation
|
Need test locally. |
| @@ -0,0 +1,91 @@ | |||
| function(vcpkg_find_cuda) | |||
There was a problem hiding this comment.
Is there a reason not to go full vcpkg_find_fortran and use CMakeDetermineCUDACompiler.cmake ? Just trick it to ingore the FATAL_ERROR by setting CMAKE_GENERATOR to Ninja
| set(CUDA_PATHS | ||
| ENV CUDA_PATH | ||
| ENV CUDA_BIN_PATH | ||
| ENV CUDA_PATH_V11_0 | ||
| ENV CUDA_PATH_V10_2 | ||
| ENV CUDA_PATH_V10_1) |
There was a problem hiding this comment.
Instead of search in all those dirs env CUDA_PATH is actually required by CMake. As such setting up CUDA_PATH if one of the other env variables exist is the way to go since it mitigates the env removal some VS updates seem to do.
|
We should use the provided |
We need to differentiate between the CUDA compiler and the CUDA libraries. |
|
|
Thanks for your contribution! |
This PR introduces a port-packaged helper
vcpkg_find_cuda()that works similarly tovcpkg_find_fortran():@cenit and @Neumann-A for their CUDA expertise on whether this approach seems correct