set
echo "Build"
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
cmake -G "NMake Makefiles" -S . -B build -DZ3_BUILD_DOTNET_BINDINGS=True -DZ3_BUILD_JAVA_BINDINGS=True -DZ3_BUILD_PYTHON_BINDINGS=True
cd build
nmake
if ERRORLEVEL 1 exit 1
remremremremremremrem
echo "Build and run examples"
nmake cpp_example
examples\cpp_example_build_dir\cpp_example.exe
if ERRORLEVEL 1 exit 1
nmake c_example
examples\c_example_build_dir\c_example.exe
if ERRORLEVEL 1 exit 1
remremif ERRORLEVEL 1 exit 1
remremif ERRORLEVEL 1 exit 1
echo "Build and run unit tests"
nmake test-z3
remrem
cd ..
echo "Run regression tests"
git clone https://github.com/z3prover/z3test z3test
echo "test-benchmarks"
python z3test\scripts\test_benchmarks.py build\z3.exe z3test\regressions\smt2
if ERRORLEVEL 1 exit 1
echo "benchmarks tested"