Chromium Code Reviews| OLD | NEW |
|---|---|
| (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") { | |
| 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 compiler_files = [ | |
|
jochen (gone - plz use gerrit)
2016/04/21 14:59:00
should be a source_set
battre
2016/04/21 15:31:34
Done.
| |
| 22 "src/src/idl_gen_cpp.cpp", | |
| 23 "src/src/idl_gen_fbs.cpp", | |
| 24 "src/src/idl_gen_general.cpp", | |
| 25 "src/src/idl_gen_go.cpp", | |
| 26 "src/src/idl_gen_js.cpp", | |
| 27 "src/src/idl_gen_php.cpp", | |
| 28 "src/src/idl_gen_python.cpp", | |
| 29 "src/src/idl_gen_text.cpp", | |
| 30 "src/src/idl_parser.cpp", | |
| 31 "src/src/reflection.cpp", | |
| 32 "src/src/util.cpp", | |
| 33 "src/include/idl.h", | |
| 34 "src/include/util.h", | |
| 35 ] | |
| 36 | |
| 37 executable("flatc") { | |
| 38 sources = compiler_files + [ "src/src/flatc.cpp" ] | |
| 39 deps = [ | |
| 40 ":flatbuffers", | |
| 41 ] | |
| 42 } | |
| 43 | |
| 44 # The following is just for testing. | |
| 45 | |
| 46 import("//third_party/flatbuffers/flatc.gni") | |
| 47 | |
| 48 flatbuffers_library("flatbuffers_samplebuffer") { | |
| 49 sources = [ | |
|
jochen (gone - plz use gerrit)
2016/04/21 14:59:00
can you mark this library as test only
battre
2016/04/21 15:31:34
Done.
| |
| 50 "src/tests/include_test1.fbs", | |
| 51 "src/tests/include_test2.fbs", | |
| 52 "src/tests/monster_test.fbs", | |
| 53 "src/tests/namespace_test/namespace_test1.fbs", | |
| 54 "src/tests/namespace_test/namespace_test2.fbs", | |
| 55 ] | |
| 56 } | |
| 57 | |
| 58 executable("flatbuffers_unittest") { | |
| 59 sources = compiler_files + [ | |
|
jochen (gone - plz use gerrit)
2016/04/21 14:59:00
same here
battre
2016/04/21 15:31:34
Done.
| |
| 60 # The following files are not included in :flatbuffers | |
| 61 # but are listed here because test.cpp tests more than what will | |
| 62 # get included into Chrome (reflection and generation). | |
| 63 "src/include/reflection_generated.h", | |
| 64 "src/include/reflection.h", | |
| 65 | |
| 66 # This is the actual test. | |
| 67 "src/tests/test.cpp", | |
| 68 ] | |
| 69 deps = [ | |
| 70 ":flatbuffers", | |
| 71 ":flatbuffers_samplebuffer", | |
| 72 ] | |
| 73 } | |
| OLD | NEW |