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

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

Issue 1907603005: Add a dependency for FlatBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments on license Created 4 years, 7 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 | « third_party/devscripts/licensecheck.pl ('k') | third_party/flatbuffers/LICENSE » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 import("//testing/test.gni")
6 import("//third_party/flatbuffers/flatbuffer.gni")
7
8 config("flatbuffers_config") {
9 include_dirs = [ "src/include" ]
10 }
11
12 source_set("flatbuffers") {
13 sources = [
14 "src/include/flatbuffers/flatbuffers.h",
15 "src/include/flatbuffers/hash.h",
16 ]
17
18 configs -= [ "//build/config/compiler:chromium_code" ]
19 configs += [ "//build/config/compiler:no_chromium_code" ]
20 public_configs = [ ":flatbuffers_config" ]
21 }
22
23 source_set("compiler_files") {
24 sources = [
25 "src/include/idl.h",
26 "src/include/util.h",
27 "src/src/idl_gen_cpp.cpp",
28 "src/src/idl_gen_fbs.cpp",
29 "src/src/idl_gen_general.cpp",
30 "src/src/idl_gen_go.cpp",
31 "src/src/idl_gen_js.cpp",
32 "src/src/idl_gen_php.cpp",
33 "src/src/idl_gen_python.cpp",
34 "src/src/idl_gen_text.cpp",
35 "src/src/idl_parser.cpp",
36 "src/src/reflection.cpp",
37 "src/src/util.cpp",
38 ]
39 visibility = [ ":*" ]
40 deps = [
41 ":flatbuffers",
42 ]
43 }
44
45 executable("flatc") {
46 sources = [
47 "src/src/flatc.cpp",
48 ]
49 deps = [
50 ":compiler_files",
51 ":flatbuffers",
52 ]
53 }
54
55 # The following is just for testing.
56
57 flatbuffer("flatbuffers_samplebuffer") {
58 testonly = true
59 sources = [
60 "src/tests/include_test1.fbs",
61 "src/tests/include_test2.fbs",
62 "src/tests/monster_test.fbs",
63 "src/tests/namespace_test/namespace_test1.fbs",
64 "src/tests/namespace_test/namespace_test2.fbs",
65 ]
66 }
67
68 test("flatbuffers_unittest") {
69 sources = [
70 # The following files are not included in :flatbuffers
71 # but are listed here because test.cpp tests more than what will
72 # get included into Chrome (reflection and generation).
73 "src/include/reflection.h",
74 "src/include/reflection_generated.h",
75
76 # This is the actual test.
77 "src/tests/test.cpp",
78 ]
79 deps = [
80 ":compiler_files",
81 ":flatbuffers",
82 ":flatbuffers_samplebuffer",
83 ]
84 data = [
85 "src/tests/",
86 ]
87 }
OLDNEW
« no previous file with comments | « third_party/devscripts/licensecheck.pl ('k') | third_party/flatbuffers/LICENSE » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698