cmake: Workaround unspecified CUDA directories on Windows by stotko · Pull Request #15 · stotko/stdgpu (original) (raw)

The compute capability logic has been improved in #8. However, as the variables CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES and CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES are now involved, this resulted in a regression when compiling with Visual Studio (Windows). Here, the variables are not defined [1] [2] which caused build failures. Workaround this issue by manually computing the paths in this scenario.

Once the respective CMake bug is fixed, we can remove the workaround. If this workaround is not sufficient, we need to revert to the older and slower version.

[1] https://gitlab.kitware.com/cmake/cmake/issues/18733
[2] https://gitlab.kitware.com/cmake/cmake/issues/19229