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

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: testonly for generated files Created 4 years, 8 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
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 config("flatbuffers_config") {
6 include_dirs = [ "src/include" ]
7 }
8
9 static_library("flatbuffers") {
brettw 2016/04/21 20:00:03 This should be a source_set.
battre 2016/04/25 14:31:47 Done. I have also deleted flathash.cpp, which shou
10 sources = [
11 "src/include/flatbuffers/flatbuffers.h",
12 "src/include/flatbuffers/hash.h",
13 "src/src/flathash.cpp",
14 ]
15
16 configs -= [ "//build/config/compiler:chromium_code" ]
17 configs += [ "//build/config/compiler:no_chromium_code" ]
18 public_configs = [ ":flatbuffers_config" ]
19 }
20
21 source_set("compiler_files") {
22 sources = [
brettw 2016/04/21 20:00:03 Can you set visibility = [ ":*" ] here so target
battre 2016/04/25 14:31:47 Done.
23 "src/include/idl.h",
24 "src/include/util.h",
25 "src/src/idl_gen_cpp.cpp",
26 "src/src/idl_gen_fbs.cpp",
27 "src/src/idl_gen_general.cpp",
28 "src/src/idl_gen_go.cpp",
29 "src/src/idl_gen_js.cpp",
30 "src/src/idl_gen_php.cpp",
31 "src/src/idl_gen_python.cpp",
32 "src/src/idl_gen_text.cpp",
33 "src/src/idl_parser.cpp",
34 "src/src/reflection.cpp",
35 "src/src/util.cpp",
36 ]
37 deps = [
38 ":flatbuffers",
39 ]
40 }
41
42 executable("flatc") {
43 sources = [
44 "src/src/flatc.cpp",
45 ]
46 deps = [
47 ":compiler_files",
48 ":flatbuffers",
49 ]
50 }
51
52 # The following is just for testing.
53
54 import("//third_party/flatbuffers/flatc.gni")
55
56 flatbuffers_library("flatbuffers_samplebuffer") {
57 testonly = true
58 sources = [
59 "src/tests/include_test1.fbs",
60 "src/tests/include_test2.fbs",
61 "src/tests/monster_test.fbs",
62 "src/tests/namespace_test/namespace_test1.fbs",
63 "src/tests/namespace_test/namespace_test2.fbs",
64 ]
65 }
66
67 executable("flatbuffers_unittest") {
brettw 2016/04/21 20:00:02 This should use the test() template in //testing/t
battre 2016/04/25 14:31:47 Done.
68 testonly = true
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 }
OLDNEW
« no previous file with comments | « DEPS ('k') | third_party/flatbuffers/LICENSE » ('j') | third_party/flatbuffers/flatc.gni » ('J')

Powered by Google App Engine
This is Rietveld 408576698