Nvcc fatal : Compiler 'cl.exe' in PATH different than the one specified with -ccbin

I created it with cmake GitHub - firepond/OptixRCS: RCS calculation based on SBR method, using NVIDIA optix. The project of VS2015 in Chinese code. I used CUDA10.1 and optimx6.5, but when I ran the created project, it reported an error.Then I tried Optix 7.0, but still reported the same error.What should I do?

5>------ 已启动全部重新生成: 项目: sutil_7_sdk, 配置: Debug x64 ------
5>  Building NVCC ptx file lib/ptx/sutil_generated_camera.cu.ptx
5>  nvcc fatal   : Compiler 'cl.exe' in PATH different than the one specified with -ccbin
5>  CMake Error at sutil_generated_camera.cu.ptx.cmake:269 (message):
5>    Error generating
5>    D:/wjj/zdy/github/OptixRCS/build6.5/lib/ptx/./sutil_generated_camera.cu.ptx
5>
5>
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: “cmd.exe”已退出,代码为 1。
6>------ 已启动全部重新生成: 项目: TrianglesRCS, 配置: Debug x64 ------
6>  Building NVCC ptx file lib/ptx/TrianglesRCS_generated_triangles_rcs.cu.ptx
6>  nvcc fatal   : Compiler 'cl.exe' in PATH different than the one specified with -ccbin
6>  CMake Error at TrianglesRCS_generated_triangles_rcs.cu.ptx.cmake:269 (message):
6>    Error generating
6>    D:/wjj/zdy/github/OptixRCS/build6.5/lib/ptx/./TrianglesRCS_generated_triangles_rcs.cu.ptx

When I run the built-in routines in the Optix SDK, there are no errors reported

This is the wrong forum to ask about CMake build issues with other people’s code repositories.
Please solve this inside the issues section of the respective github repositories instead.

First of all, the FindOptiX.cmake inside that repository is looking for OptiX SDK 8.0.0.
https://github.com/firepond/OptixRCS/blob/main/CMake/FindOptiX.cmake#L32
That means OptiX SDK 6.x versions are completely out of the question for the build process because they use a very different API than OptiX SDK 7.x and newer version.

The application code itself seems to be based on the OptiX SDK 7.x optixMeshViewer example and not my advanced OptiX examples which are neither using a FindCUDA.cmake script (deprecated since CMake 3.10, use FindCUDAToolkit.cmake instead), nor any of the OptiX SDK sutil library code.

Does this mean you’ve solved the above build issues? https://github.com/firepond/OptixRCS/issues/3

Please note that OptiX SDK examples built with debug device code (nvcc option -G) are really slow.
If you ever benchmark performance please use fully optimized release code only.