Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame^] | 1 | :: Copyright 2015 Google Inc. All rights reserved. |
| 2 | :: |
| 3 | :: Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | :: you may not use this file except in compliance with the License. |
| 5 | :: You may obtain a copy of the License at |
| 6 | :: |
| 7 | :: http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | :: |
| 9 | :: Unless required by applicable law or agreed to in writing, software |
| 10 | :: distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | :: See the License for the specific language governing permissions and |
| 13 | :: limitations under the License. |
| 14 | |
| 15 | set buildtype=Release |
| 16 | if "%1"=="-b" set buildtype=%2 |
| 17 | |
| 18 | ..\%buildtype%\flatc.exe --cpp --java --csharp --dart --go --binary --lobster --lua --python --js --ts --php --rust --grpc --gen-mutable --reflect-names --gen-object-api --gen-compare --no-includes --cpp-ptr-type flatbuffers::unique_ptr --no-fb-import -I include_test monster_test.fbs monsterdata_test.json || goto FAIL |
| 19 | ..\%buildtype%\flatc.exe --cpp --java --csharp --dart --go --binary --lobster --lua --python --js --ts --php --rust --gen-mutable --reflect-names --no-fb-import --cpp-ptr-type flatbuffers::unique_ptr -o namespace_test namespace_test/namespace_test1.fbs namespace_test/namespace_test2.fbs || goto FAIL |
| 20 | ..\%buildtype%\flatc.exe --cpp --java --csharp --js --ts --php --gen-mutable --reflect-names --gen-object-api --gen-compare --cpp-ptr-type flatbuffers::unique_ptr -o union_vector ./union_vector/union_vector.fbs || goto FAIL |
| 21 | ..\%buildtype%\flatc.exe -b --schema --bfbs-comments --bfbs-builtins -I include_test monster_test.fbs || goto FAIL |
| 22 | ..\%buildtype%\flatc.exe -b --schema --bfbs-comments --bfbs-builtins -I include_test arrays_test.fbs || goto FAIL |
| 23 | ..\%buildtype%\flatc.exe --jsonschema --schema -I include_test monster_test.fbs || goto FAIL |
| 24 | ..\%buildtype%\flatc.exe --cpp --java --csharp --python --gen-mutable --reflect-names --gen-object-api --gen-compare --no-includes --scoped-enums --jsonschema --cpp-ptr-type flatbuffers::unique_ptr arrays_test.fbs || goto FAIL |
| 25 | ..\%buildtype%\flatc.exe --cpp --gen-mutable --gen-object-api --reflect-names --cpp-ptr-type flatbuffers::unique_ptr native_type_test.fbs || goto FAIL |
| 26 | |
| 27 | IF NOT "%MONSTER_EXTRA%"=="skip" ( |
| 28 | @echo Generate MosterExtra |
| 29 | ..\%buildtype%\flatc.exe --cpp --java --csharp --python --gen-mutable --reflect-names --gen-object-api --gen-compare --no-includes monster_extra.fbs monsterdata_extra.json || goto FAIL |
| 30 | ) else ( |
| 31 | @echo monster_extra.fbs skipped (the strtod function from MSVC2013 or older doesn't support NaN/Inf arguments) |
| 32 | ) |
| 33 | |
| 34 | cd ../samples |
| 35 | ..\%buildtype%\flatc.exe --cpp --lobster --gen-mutable --reflect-names --gen-object-api --gen-compare --cpp-ptr-type flatbuffers::unique_ptr monster.fbs || goto FAIL |
| 36 | ..\%buildtype%\flatc.exe -b --schema --bfbs-comments --bfbs-builtins monster.fbs || goto FAIL |
| 37 | cd ../reflection |
| 38 | call generate_code.bat %1 %2 || goto FAIL |
| 39 | |
| 40 | set EXITCODE=0 |
| 41 | goto SUCCESS |
| 42 | :FAIL |
| 43 | set EXITCODE=1 |
| 44 | :SUCCESS |
| 45 | cd ../tests |
| 46 | EXIT /B %EXITCODE% |