@echo off setlocal set "BUILD_DIR=%~1" if "%BUILD_DIR%"=="" ( echo Usage: build.bat ^ exit /b 1 ) call D:\APP\VisualStudio2013\VC\vcvarsall.bat x86 >nul if errorlevel 1 exit /b %errorlevel% cmake --build "%BUILD_DIR%" exit /b %errorlevel%