$BOTAN_MODULES = "$($(get-content 'ci\botan-modules') -join ',')"
# setup msvc compiler environment
$vswhere = "${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vspath = & "$vswhere" -latest -property installationPath
Import-Module "$vspath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Enter-VsDevShell -VsInstallPath "$vspath" -DevCmdArguments '-arch=x64 -no_logo' -SkipAutomaticLocation
# build botan
& git clone --depth 1 --branch "$Env:BOTAN_VERSION" https://github.com/randombit/botan
Push-Location -LiteralPath botan
& python .\configure.py --prefix="$Env:PREFIX" --without-documentation `
--build-targets=static --minimized-build `
--enable-modules="$BOTAN_MODULES" --msvc-runtime=MT `
--cc=msvc --os=windows
&{
$ErrorActionPreference = 'Continue'
nmake install
}
Pop-Location