3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-07 01:54:08 +00:00
z3/ml/build.cmd
Leonardo de Moura bcca613cb2 Added ml component
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-02 12:44:06 -07:00

55 lines
1.3 KiB
Batchfile

@echo off
SETLOCAL
REM Script to generate, compile, test, and document the Z3 OCaml API
REM usage: build.cmd [32|64] [-D UNSAFE_ERRORS] [-D LEAK_CONTEXTS]
REM Invoke with "-D UNSAFE_ERRORS" to build version that does not support recoverable errors, but avoids some error-checking overhead.
REM Invoke with "-D LEAK_CONTEXTS" to build version that leaks Z3_context objects, but avoids some garbage-collection overhead.
if ""%1 == "" (
set BITS=32
) else (
set BITS=%1
)
if %BITS% == 32 (
set ARCH=x86
set Z3BIN= ..\external
set Z3DBG= ..\debug
) else (
set ARCH=x64
set Z3BIN= ..\x64\external_64
set Z3DBG= ..\x64\Debug
)
echo { Setting up environment
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" %ARCH%
call ..\tools\ocaml\win%BITS%\setup.cmd
set PATH=..\tools;..\mlV3;%PATH%
echo }
echo { Cleaning
call .\clean.cmd
echo }
echo { Generating OCaml API %3 %5
call .\generate_mlapi.cmd %2 %3 %4 %5
if errorlevel 1 goto :EOF
echo }
echo { Compiling OCaml API
call .\compile_mlapi.cmd ..\lib %Z3BIN% %Z3DBG%
if errorlevel 1 goto :EOF
echo }
echo { Testing OCaml API
call .\test_mlapi.cmd ..\lib %Z3BIN% %Z3DBG%
if errorlevel 1 goto :EOF
echo }
echo { Generating OCaml API documentation
call .\update-ml-doc.cmd ..\doc
if errorlevel 1 goto :EOF
echo }
ENDLOCAL