mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
PR-URL: https://github.com/nodejs/node/pull/58900 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
96 lines
2.4 KiB
Plaintext
96 lines
2.4 KiB
Plaintext
# Copyright 2018 The Chromium Authors
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
# This BUILD.gn file is specific to the standalone project. Do not
|
|
# copy this downstream.
|
|
|
|
import("//testing/test.gni")
|
|
|
|
static_library("crdtp") {
|
|
sources = [
|
|
"crdtp/cbor.cc",
|
|
"crdtp/cbor.h",
|
|
"crdtp/dispatch.cc",
|
|
"crdtp/dispatch.h",
|
|
"crdtp/error_support.cc",
|
|
"crdtp/error_support.h",
|
|
"crdtp/export.h",
|
|
"crdtp/find_by_first.h",
|
|
"crdtp/frontend_channel.h",
|
|
"crdtp/glue.h",
|
|
"crdtp/json.cc",
|
|
"crdtp/json.h",
|
|
"crdtp/parser_handler.h",
|
|
"crdtp/protocol_core.cc",
|
|
"crdtp/protocol_core.h",
|
|
"crdtp/serializable.cc",
|
|
"crdtp/serializable.h",
|
|
"crdtp/span.cc",
|
|
"crdtp/span.h",
|
|
"crdtp/status.cc",
|
|
"crdtp/status.h",
|
|
]
|
|
deps = [ ":crdtp_platform" ]
|
|
}
|
|
|
|
# A small adapter library which only :crdtp may depend on.
|
|
static_library("crdtp_platform") {
|
|
sources = [
|
|
"crdtp/json_platform.cc",
|
|
"crdtp/json_platform.h",
|
|
]
|
|
}
|
|
|
|
# In this (upstream) standalone package, we declare crdtp_test, and a
|
|
# few minimal files in testing (accessed via test_platform.{h,cc}) to
|
|
# make it look like Chromium's testing package. In Chromium,
|
|
# we run these tests as part of the content_unittests, declared in
|
|
# content/test/BUILD.gn, and in V8, we run them via unittests, declared
|
|
# in test/unittests/BUILD.gn.
|
|
|
|
test("crdtp_test") {
|
|
sources = [
|
|
"crdtp/cbor_test.cc",
|
|
"crdtp/dispatch_test.cc",
|
|
"crdtp/error_support_test.cc",
|
|
"crdtp/find_by_first_test.cc",
|
|
"crdtp/json_test.cc",
|
|
"crdtp/protocol_core_test.cc",
|
|
"crdtp/serializable_test.cc",
|
|
"crdtp/span_test.cc",
|
|
"crdtp/status_test.cc",
|
|
"crdtp/status_test_support.cc",
|
|
"crdtp/status_test_support.h",
|
|
"crdtp/test_string_traits.cc",
|
|
"crdtp/test_string_traits.h",
|
|
]
|
|
include_dirs = [ "." ]
|
|
deps = [
|
|
":crdtp",
|
|
":crdtp_test_platform",
|
|
]
|
|
}
|
|
|
|
# A small adapter library which only :crdtp_test may depend on.
|
|
static_library("crdtp_test_platform") {
|
|
sources = [
|
|
"crdtp/test_platform.cc",
|
|
"crdtp/test_platform.h",
|
|
]
|
|
testonly = true
|
|
include_dirs = [ "." ]
|
|
public_deps = [
|
|
"//base",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
"//testing/gtest:gtest_main",
|
|
]
|
|
}
|
|
|
|
# A command line utility for converting between JSON and CBOR.
|
|
executable("transcode") {
|
|
sources = [ "crdtp/transcode.cc" ]
|
|
deps = [ ":crdtp" ]
|
|
}
|