| 1 |
rem Supply argument x64, x86 or amd64_arm64 |
| 2 |
|
| 3 |
echo "Build" |
| 4 |
md build |
| 5 |
cd build |
| 6 |
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %1 |
| 7 |
cmake -DZ3_BUILD_DOTNET_BINDINGS=True -DZ3_BUILD_JAVA_BINDINGS=True -DZ3_BUILD_PYTHON_BINDINGS=True -G "NMake Makefiles" ../ |
| 8 |
nmake |
| 9 |
if ERRORLEVEL 1 exit 1 |
| 10 |
|
| 11 |
if %1==x86 goto BUILD_EXAMPLES |
| 12 |
if %1==amd64_arm64 goto BUILD_EXAMPLES |
| 13 |
echo "Test python bindings" |
| 14 |
pushd python |
| 15 |
python z3test.py z3 |
| 16 |
if ERRORLEVEL 1 exit 1 |
| 17 |
python z3test.py z3num |
| 18 |
if ERRORLEVEL 1 exit 1 |
| 19 |
popd |
| 20 |
|
| 21 |
:BUILD_EXAMPLES |
| 22 |
echo "Build and run examples" |
| 23 |
nmake cpp_example |
| 24 |
if %1==amd64_arm64 goto C_EXAMPLE |
| 25 |
examples\cpp_example_build_dir\cpp_example.exe |
| 26 |
if ERRORLEVEL 1 exit 1 |
| 27 |
|
| 28 |
:C_EXAMPLE |
| 29 |
nmake c_example |
| 30 |
if %1==amd64_arm64 goto ALL_DONE |
| 31 |
examples\c_example_build_dir\c_example.exe |
| 32 |
if ERRORLEVEL 1 exit 1 |
| 33 |
|
| 34 |
rem nmake java_example |
| 35 |
rem java_example.exe |
| 36 |
if ERRORLEVEL 1 exit 1 |
| 37 |
|
| 38 |
rem nmake dotnet_example |
| 39 |
rem dotnet_example.exe |
| 40 |
if ERRORLEVEL 1 exit 1 |
| 41 |
|
| 42 |
echo "Build and run unit tests" |
| 43 |
nmake test-z3 |
| 44 |
rem TBD: test error level |
| 45 |
rem test-z3.exe -a |
| 46 |
|
| 47 |
|
| 48 |
cd .. |
| 49 |
echo "Run regression tests" |
| 50 |
git clone https://github.com/z3prover/z3test z3test |
| 51 |
echo "test-benchmarks" |
| 52 |
python z3test\scripts\test_benchmarks.py build\z3.exe z3test\regressions\smt2 |
| 53 |
if ERRORLEVEL 1 exit 1 |
| 54 |
echo "benchmarks tested" |
| 55 |
|
| 56 |
:ALL_DONE |
| 57 |
echo "All done" |