NVIDIA / OptiX_Apps

Advanced Samples for the NVIDIA OptiX 7 Ray Tracing SDK
Other
283 stars 48 forks source link

no generator found, exit #6

Closed ypwang61 closed 2 years ago

ypwang61 commented 2 years ago

Hello, I meet some problems when running 3rdparty,cmd, it shows "no generator found, exit", but I use x64 Native Tools Command Prompt for VS 2019 v16.11.7 to run it, how can I fix it? Or maybe I can download each files ?

droettger commented 2 years ago

Could it be that you're running a localized language MSVS version? There is an issue with the regular expression checking the compiler version which looks for the exact string "Version" which is written differently among languages. https://forums.developer.nvidia.com/t/help-for-confg-cmake-with-optix-7-0/117704/4

In that case, you could adjust the regular expression or simply force the generator to a fixed version instead. For that either hardcode the cl_version and cl_architecture to 19.20 and x64 respectively here in line 38 of 3rdparty.cmake.

Or just remove the whole automatic detection and hardcode the architecture and generator. Means replace lines 31 to 74 in 3rdparty.cmake with these three lines.

set(BUILD_ARCH x64)
set(GENERATOR "Visual Studio 16 2019")
set(MSVC_TOOLSET "msvc-14.2")
ypwang61 commented 2 years ago

Thank you, I can run the code now