mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 21:32:29 +00:00
Fix command-line argument parsing in run-cmake.bat and build-all.cmd
This commit is contained in:
+10
-3
@@ -22,16 +22,23 @@
|
||||
:: build-ifcopenshell and install-ifcopenshell. The rest of the arguments are passed for run-cmake.
|
||||
:: Usage example for doing an optimized vs2015-x64 build with debug information and using IFC 4:
|
||||
:: > build-all.cmd vs2015-x64 RelWithDebInfo -DUSE_IFC4=1 -DENABLE_BUILD_OPTIMIZATIONS=1
|
||||
|
||||
@echo off
|
||||
|
||||
for /f "tokens=2,* delims= " %%a in ("%*") do set ALL_BUT_FIRST_TWO=%%b
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
call vs-cfg.cmd %1
|
||||
if not %ERRORLEVEL%==0 GOTO :Error
|
||||
:: Use "yes" trick to break the pause in build-deps.cmd
|
||||
echo y>y.txt
|
||||
call .\build-deps %1 %2<y.txt
|
||||
if not %ERRORLEVEL%==0 goto :EOF
|
||||
del .\y.txt
|
||||
call .\run-cmake %1 %ALL_BUT_FIRST_TWO%
|
||||
if not %ERRORLEVEL%==0 goto :EOF
|
||||
:: Same trick as in run-cmake.bat
|
||||
set ARGUMENTS=%*
|
||||
call set ARGUMENTS=%%ARGUMENTS:%1=%%
|
||||
call set ARGUMENTS=%%ARGUMENTS:%2=%%
|
||||
call .\run-cmake %1 %ARGUMENTS%
|
||||
if not %ERRORLEVEL%==0 goto :EOF
|
||||
call .\build-ifcopenshell %1 %2
|
||||
ECHO %ERRORLEVEL%
|
||||
|
||||
Reference in New Issue
Block a user