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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/devscripts/licensecheck.pl ('k') | third_party/flatbuffers/LICENSE » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/flatbuffers/BUILD.gn
diff --git a/third_party/flatbuffers/BUILD.gn b/third_party/flatbuffers/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..3897cfa982d996549c30b129be2c733c31872a87
--- /dev/null
+++ b/third_party/flatbuffers/BUILD.gn
@@ -0,0 +1,87 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//testing/test.gni")
+import("//third_party/flatbuffers/flatbuffer.gni")
+
+config("flatbuffers_config") {
+ include_dirs = [ "src/include" ]
+}
+
+source_set("flatbuffers") {
+ sources = [
+ "src/include/flatbuffers/flatbuffers.h",
+ "src/include/flatbuffers/hash.h",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ public_configs = [ ":flatbuffers_config" ]
+}
+
+source_set("compiler_files") {
+ sources = [
+ "src/include/idl.h",
+ "src/include/util.h",
+ "src/src/idl_gen_cpp.cpp",
+ "src/src/idl_gen_fbs.cpp",
+ "src/src/idl_gen_general.cpp",
+ "src/src/idl_gen_go.cpp",
+ "src/src/idl_gen_js.cpp",
+ "src/src/idl_gen_php.cpp",
+ "src/src/idl_gen_python.cpp",
+ "src/src/idl_gen_text.cpp",
+ "src/src/idl_parser.cpp",
+ "src/src/reflection.cpp",
+ "src/src/util.cpp",
+ ]
+ visibility = [ ":*" ]
+ deps = [
+ ":flatbuffers",
+ ]
+}
+
+executable("flatc") {
+ sources = [
+ "src/src/flatc.cpp",
+ ]
+ deps = [
+ ":compiler_files",
+ ":flatbuffers",
+ ]
+}
+
+# The following is just for testing.
+
+flatbuffer("flatbuffers_samplebuffer") {
+ testonly = true
+ sources = [
+ "src/tests/include_test1.fbs",
+ "src/tests/include_test2.fbs",
+ "src/tests/monster_test.fbs",
+ "src/tests/namespace_test/namespace_test1.fbs",
+ "src/tests/namespace_test/namespace_test2.fbs",
+ ]
+}
+
+test("flatbuffers_unittest") {
+ sources = [
+ # The following files are not included in :flatbuffers
+ # but are listed here because test.cpp tests more than what will
+ # get included into Chrome (reflection and generation).
+ "src/include/reflection.h",
+ "src/include/reflection_generated.h",
+
+ # This is the actual test.
+ "src/tests/test.cpp",
+ ]
+ deps = [
+ ":compiler_files",
+ ":flatbuffers",
+ ":flatbuffers_samplebuffer",
+ ]
+ data = [
+ "src/tests/",
+ ]
+}
« 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