diff options
| author | myd7349 <myd7349@gmail.com> | 2019-05-27 19:15:06 +0800 |
|---|---|---|
| committer | myd7349 <myd7349@gmail.com> | 2019-05-27 19:15:06 +0800 |
| commit | 8999734b401bb8bac9fa20ce831b2ad2a9a67add (patch) | |
| tree | 3f5cf1d5abbbc4295b556ea6e27882950bdd81f3 /scripts/bootstrap.ps1 | |
| parent | a7ac12c90afed0a13e3b24d509927d2fca506115 (diff) | |
| parent | 9ffac4d56eed774419fbb628ea89417a6399db58 (diff) | |
| download | vcpkg-8999734b401bb8bac9fa20ce831b2ad2a9a67add.tar.gz vcpkg-8999734b401bb8bac9fa20ce831b2ad2a9a67add.zip | |
Merge branch 'master' into rdkafka-init
Diffstat (limited to 'scripts/bootstrap.ps1')
| -rw-r--r-- | scripts/bootstrap.ps1 | 14 |
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", |
