mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 08:08:24 -05:00
658009b6fe
Previously we were relying on `VCVARSPLATFORM` and `VCVARSVERSION` powershell script variables. Read them from the environment directly.
10 lines
250 B
PowerShell
Executable File
10 lines
250 B
PowerShell
Executable File
$erroractionpreference = "stop"
|
|
|
|
cmd /c "`"$env:VCVARSALL`" $env:VCVARSPLATFORM -vcvars_ver=$env:VCVARSVERSION & set" |
|
|
foreach {
|
|
if ($_ -match "=") {
|
|
$v = $_.split("=")
|
|
[Environment]::SetEnvironmentVariable($v[0], $v[1])
|
|
}
|
|
}
|