vtk-m/.gitlab/ci/config/vcvarsall.ps1
Brad King 469d57b415 gitlab-ci: Use a specific MSVC version on Windows
Teach jobs to load the environment for a specific MSVC version, and tag
them accordingly.  This allows runners to have multiple versions of MSVC
installed without requiring us to compile on the newer ones right away.

The runners provide the VS 2019 location in a `VS160COMNTOOLS`
environment variable.  Use it to avoid requiring a specific VS edition.

Issue: #595
2021-02-04 13:50:42 -05:00

10 lines
242 B
PowerShell
Executable File

$erroractionpreference = "stop"
cmd /c "`"$env:VCVARSALL`" $VCVARSPLATFORM -vcvars_ver=$VCVARSVERSION & set" |
foreach {
if ($_ -match "=") {
$v = $_.split("=")
[Environment]::SetEnvironmentVariable($v[0], $v[1])
}
}