diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2018-06-13 11:54:33 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2018-06-13 11:54:33 -0700 |
| commit | 4a4215c2e526ffd688bb37734b83c2e53d6ce1b7 (patch) | |
| tree | e6e4b30a5ba98d40a81f6db95bc23bcc491e8c0b /scripts | |
| parent | e7721cde199b381fbc1491df76029dc034cb1e49 (diff) | |
| download | vcpkg-4a4215c2e526ffd688bb37734b83c2e53d6ce1b7.tar.gz vcpkg-4a4215c2e526ffd688bb37734b83c2e53d6ce1b7.zip | |
Win7 compat. Fail if 64-bit requested on 32-bit machine
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/bootstrap.ps1 | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 7df98fac7..ef94c632b 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -329,16 +329,19 @@ if ($disableMetrics) $platform = "x86" $vcpkgReleaseDir = "$vcpkgSourcesPath\release" -# x86_64 architecture is 9 -$architecture=(Get-WmiObject win32_Processor -ErrorAction SilentlyContinue).Architecture -if ([Environment]::Is64BitOperatingSystem -and $architecture -eq 9 -and $win64) +if ($win64) { + $architecture=(Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture + if ($architecture -ne "64-bit") + { + throw "Cannot build 64-bit on non-64-bit system" + } + $platform = "x64" - $vcpkgReleaseDir = "$vcpkgSourcesPath\x64\Release" + $vcpkgReleaseDir = "$vcpkgSourcesPath\x64\release" } - $arguments = ( "`"/p:VCPKG_VERSION=-nohash`"", "`"/p:DISABLE_METRICS=$disableMetricsValue`"", |
