50 lines
1.7 KiB
Batchfile
50 lines
1.7 KiB
Batchfile
@echo off
|
|
rem ===========================================================================
|
|
rem Configure and build both scan modes for one build type / record mode.
|
|
rem
|
|
rem Usage:
|
|
rem build_all.bat ^<Debug^|Release^> [AUTO^|ON^|OFF]
|
|
rem
|
|
rem Examples:
|
|
rem build_all.bat Release OFF
|
|
rem build_all.bat Debug ON
|
|
rem build_all.bat Release AUTO
|
|
rem
|
|
rem Runs configure.bat + build.bat for both scan modes:
|
|
rem PHASE_SCANNING -^> build\X256_PS\<Debug^|Release^>\<REC_*>
|
|
rem MECHANICAL_SCANNING -^> build\X256_MS\<Debug^|Release^>\<REC_*>
|
|
rem The run stops at the first failing configuration and returns non-zero.
|
|
rem
|
|
rem Encoding: keep this file ASCII-only (see msvc_env.bat).
|
|
rem ===========================================================================
|
|
setlocal EnableExtensions
|
|
set "BUILD_TYPE=%~1"
|
|
set "RECORD_MODE=%~2"
|
|
if not defined BUILD_TYPE goto :usage
|
|
if not defined RECORD_MODE set "RECORD_MODE=AUTO"
|
|
|
|
rem Validate + normalize the tuple once (also resolves the X256_* aliases).
|
|
call "%~dp0config_paths.bat" PHASE_SCANNING "%BUILD_TYPE%" "%RECORD_MODE%"
|
|
if errorlevel 1 exit /b 1
|
|
|
|
for %%S in (PHASE_SCANNING MECHANICAL_SCANNING) do (
|
|
echo.
|
|
echo [build_all] ==================== %%S / %BUILD_TYPE% / %RECORD_MODE% ====================
|
|
call "%~dp0configure.bat" %%S "%BUILD_TYPE%" "%RECORD_MODE%"
|
|
if errorlevel 1 goto :failed
|
|
call "%~dp0build.bat" %%S "%BUILD_TYPE%" "%RECORD_MODE%"
|
|
if errorlevel 1 goto :failed
|
|
)
|
|
echo.
|
|
echo [build_all] all done: %BUILD_TYPE% / %RECORD_MODE%
|
|
exit /b 0
|
|
|
|
:failed
|
|
echo.
|
|
echo [build_all] FAILED - stopped at the first failing configuration, see the log above
|
|
exit /b 1
|
|
|
|
:usage
|
|
echo Usage: build_all.bat ^<Debug^|Release^> [AUTO^|ON^|OFF^]
|
|
exit /b 1
|