2018-08-10 15:21:17 +00:00
|
|
|
licenses(["notice"])
|
|
|
|
|
2018-02-05 18:23:15 +00:00
|
|
|
package(
|
|
|
|
default_visibility = ["//visibility:public"],
|
|
|
|
features = [
|
|
|
|
"-layering_check",
|
|
|
|
"-parse_headers",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
exports_files([
|
|
|
|
"LICENSE",
|
|
|
|
])
|
|
|
|
|
2018-12-10 20:23:40 +00:00
|
|
|
load(":build_defs.bzl", "flatbuffer_cc_library")
|
|
|
|
|
2018-02-05 18:23:15 +00:00
|
|
|
# Public flatc library to compile flatbuffer files at runtime.
|
|
|
|
cc_library(
|
|
|
|
name = "flatbuffers",
|
|
|
|
srcs = [
|
|
|
|
"src/code_generators.cpp",
|
|
|
|
"src/idl_gen_fbs.cpp",
|
|
|
|
"src/idl_gen_general.cpp",
|
|
|
|
"src/idl_gen_text.cpp",
|
|
|
|
"src/idl_parser.cpp",
|
|
|
|
"src/reflection.cpp",
|
|
|
|
"src/util.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [":public_headers"],
|
|
|
|
includes = ["include/"],
|
|
|
|
linkstatic = 1,
|
|
|
|
)
|
|
|
|
|
|
|
|
# Public C++ headers for the Flatbuffers library.
|
|
|
|
filegroup(
|
|
|
|
name = "public_headers",
|
|
|
|
srcs = [
|
|
|
|
"include/flatbuffers/base.h",
|
|
|
|
"include/flatbuffers/code_generators.h",
|
|
|
|
"include/flatbuffers/flatbuffers.h",
|
|
|
|
"include/flatbuffers/flexbuffers.h",
|
|
|
|
"include/flatbuffers/hash.h",
|
|
|
|
"include/flatbuffers/idl.h",
|
2018-07-23 23:28:49 +00:00
|
|
|
"include/flatbuffers/minireflect.h",
|
2018-02-05 18:23:15 +00:00
|
|
|
"include/flatbuffers/reflection.h",
|
|
|
|
"include/flatbuffers/reflection_generated.h",
|
|
|
|
"include/flatbuffers/stl_emulation.h",
|
|
|
|
"include/flatbuffers/util.h",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
# Public flatc compiler library.
|
|
|
|
cc_library(
|
|
|
|
name = "flatc_library",
|
|
|
|
srcs = [
|
|
|
|
"src/code_generators.cpp",
|
|
|
|
"src/flatc.cpp",
|
|
|
|
"src/idl_gen_fbs.cpp",
|
|
|
|
"src/idl_parser.cpp",
|
|
|
|
"src/reflection.cpp",
|
|
|
|
"src/util.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/flatbuffers/flatc.h",
|
|
|
|
":public_headers",
|
|
|
|
],
|
|
|
|
includes = [
|
|
|
|
"grpc/",
|
|
|
|
"include/",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
# Public flatc compiler.
|
|
|
|
cc_binary(
|
|
|
|
name = "flatc",
|
|
|
|
srcs = [
|
|
|
|
"grpc/src/compiler/config.h",
|
|
|
|
"grpc/src/compiler/cpp_generator.cc",
|
|
|
|
"grpc/src/compiler/cpp_generator.h",
|
|
|
|
"grpc/src/compiler/go_generator.cc",
|
|
|
|
"grpc/src/compiler/go_generator.h",
|
2018-03-15 19:31:16 +00:00
|
|
|
"grpc/src/compiler/java_generator.cc",
|
|
|
|
"grpc/src/compiler/java_generator.h",
|
2018-02-05 18:23:15 +00:00
|
|
|
"grpc/src/compiler/schema_interface.h",
|
|
|
|
"src/flatc_main.cpp",
|
|
|
|
"src/idl_gen_cpp.cpp",
|
Add [Dart] support (#4676)
* Add [Dart] support
* fix enum vectors
* Allow for opt out of string interning
* fix comment style, make interning opt in
* remove Offset<T>, prefer int
* avoid creating unnecessary vtable objects
* start work on tests - do not generate builder if struct has 0 fields - add int64
* support reading structs properly
* correctly handle reading vectors of structs, dartfmt
* support structs, fix unnecessary prepares
* fix bool customizations
* undo unintentional removal of file
* docs updates, complete tutorial, bug fix for codegen
* more documentation
* Update docs, add to doxygen file
* update package structure, add samples script/code
* rearrange sample
* Tests
* Add readme for pub
* cleanup package for pub
* update docs for renamed file
* remove custom matcher, use `closeTo` instead
* remove unintentional file
* remove unintended file checkin
* use auto, move method, cleanup
* refactor to ObjectBuilders, add Builders
* Update tests, examples
* Add files missing from previous commit
* documentation and example updates
* Update LICENSE, make dartanalyzer happy, fix minor bugs, get rid of duplicate files, publish script
* fix sample for slightly different schema
* Update pubspec.yaml
2018-05-18 18:06:15 +00:00
|
|
|
"src/idl_gen_dart.cpp",
|
2018-02-05 18:23:15 +00:00
|
|
|
"src/idl_gen_general.cpp",
|
|
|
|
"src/idl_gen_go.cpp",
|
|
|
|
"src/idl_gen_grpc.cpp",
|
2018-12-06 19:12:06 +00:00
|
|
|
"src/idl_gen_js_ts.cpp",
|
2018-02-05 18:23:15 +00:00
|
|
|
"src/idl_gen_json_schema.cpp",
|
2018-07-24 02:03:11 +00:00
|
|
|
"src/idl_gen_lobster.cpp",
|
2018-12-10 20:23:40 +00:00
|
|
|
"src/idl_gen_lua.cpp",
|
2018-02-05 18:23:15 +00:00
|
|
|
"src/idl_gen_php.cpp",
|
|
|
|
"src/idl_gen_python.cpp",
|
2018-09-03 00:05:50 +00:00
|
|
|
"src/idl_gen_rust.cpp",
|
2018-02-05 18:23:15 +00:00
|
|
|
"src/idl_gen_text.cpp",
|
|
|
|
],
|
|
|
|
includes = [
|
|
|
|
"grpc/",
|
|
|
|
"include/",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":flatc_library",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2018-10-15 19:18:15 +00:00
|
|
|
cc_library(
|
|
|
|
name = "runtime_cc",
|
|
|
|
hdrs = [
|
|
|
|
"include/flatbuffers/base.h",
|
|
|
|
"include/flatbuffers/flatbuffers.h",
|
2018-12-10 20:23:40 +00:00
|
|
|
"include/flatbuffers/flexbuffers.h",
|
2018-10-15 19:18:15 +00:00
|
|
|
"include/flatbuffers/stl_emulation.h",
|
|
|
|
"include/flatbuffers/util.h",
|
|
|
|
],
|
|
|
|
includes = ["include/"],
|
|
|
|
linkstatic = 1,
|
|
|
|
)
|
|
|
|
|
2018-02-05 18:23:15 +00:00
|
|
|
# Test binary.
|
|
|
|
cc_test(
|
|
|
|
name = "flatbuffers_test",
|
|
|
|
testonly = 1,
|
|
|
|
srcs = [
|
|
|
|
"include/flatbuffers/minireflect.h",
|
|
|
|
"include/flatbuffers/registry.h",
|
|
|
|
"src/code_generators.cpp",
|
|
|
|
"src/idl_gen_fbs.cpp",
|
|
|
|
"src/idl_gen_general.cpp",
|
|
|
|
"src/idl_gen_text.cpp",
|
|
|
|
"src/idl_parser.cpp",
|
|
|
|
"src/reflection.cpp",
|
|
|
|
"src/util.cpp",
|
|
|
|
"tests/namespace_test/namespace_test1_generated.h",
|
|
|
|
"tests/namespace_test/namespace_test2_generated.h",
|
|
|
|
"tests/test.cpp",
|
2018-12-10 20:23:40 +00:00
|
|
|
"tests/test_assert.cpp",
|
2018-09-24 19:03:31 +00:00
|
|
|
"tests/test_assert.h",
|
|
|
|
"tests/test_builder.cpp",
|
2018-12-10 20:23:40 +00:00
|
|
|
"tests/test_builder.h",
|
2018-02-05 18:23:15 +00:00
|
|
|
"tests/union_vector/union_vector_generated.h",
|
|
|
|
":public_headers",
|
|
|
|
],
|
2018-08-10 20:43:48 +00:00
|
|
|
copts = [
|
2018-02-05 18:23:15 +00:00
|
|
|
"-DFLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE",
|
2018-11-16 17:19:34 +00:00
|
|
|
"-DBAZEL_TEST_DATA_PATH",
|
2018-02-05 18:23:15 +00:00
|
|
|
],
|
|
|
|
data = [
|
|
|
|
":tests/include_test/include_test1.fbs",
|
|
|
|
":tests/include_test/sub/include_test2.fbs",
|
|
|
|
":tests/monster_test.bfbs",
|
|
|
|
":tests/monster_test.fbs",
|
|
|
|
":tests/monsterdata_test.golden",
|
|
|
|
":tests/prototest/imported.proto",
|
|
|
|
":tests/prototest/test.golden",
|
|
|
|
":tests/prototest/test.proto",
|
2018-03-05 16:45:25 +00:00
|
|
|
":tests/prototest/test_union.golden",
|
2018-10-11 19:40:41 +00:00
|
|
|
":tests/unicode_test.json",
|
2018-12-10 20:23:40 +00:00
|
|
|
":tests/union_vector/union_vector.fbs",
|
2018-02-05 18:23:15 +00:00
|
|
|
],
|
|
|
|
includes = ["include/"],
|
2019-02-14 21:05:46 +00:00
|
|
|
deps = [
|
|
|
|
":monster_extra_cc_fbs",
|
|
|
|
":monster_test_cc_fbs",
|
|
|
|
],
|
2018-02-05 18:23:15 +00:00
|
|
|
)
|
2018-12-10 20:23:40 +00:00
|
|
|
|
|
|
|
# Test bzl rules
|
|
|
|
|
|
|
|
flatbuffer_cc_library(
|
|
|
|
name = "monster_test_cc_fbs",
|
|
|
|
srcs = ["tests/monster_test.fbs"],
|
|
|
|
include_paths = ["tests/include_test"],
|
|
|
|
includes = [
|
|
|
|
"tests/include_test/include_test1.fbs",
|
|
|
|
"tests/include_test/sub/include_test2.fbs",
|
|
|
|
],
|
|
|
|
)
|
2019-02-14 21:05:46 +00:00
|
|
|
|
|
|
|
flatbuffer_cc_library(
|
|
|
|
name = "monster_extra_cc_fbs",
|
|
|
|
srcs = ["tests/monster_extra.fbs"],
|
|
|
|
)
|