mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 14:23:10 -05:00
7662344faa
The 16.8 and 16.9 toolset numbers vary only in their third component. Use CMake 3.19.7 for three-component toolset version specification support.
20 lines
721 B
PowerShell
Executable File
20 lines
721 B
PowerShell
Executable File
$erroractionpreference = "stop"
|
|
|
|
$version = "3.19.7"
|
|
$sha256sum = "E6788D6E23B3026C37FCFA7658075D6B5F9113F26FAE17FE372AD4A7EE62D5FD"
|
|
$filename = "cmake-$version-win64-x64"
|
|
$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"
|