https://github.com/Kitware/CMake
Tip revision: 5e984bb35232116a54de7db39788cb162ca7c263 authored by Brad King on 05 February 2024, 15:28:25 UTC
CMake 3.28.3
CMake 3.28.3
Tip revision: 5e984bb
cmake.ps1
$erroractionpreference = "stop"
$version = "3.27.6"
if ("$env:PROCESSOR_ARCHITECTURE" -eq "AMD64") {
$sha256sum = "F013A0CCA091AA953F9A60A99292EC7A20AE3F9CEB05CB5C08EBE164097C526F"
$platform = "windows-x86_64"
} elseif ("$env:PROCESSOR_ARCHITECTURE" -eq "ARM64") {
$sha256sum = "980B7E532D77BFB4E5814C76403242C503019F1C0699440220CF2D527C8FF350"
$platform = "windows-arm64"
} else {
throw ('unknown PROCESSOR_ARCHITECTURE: ' + "$env:PROCESSOR_ARCHITECTURE")
}
$filename = "cmake-$version-$platform"
$tarball = "$filename.zip"
$outdir = $pwd.Path
$outdir = "$outdir\.gitlab"
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://github.com/Kitware/CMake/releases/download/v$version/$tarball" -OutFile "$outdir\$tarball"
$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
if ($hash.Hash -ne $sha256sum) {
exit 1
}
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir")
Move-Item -Path "$outdir\$filename" -Destination "$outdir\cmake"