Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: third_party/flatbuffers/BUILD.gn

Issue 2883063002: Update FlatBuffers to include multiple improvements. (Closed)
Patch Set: Upgrade further. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « DEPS ('k') | third_party/flatbuffers/README.chromium » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//testing/test.gni") 5 import("//testing/test.gni")
6 import("//third_party/flatbuffers/flatbuffer.gni") 6 import("//third_party/flatbuffers/flatbuffer.gni")
7 7
8 config("flatbuffers_config") { 8 config("flatbuffers_config") {
9 include_dirs = [ "src/include" ] 9 include_dirs = [ "src/include" ]
10 } 10 }
11 11
12 # The part of FlatBuffers that Chrome is interested in.
12 source_set("flatbuffers") { 13 source_set("flatbuffers") {
13 sources = [ 14 sources = [
14 "src/include/flatbuffers/flatbuffers.h", 15 "src/include/flatbuffers/flatbuffers.h",
15 "src/include/flatbuffers/hash.h",
16 ] 16 ]
17 17
18 configs -= [ "//build/config/compiler:chromium_code" ] 18 configs -= [ "//build/config/compiler:chromium_code" ]
19 configs += [ "//build/config/compiler:no_chromium_code" ] 19 configs += [ "//build/config/compiler:no_chromium_code" ]
20
20 public_configs = [ ":flatbuffers_config" ] 21 public_configs = [ ":flatbuffers_config" ]
21 } 22 }
22 23
24 # The complete FlatBuffers library, as required to build the flatc compiler and
25 # some of the tests.
23 source_set("compiler_files") { 26 source_set("compiler_files") {
27 include_dirs = [ "src/grpc" ]
24 sources = [ 28 sources = [
29 "src/grpc/src/compiler/config.h",
30 "src/grpc/src/compiler/cpp_generator.cc",
31 "src/grpc/src/compiler/cpp_generator.h",
32 "src/grpc/src/compiler/go_generator.cc",
33 "src/grpc/src/compiler/go_generator.h",
34 "src/grpc/src/compiler/schema_interface.h",
25 "src/include/flatbuffers/code_generators.h", 35 "src/include/flatbuffers/code_generators.h",
36 "src/include/flatbuffers/flatc.h",
37 "src/include/flatbuffers/flexbuffers.h",
38 "src/include/flatbuffers/grpc.h",
39 "src/include/flatbuffers/hash.h",
26 "src/include/flatbuffers/idl.h", 40 "src/include/flatbuffers/idl.h",
41 "src/include/flatbuffers/reflection.h",
42 "src/include/flatbuffers/reflection_generated.h",
27 "src/include/flatbuffers/util.h", 43 "src/include/flatbuffers/util.h",
44 "src/src/code_generators.cpp",
45 "src/src/flatc.cpp",
28 "src/src/idl_gen_cpp.cpp", 46 "src/src/idl_gen_cpp.cpp",
29 "src/src/idl_gen_fbs.cpp", 47 "src/src/idl_gen_fbs.cpp",
30 "src/src/idl_gen_general.cpp", 48 "src/src/idl_gen_general.cpp",
31 "src/src/idl_gen_go.cpp", 49 "src/src/idl_gen_go.cpp",
50 "src/src/idl_gen_grpc.cpp",
32 "src/src/idl_gen_js.cpp", 51 "src/src/idl_gen_js.cpp",
33 "src/src/idl_gen_php.cpp", 52 "src/src/idl_gen_php.cpp",
34 "src/src/idl_gen_python.cpp", 53 "src/src/idl_gen_python.cpp",
35 "src/src/idl_gen_text.cpp", 54 "src/src/idl_gen_text.cpp",
36 "src/src/idl_parser.cpp", 55 "src/src/idl_parser.cpp",
37 "src/src/reflection.cpp", 56 "src/src/reflection.cpp",
38 "src/src/util.cpp", 57 "src/src/util.cpp",
39 ] 58 ]
40 visibility = [ ":*" ] 59 visibility = [ ":*" ]
41 deps = [ 60 deps = [
42 ":flatbuffers", 61 ":flatbuffers",
43 ] 62 ]
44 } 63 }
45 64
46 executable("flatc") { 65 executable("flatc") {
47 sources = [ 66 sources = [
48 "src/src/flatc.cpp", 67 "src/src/flatc_main.cpp",
49 ] 68 ]
50 deps = [ 69 deps = [
51 ":compiler_files", 70 ":compiler_files",
52 ":flatbuffers", 71 ":flatbuffers",
53 "//build/config:exe_and_shlib_deps", 72 "//build/config:exe_and_shlib_deps",
54 ] 73 ]
55 } 74 }
56 75
57 # The following is just for testing. 76 # The following is just for testing.
58 77
59 flatbuffer("flatbuffers_samplebuffer") { 78 flatbuffer("flatbuffers_samplebuffer") {
60 testonly = true 79 testonly = true
61 sources = [ 80 sources = [
62 # Disabled as workaround for crbug.com/611351 81 # Disabled as workaround for crbug.com/611351
63 # "src/tests/include_test1.fbs", 82 # "src/tests/include_test/include_test1.fbs",
64 # "src/tests/include_test2.fbs", 83 # "src/tests/include_test/sub/include_test2.fbs",
65 "src/tests/monster_test.fbs", 84 "src/tests/monster_test.fbs",
66 "src/tests/namespace_test/namespace_test1.fbs", 85 "src/tests/namespace_test/namespace_test1.fbs",
67 "src/tests/namespace_test/namespace_test2.fbs", 86 "src/tests/namespace_test/namespace_test2.fbs",
68 ] 87 ]
88 flatc_include_dirs = [ "src/tests/include_test" ]
69 } 89 }
70 90
71 test("flatbuffers_unittest") { 91 test("flatbuffers_unittest") {
72 sources = [ 92 sources = [
73 # The following files are not included in :flatbuffers
74 # but are listed here because test.cpp tests more than what will
75 # get included into Chrome (reflection and generation).
76 "src/include/reflection.h",
77 "src/include/reflection_generated.h",
78
79 # This is the actual test.
80 "src/tests/test.cpp", 93 "src/tests/test.cpp",
81 "src/tests/test.h",
82 ] 94 ]
83 deps = [ 95 deps = [
84 ":compiler_files", 96 ":compiler_files",
85 ":flatbuffers", 97 ":flatbuffers",
86 ":flatbuffers_samplebuffer", 98 ":flatbuffers_samplebuffer",
87 ] 99 ]
88 data = [ 100 data = [
89 "src/tests/", 101 "src/tests/",
90 ] 102 ]
103 defines = [ "FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE" ]
91 } 104 }
OLDNEW
« no previous file with comments | « DEPS ('k') | third_party/flatbuffers/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698