building advanced sample with optix 6.5.0, CUDA10.1 and MSVS2019

I try to build advanced samples with optix 6.5.0, CUDA10.1 and MSVS2019, but I can’t.

Error message is below.

CMake Error at (message):
Error generating

It seems to fail to generate the dependency file, but I don’t understand why.
Am I making any mistakes?

That is most likely the issue with the outdated FindCUDA.cmake inside that repository.

The host compiler location changed between MSVS 2015 and 2017 which broke the old logic to find the CUDA_HOST_COMPILER.
You’d either need to set it manually inside the CMake GUI or use the FindCUDA.cmake shipping with newer CMake versions.

Please see these threads for more information:

Thank you for helping me again and again.
Finally I could build it!