@echo off setlocal set "BUILD_DIR=%~1" set "SCAN_MODE=%~2" set "BUILD_TYPE=%~3" if "%BUILD_DIR%"=="" ( echo Usage: configure.bat ^ ^ [Debug^|Release] exit /b 1 ) if "%SCAN_MODE%"=="" ( echo Usage: configure.bat ^ ^ [Debug^|Release] exit /b 1 ) if "%BUILD_TYPE%"=="" set "BUILD_TYPE=Release" call D:\APP\VisualStudio2013\VC\vcvarsall.bat x86 >nul if errorlevel 1 exit /b %errorlevel% pushd "%~dp0..\.." cmake -S . -B "%BUILD_DIR%" -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DRADAR_SCAN_MODE=%SCAN_MODE% set "CMAKE_EXIT=%errorlevel%" popd exit /b %CMAKE_EXIT%