microsoft/onnxruntime-extensions
Publicmirrored from https://github.com/microsoft/onnxruntime-extensionsAvailable
build.bat
26lines · modecode
| 1 | @ECHO OFF |
| 2 | ECHO Copy this file to mybuild.bat and make the changes as you needs |
| 3 | SETLOCAL ENABLEDELAYEDEXPANSION |
| 4 | |
| 5 | set VCVARS="NOT/EXISTED" |
| 6 | FOR %%I in (Enterprise Professional Community BuildTools^ |
| 7 | ) DO IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\%%I\VC\Auxiliary\Build\vcvars64.bat" ( |
| 8 | SET VCVARS="%ProgramFiles(x86)%\Microsoft Visual Studio\2019\%%I\VC\Auxiliary\Build\vcvars64.bat" ) |
| 9 | |
| 10 | IF NOT EXIST %VCVARS% GOTO :NOT_FOUND |
| 11 | ECHO Found %VCVARS% |
| 12 | CALL %VCVARS% |
| 13 | mkdir .\out\Windows\ 2>NUL |
| 14 | cd out\Windows |
| 15 | cmake -G "Visual Studio 16 2019" -A x64 %* ..\..\ |
| 16 | IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% |
| 17 | cmake --build . --config RelWithDebInfo |
| 18 | IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% |
| 19 | cd ..\.. |
| 20 | GOTO :EOF |
| 21 | |
| 22 | :NOT_FOUND |
| 23 | ECHO "No Microsoft Visual Studio 2019 installation found!" |
| 24 | EXIT /B 1 |
| 25 | |
| 26 | ENDLOCAL |