Fix #4: nts builds are not supported

We must not overwrite the passed parameter, and use it afterwards.
This commit is contained in:
Christoph M. Becker
2021-09-04 12:59:42 +02:00
parent 52470d5e50
commit dc2a4d88bb

10
run.ps1
View File

@@ -24,14 +24,14 @@ $toolsets = @{
"vc14" = "14.0"
}
$dir = vswhere -latest -find "VC\Tools\MSVC"
foreach ($ts in (Get-ChildItem $dir)) {
$tsv = "$ts".split(".")
foreach ($toolset in (Get-ChildItem $dir)) {
$tsv = "$toolset".split(".")
if ((14 -eq $tsv[0]) -and (9 -ge $tsv[1])) {
$toolsets."vc14" = $ts
$toolsets."vc14" = $toolset
} elseif ((14 -eq $tsv[0]) -and (19 -ge $tsv[1])) {
$toolsets."vc15" = $ts
$toolsets."vc15" = $toolset
} elseif (14 -eq $tsv[0]) {
$toolsets."vs16" = $ts
$toolsets."vs16" = $toolset
}
}
$toolset = $toolsets.$vs