@echo off rem =========================================================================== rem CMake build script (MSVC 2022 / v143, C++17, x64) rem rem Usage: rem build.bat ^ [AUTO^|ON^|OFF] rem rem Examples: rem build.bat Release OFF rem build.bat Debug ON rem rem The build tree must have been configured by configure.bat first (same rem configuration): build\\ rem rem Encoding: keep this file ASCII-only (see msvc_env.bat). rem =========================================================================== setlocal if "%~1"=="" goto :usage call "%~dp0config_paths.bat" "%~1" "%~2" if errorlevel 1 exit /b 1 rem Load the MSVC 2022 environment (vcvarsall.bat + cl.exe existence check). call "%~dp0msvc_env.bat" if errorlevel 1 exit /b 1 pushd "%~dp0..\.." if not exist "%BUILD_DIR%\CMakeCache.txt" ( echo [ERROR] "%BUILD_DIR%" is not configured - run configure.bat first popd exit /b 1 ) echo [build] %BUILD_DIR% cmake --build "%BUILD_DIR%" set "CMAKE_EXIT=%errorlevel%" popd exit /b %CMAKE_EXIT% :usage echo Usage: build.bat ^ [AUTO^|ON^|OFF^] exit /b 1