2023-07-24 19:54:11 +00:00
|
|
|
##=============================================================================
|
|
|
|
##
|
|
|
|
## Copyright (c) Kitware, Inc.
|
|
|
|
## All rights reserved.
|
|
|
|
## See LICENSE.txt for details.
|
|
|
|
##
|
|
|
|
## This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
## PURPOSE. See the above copyright notice for more information.
|
|
|
|
##
|
|
|
|
##=============================================================================
|
|
|
|
|
2021-02-04 17:50:40 +00:00
|
|
|
$erroractionpreference = "stop"
|
|
|
|
|
|
|
|
cmd /c "`"$env:VCVARSALL`" $VCVARSPLATFORM -vcvars_ver=$VCVARSVERSION & set" |
|
|
|
|
foreach {
|
|
|
|
if ($_ -match "=") {
|
|
|
|
$v = $_.split("=")
|
|
|
|
[Environment]::SetEnvironmentVariable($v[0], $v[1])
|
|
|
|
}
|
|
|
|
}
|