1# Copyright 2019 the V8 project 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 5import("../../gni/v8.gni") 6 7config("crdtp_config") { 8 visibility = [ 9 ":*", 10 "../../src/inspector:*", 11 ] 12 configs = [ "../../:internal_config" ] 13 include_dirs = [ "../../include" ] 14} 15 16v8_source_set("crdtp") { 17 sources = [ 18 "crdtp/cbor.cc", 19 "crdtp/cbor.h", 20 "crdtp/dispatch.cc", 21 "crdtp/dispatch.h", 22 "crdtp/error_support.cc", 23 "crdtp/error_support.h", 24 "crdtp/export.h", 25 "crdtp/find_by_first.h", 26 "crdtp/json.cc", 27 "crdtp/json.h", 28 "crdtp/maybe.h", 29 "crdtp/parser_handler.h", 30 "crdtp/protocol_core.cc", 31 "crdtp/protocol_core.h", 32 "crdtp/serializable.cc", 33 "crdtp/serializable.h", 34 "crdtp/span.cc", 35 "crdtp/span.h", 36 "crdtp/status.cc", 37 "crdtp/status.h", 38 ] 39 configs = [ ":crdtp_config" ] 40 deps = [ ":crdtp_platform" ] 41} 42 43# A small adapter library which only :crdtp may depend on. 44v8_source_set("crdtp_platform") { 45 visibility = [ ":crdtp" ] 46 sources = [ 47 "crdtp/json_platform.h", 48 "crdtp/json_platform_v8.cc", 49 ] 50 public_deps = [ "../..:v8_libbase" ] 51 deps = [ "../../:v8_internal_headers" ] 52 configs = [ ":crdtp_config" ] 53} 54 55# These tests are linked into test/unittests. 56v8_source_set("crdtp_test") { 57 sources = [ 58 "crdtp/cbor_test.cc", 59 "crdtp/dispatch_test.cc", 60 "crdtp/error_support_test.cc", 61 "crdtp/find_by_first_test.cc", 62 "crdtp/glue_test.cc", 63 "crdtp/json_test.cc", 64 "crdtp/serializable_test.cc", 65 "crdtp/span_test.cc", 66 "crdtp/status_test.cc", 67 "crdtp/status_test_support.cc", 68 "crdtp/status_test_support.h", 69 ] 70 configs = [ ":crdtp_config" ] 71 deps = [ ":crdtp_test_platform" ] 72 testonly = true 73} 74 75# A small adapter library which only :crdtp_test may depend on. 76v8_source_set("crdtp_test_platform") { 77 sources = [ 78 "crdtp/test_platform.h", 79 "crdtp/test_platform_v8.cc", 80 ] 81 configs = [ ":crdtp_config" ] 82 public_deps = [ 83 ":crdtp", 84 "../..:v8_libbase", 85 "../../src/inspector:inspector_string_conversions", 86 "//testing/gmock", 87 "//testing/gtest", 88 ] 89 testonly = true 90} 91