diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-10-13 18:50:12 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-10-13 18:50:12 -0700 |
| commit | a790820e8cdf9adca3e5cf066b8a563a3beaacd1 (patch) | |
| tree | 293a786398d109ca316fc89d2f128fd80d7d5f56 /scripts | |
| parent | e17de99599a2f114faab1bb4821fbaad4d266c95 (diff) | |
| parent | 2397cc044ee56160757aeb402dc7adaec6b00894 (diff) | |
| download | vcpkg-a790820e8cdf9adca3e5cf066b8a563a3beaacd1.tar.gz vcpkg-a790820e8cdf9adca3e5cf066b8a563a3beaacd1.zip | |
[vcpkg] Merge from master into refactor-includes
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/cmake/vcpkg_acquire_depot_tools.cmake | 2 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_configure_cmake.cmake | 16 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_download_distfile.cmake | 2 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_find_acquire_program.cmake | 9 | ||||
| -rw-r--r-- | scripts/fetchDependency.ps1 | 28 | ||||
| -rw-r--r-- | scripts/findVisualStudioInstallationInstances.ps1 | 2 |
6 files changed, 37 insertions, 22 deletions
diff --git a/scripts/cmake/vcpkg_acquire_depot_tools.cmake b/scripts/cmake/vcpkg_acquire_depot_tools.cmake index 1cc375725..009ba40f1 100644 --- a/scripts/cmake/vcpkg_acquire_depot_tools.cmake +++ b/scripts/cmake/vcpkg_acquire_depot_tools.cmake @@ -26,7 +26,7 @@ function(vcpkg_acquire_depot_tools PATH_TO_ROOT_OUT) set(download_success 1) endif() - if (NOT ${download_success}) + if (NOT download_success) message(FATAL_ERROR "\n" " Failed to download file.\n" diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index fe8c97c52..bfb6a19fd 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -78,14 +78,20 @@ function(vcpkg_configure_cmake) set(GENERATOR "Visual Studio 15 2017") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 ARM") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017") + set(ARCH "ARM64") elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(TRIPLET_SYSTEM_ARCH STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 ARM") + elseif(TRIPLET_SYSTEM_ARCH STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017") + set(ARCH "ARM64") endif() # If we use Ninja, make sure it's on PATH @@ -139,6 +145,12 @@ function(vcpkg_configure_cmake) "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" ) + if(DEFINED ARCH) + list(APPEND _csc_OPTIONS + "-A${ARCH}" + ) + endif() + if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND _csc_OPTIONS_DEBUG "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 006570195..b8acfc823 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -78,7 +78,7 @@ function(vcpkg_download_distfile VAR) endif() endforeach(url) - if (NOT ${download_success}) + if (NOT download_success) message(FATAL_ERROR "\n" " Failed to download file.\n" diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 3c6dfae08..51e394bf1 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -34,7 +34,8 @@ ## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) ## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) function(vcpkg_find_acquire_program VAR) - if(${VAR} AND NOT ${VAR} MATCHES "-NOTFOUND") + set(EXPANDED_VAR ${${VAR}}) + if(EXPANDED_VAR) return() endif() @@ -162,7 +163,7 @@ function(vcpkg_find_acquire_program VAR) endmacro() do_find() - if(${VAR} MATCHES "-NOTFOUND") + if("${${VAR}}" MATCHES "-NOTFOUND") file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE} EXPECTED_HASH SHA512=${HASH} SHOW_PROGRESS @@ -173,7 +174,7 @@ function(vcpkg_find_acquire_program VAR) else() get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT) string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION) - if(${ARCHIVE_EXTENSION} STREQUAL ".msi") + if(ARCHIVE_EXTENSION STREQUAL ".msi") file(TO_NATIVE_PATH "${DOWNLOADS}/${ARCHIVE}" ARCHIVE_NATIVE_PATH) file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}" DESTINATION_NATIVE_PATH) execute_process( @@ -191,5 +192,5 @@ function(vcpkg_find_acquire_program VAR) do_find() endif() - set(${VAR} ${${VAR}} PARENT_SCOPE) + set(${VAR} "${${VAR}}" PARENT_SCOPE) endfunction() diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 665376baf..773ebeac4 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -36,17 +36,19 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) New-Item -ItemType directory -Path $downloadDir | Out-Null } + $WC = New-Object System.Net.WebClient + $ProxyAuth = !$WC.Proxy.IsBypassed($url) + if ($ProxyAuth) + { + $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication" + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred) + $WC.Proxy.Credentials=$ProxyCred + } + if (($PSVersionTable.PSEdition -ne "Core") -and ($Dependency -ne "git")) # git fails with BITS { try { - $WC = New-Object System.Net.WebClient - $ProxyAuth = !$WC.Proxy.IsBypassed($url) - If($ProxyAuth){ - $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication" - $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") - $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred) - } - Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop } catch [System.Exception] { @@ -60,7 +62,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if (!(Test-Path $downloadPath)) { Write-Verbose("Downloading $Dependency...") - (New-Object System.Net.WebClient).DownloadFile($url, $downloadPath) + $WC.DownloadFile($url, $downloadPath) } } @@ -126,11 +128,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "vswhere") { - $requiredVersion = "2.1.4" - $downloadVersion = "2.1.4" - $url = "https://github.com/Microsoft/vswhere/releases/download/2.1.4/vswhere.exe" + $requiredVersion = "2.2.3" + $downloadVersion = "2.2.3" + $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.3/vswhere.exe" $downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe" - $expectedDownloadedFileHash = "548fb9dfeed59bc4ddcce739a5729e9c8dd5932cd60ff6f74727ee069e7da458" + $expectedDownloadedFileHash = "5f19066ac91635ad17d33fe0f79fc63c672a46f98c0358589a90163bcb2733e8" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 8c67ef6d6..b2f186478 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -6,7 +6,7 @@ param( $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $vswhereExe = & $scriptsDir\fetchDependency.ps1 "vswhere" -$output = & $vswhereExe -prerelease -legacy -format xml +$output = & $vswhereExe -prerelease -legacy -products * -format xml [xml]$asXml = $output $results = New-Object System.Collections.ArrayList |
