aboutsummaryrefslogtreecommitdiff
path: root/scripts/bootstrap.ps1
diff options
context:
space:
mode:
authorAndrei Lebedev <lebdron@gmail.com>2019-06-12 08:25:07 +0300
committerAndrei Lebedev <lebdron@gmail.com>2019-06-12 08:25:07 +0300
commit34d19da9ffd0571bf16190ec4a16a04bef265900 (patch)
tree413690269c5f216194b9a0f72f0438b27ccfd68d /scripts/bootstrap.ps1
parentb395438c791ca9f78e383a1d571525eee785e67c (diff)
parent59a8a9c6248ed230b19028a44484ae5f06db697d (diff)
downloadvcpkg-34d19da9ffd0571bf16190ec4a16a04bef265900.tar.gz
vcpkg-34d19da9ffd0571bf16190ec4a16a04bef265900.zip
Merge branch 'master' into openssl-unix-dynamic
Diffstat (limited to 'scripts/bootstrap.ps1')
-rw-r--r--scripts/bootstrap.ps114
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1
index 07a9fcbaa..b195cc605 100644
--- a/scripts/bootstrap.ps1
+++ b/scripts/bootstrap.ps1
@@ -339,10 +339,9 @@ if ($disableMetrics)
$platform = "x86"
$vcpkgReleaseDir = "$vcpkgSourcesPath\msbuild.x86.release"
-
+$architecture=(Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture
if ($win64)
{
- $architecture=(Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture
if (-not $architecture -like "*64*")
{
throw "Cannot build 64-bit on non-64-bit system"
@@ -352,6 +351,15 @@ if ($win64)
$vcpkgReleaseDir = "$vcpkgSourcesPath\msbuild.x64.release"
}
+if ($architecture -like "*64*")
+{
+ $PreferredToolArchitecture = "x64"
+}
+else
+{
+ $PreferredToolArchitecture = "x86"
+}
+
$arguments = (
"`"/p:VCPKG_VERSION=-nohash`"",
"`"/p:DISABLE_METRICS=$disableMetricsValue`"",
@@ -359,7 +367,7 @@ $arguments = (
"/p:Platform=$platform",
"/p:PlatformToolset=$platformToolset",
"/p:TargetPlatformVersion=$windowsSDK",
-"/p:PreferredToolArchitecture=x64",
+"/p:PreferredToolArchitecture=$PreferredToolArchitecture",
"/verbosity:minimal",
"/m",
"/nologo",