Bump version of required CMake to 3.7.2

This commit is contained in:
Alexander Karatarakis 2017-01-23 17:02:43 -08:00
parent 5d603cbae2
commit 522b393901
2 changed files with 17 additions and 17 deletions

View File

@ -51,12 +51,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
{
return
}
$title = "Download " + $Dependency
$message = ("No suitable version of " + $Dependency + " was found (requires $requiredVersion or higher). Download portable version?")
$yesDescription = "Downloads " + $Dependency + " v" + $downloadVersion +" app-locally."
$noDescription = "Does not download " + $Dependency + "."
$noDescription = "Does not download " + $Dependency + "."
$userAllowedDownload = promptForDownload $title $message $yesDescription $noDescription
if (!$userAllowedDownload)
{
@ -86,10 +86,10 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
$ExtractionType_NO_EXTRACTION_REQUIRED = 0
$ExtractionType_ZIP = 1
$ExtractionType_SELF_EXTRACTING_7Z = 2
# Using this to wait for the execution to finish
function Invoke-Command()
function Invoke-Command()
{
param ( [string]$program = $(throw "Please specify a program" ),
[string]$argumentString = "",
@ -99,7 +99,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
$psi.FileName = $program
$psi.Arguments = $argumentString
$proc = [Diagnostics.Process]::Start($psi)
if ( $waitForExit )
if ( $waitForExit )
{
$proc.WaitForExit();
}
@ -120,12 +120,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
if($Dependency -eq "cmake")
{
$requiredVersion = "3.5.0"
$downloadVersion = "3.5.2"
$url = "https://cmake.org/files/v3.5/cmake-3.5.2-win32-x86.zip"
$downloadName = "cmake-3.5.2-win32-x86.zip"
$expectedDownloadedFileHash = "671073aee66b3480a564d0736792e40570a11e861bb34819bb7ae7858bbdfb80"
$executableFromDownload = "$downloadsDir\cmake-3.5.2-win32-x86\bin\cmake.exe"
$requiredVersion = "3.7.2"
$downloadVersion = "3.7.2"
$url = "https://cmake.org/files/v3.7/cmake-3.7.2-win32-x86.zip"
$downloadName = "cmake-3.7.2-win32-x86.zip"
$expectedDownloadedFileHash = "ec5e299d412e0272e01d4de5bf07718f42c96361f83d51cc39f91bf49cc3e5c3"
$executableFromDownload = "$downloadsDir\cmake-3.7.2-win32-x86\bin\cmake.exe"
$extractionType = $ExtractionType_ZIP
}
elseif($Dependency -eq "nuget")
@ -146,7 +146,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
$downloadName = "PortableGit-2.8.3-32-bit.7z.exe"
$expectedDownloadedFileHash = "DE52D070219E9C4EC1DB179F2ADBF4B760686C3180608F0382A1F8C7031E72AD"
# There is another copy of git.exe in PortableGit\bin. However, an installed version of git add the cmd dir to the PATH.
# Therefore, choosing the cmd dir here as well.
# Therefore, choosing the cmd dir here as well.
$executableFromDownload = "$downloadsDir\PortableGit\cmd\git.exe"
$extractionType = $ExtractionType_SELF_EXTRACTING_7Z
}
@ -186,7 +186,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
if (-not (Test-Path $executableFromDownload))
{
Invoke-Command $downloadPath "-y" -waitForExit:$true
}
}
}
else
{

View File

@ -63,7 +63,7 @@ namespace vcpkg::Environment
void ensure_cmake_on_path(const vcpkg_paths& paths)
{
const fs::path downloaded_cmake = paths.downloads / "cmake-3.5.2-win32-x86" / "bin";
const fs::path downloaded_cmake = paths.downloads / "cmake-3.7.2-win32-x86" / "bin";
const std::wstring path_buf = Strings::wformat(L"%s;%s;%s;%s",
downloaded_cmake.native(),
System::wdupenv_str(L"PATH"),
@ -71,7 +71,7 @@ namespace vcpkg::Environment
default_cmake_installation_dir_x86.native());
_wputenv_s(L"PATH", path_buf.c_str());
static constexpr std::array<int, 3> cmake_version = {3,5,0};
static constexpr std::array<int, 3> cmake_version = {3,7,2};
// TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned
ensure_on_path(cmake_version, L"cmake --version 2>&1", L"powershell -ExecutionPolicy Bypass scripts\\fetchDependency.ps1 -Dependency cmake");
}