File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,10 @@ FOR %%i IN (powershell git cmake) DO (
8585 where.exe %%i 1 > NUL 2 > NUL || call cecho.cmd 0 12 " Required tool `'%%i `' not installed or not added to PATH" && goto :ErrorAndPrintUsage
8686)
8787
88+ :: Check powershell version
89+ powershell -c " exit $PSVersionTable.PSVersion.Major -lt 5"
90+ IF NOT %ERRORLEVEL% == 0 call cecho.cmd 0 12 " Powershell version 5 or higher required" && goto :ErrorAndPrintUsage
91+
8892cmake --version | findstr version > temp.txt
8993set /p CMAKE_VERSION = < temp.txt
9094del temp.txt
@@ -547,7 +551,7 @@ exit /b %RET%
547551:: PrintUsage - Prints usage information
548552:PrintUsage
549553call " %~dp0 \utils\cecho.cmd" 0 10 " Requirements for a successful execution:"
550- echo 1. Install PowerShell (preinstalled in Windows ^ > = 7) and make sure 'powershell' is accessible from PATH.
554+ echo 1. Install PowerShell (preinstalled in Windows ^ > = 7) version 5 or higher and make sure 'powershell' is accessible from PATH.
551555echo - https://support.microsoft.com/en-us/kb/968929
552556echo 2. Install Git and make sure 'git' is accessible from PATH.
553557echo - https://git-for-windows.github.io/
You can’t perform that action at this time.
0 commit comments