Skip to content

VS: Fix crash finding vswhere on 32-bit Windows

Brad King requested to merge brad.king/cmake:vswhere-support-x86 into master

Since !7159 (merged), if the COM lookup does not report any VS instances, we fall back to finding vswhere. However, the getenv call returns nullptr if the ProgramFiles(x86) environment variable is not set. Update the logic to tolerate not-set environment variables. Also check the plain ProgramFiles environment variable.

Fixes: #24090 (closed)
Backport: release

Merge request reports