16 lines
605 B
PowerShell
16 lines
605 B
PowerShell
$vcvars = "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
|
|
if (-not (Test-Path $vcvars)) {
|
|
$vcvars = "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
|
|
}
|
|
|
|
if (Test-Path $vcvars) {
|
|
cmd /c "`"$vcvars`" && set" | Where-Object { $_ -match '=' } | ForEach-Object {
|
|
$name, $value = $_ -split '=', 2
|
|
[System.Environment]::SetEnvironmentVariable($name, $value, 'Process')
|
|
}
|
|
}
|
|
|
|
Write-Host "Running C++ core unit tests..." -ForegroundColor Cyan
|
|
ctest --preset win-local-pdfium $args
|
|
exit $LASTEXITCODE
|