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

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

Issue 2926563002: Revert of Update FlatBuffers to include multiple improvements. (Closed)
Patch Set: 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.
13 source_set("flatbuffers") { 12 source_set("flatbuffers") {
14 sources = [ 13 sources = [
15 "src/include/flatbuffers/flatbuffers.h", 14 "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
21 public_configs = [ ":flatbuffers_config" ] 20 public_configs = [ ":flatbuffers_config" ]
22 } 21 }
23 22
24 # The complete FlatBuffers library, as required to build the flatc compiler and
25 # some of the tests.
26 source_set("compiler_files") { 23 source_set("compiler_files") {
27 include_dirs = [ "src/grpc" ]
28 sources = [ 24 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",
35 "src/include/flatbuffers/code_generators.h", 25 "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",
40 "src/include/flatbuffers/idl.h", 26 "src/include/flatbuffers/idl.h",
41 "src/include/flatbuffers/reflection.h",
42 "src/include/flatbuffers/reflection_generated.h",
43 "src/include/flatbuffers/util.h", 27 "src/include/flatbuffers/util.h",
44 "src/src/code_generators.cpp",
45 "src/src/flatc.cpp",
46 "src/src/idl_gen_cpp.cpp", 28 "src/src/idl_gen_cpp.cpp",
47 "src/src/idl_gen_fbs.cpp", 29 "src/src/idl_gen_fbs.cpp",
48 "src/src/idl_gen_general.cpp", 30 "src/src/idl_gen_general.cpp",
49 "src/src/idl_gen_go.cpp", 31 "src/src/idl_gen_go.cpp",
50 "src/src/idl_gen_grpc.cpp",
51 "src/src/idl_gen_js.cpp", 32 "src/src/idl_gen_js.cpp",
52 "src/src/idl_gen_php.cpp", 33 "src/src/idl_gen_php.cpp",
53 "src/src/idl_gen_python.cpp", 34 "src/src/idl_gen_python.cpp",
54 "src/src/idl_gen_text.cpp", 35 "src/src/idl_gen_text.cpp",
55 "src/src/idl_parser.cpp", 36 "src/src/idl_parser.cpp",
56 "src/src/reflection.cpp", 37 "src/src/reflection.cpp",
57 "src/src/util.cpp", 38 "src/src/util.cpp",
58 ] 39 ]
59 visibility = [ ":*" ] 40 visibility = [ ":*" ]
60 deps = [ 41 deps = [
61 ":flatbuffers", 42 ":flatbuffers",
62 ] 43 ]
63 } 44 }
64 45
65 executable("flatc") { 46 executable("flatc") {
66 sources = [ 47 sources = [
67 "src/src/flatc_main.cpp", 48 "src/src/flatc.cpp",
68 ] 49 ]
69 deps = [ 50 deps = [
70 ":compiler_files", 51 ":compiler_files",
71 ":flatbuffers", 52 ":flatbuffers",
72 "//build/config:exe_and_shlib_deps", 53 "//build/config:exe_and_shlib_deps",
73 ] 54 ]
74 } 55 }
75 56
76 # The following is just for testing. 57 # The following is just for testing.
77 58
78 flatbuffer("flatbuffers_samplebuffer") { 59 flatbuffer("flatbuffers_samplebuffer") {
79 testonly = true 60 testonly = true
80 sources = [ 61 sources = [
81 # Disabled as workaround for crbug.com/611351 62 # Disabled as workaround for crbug.com/611351
82 # "src/tests/include_test/include_test1.fbs", 63 # "src/tests/include_test1.fbs",
83 # "src/tests/include_test/sub/include_test2.fbs", 64 # "src/tests/include_test2.fbs",
84 "src/tests/monster_test.fbs", 65 "src/tests/monster_test.fbs",
85 "src/tests/namespace_test/namespace_test1.fbs", 66 "src/tests/namespace_test/namespace_test1.fbs",
86 "src/tests/namespace_test/namespace_test2.fbs", 67 "src/tests/namespace_test/namespace_test2.fbs",
87 ] 68 ]
88 flatc_include_dirs = [ "src/tests/include_test" ]
89 } 69 }
90 70
91 test("flatbuffers_unittest") { 71 test("flatbuffers_unittest") {
92 sources = [ 72 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.
93 "src/tests/test.cpp", 80 "src/tests/test.cpp",
81 "src/tests/test.h",
94 ] 82 ]
95 deps = [ 83 deps = [
96 ":compiler_files", 84 ":compiler_files",
97 ":flatbuffers", 85 ":flatbuffers",
98 ":flatbuffers_samplebuffer", 86 ":flatbuffers_samplebuffer",
99 ] 87 ]
100 data = [ 88 data = [
101 "src/tests/", 89 "src/tests/",
102 ] 90 ]
103 defines = [ "FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE" ]
104 } 91 }
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