mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 15:06:25 +00:00
vs-cfg.cmd: clean up output when used wrongly (VS tools not in path and empty/no generator argument passed).
This commit is contained in:
+7
-5
@@ -48,7 +48,7 @@ set LAST_GENERATOR_IDX=9
|
|||||||
set STEP=2
|
set STEP=2
|
||||||
:: Is generator shorthand used?
|
:: Is generator shorthand used?
|
||||||
set GEN_SHORTHAND=!GENERATOR:vs=!
|
set GEN_SHORTHAND=!GENERATOR:vs=!
|
||||||
if !GEN_SHORTHAND!==!GENERATOR! goto :GeneratorShorthandCheckDone
|
if not "!GEN_SHORTHAND!"=="" if !GEN_SHORTHAND!==!GENERATOR! goto :GeneratorShorthandCheckDone
|
||||||
set START=%LAST_GENERATOR_IDX%
|
set START=%LAST_GENERATOR_IDX%
|
||||||
:: "echo if" trick from http://stackoverflow.com/a/8758579
|
:: "echo if" trick from http://stackoverflow.com/a/8758579
|
||||||
echo(!GEN_SHORTHAND! | findstr /c:"-x86" >nul && ( set START=1 )
|
echo(!GEN_SHORTHAND! | findstr /c:"-x86" >nul && ( set START=1 )
|
||||||
@@ -83,10 +83,12 @@ IF "!GENERATOR!"=="" IF NOT "%VisualStudioVersion%"=="" (
|
|||||||
)
|
)
|
||||||
:: Check that the used CMake version supports the chosen generator
|
:: Check that the used CMake version supports the chosen generator
|
||||||
set GENERATOR_CHECK=%GENERATOR: Win64=%
|
set GENERATOR_CHECK=%GENERATOR: Win64=%
|
||||||
cmake --help | findstr /c:%GENERATOR_CHECK% >nul
|
IF "!GENERATOR_CHECK!"=="" (
|
||||||
if not %ERRORLEVEL%==0 (
|
cmake --help | findstr /c:%GENERATOR_CHECK% >nul
|
||||||
call utils\cecho.cmd 0 12 "%~nx0: The used CMake version does not support '`"!GENERATOR!`'"- cannot proceed."
|
if not %ERRORLEVEL%==0 (
|
||||||
exit /b 1
|
call utils\cecho.cmd 0 12 "%~nx0: The used CMake version does not support '`"!GENERATOR!`'"- cannot proceed."
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
FOR /l %%i in (0,1,%LAST_GENERATOR_IDX%) DO (
|
FOR /l %%i in (0,1,%LAST_GENERATOR_IDX%) DO (
|
||||||
|
|||||||
Reference in New Issue
Block a user