summaryrefslogtreecommitdiff
path: root/chromium/ipc/mojo/BUILD.gn
blob: 22f063aaf836b724e4a0d3c444586144ce1e3c4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Copyright 2014 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("//mojo/public/tools/bindings/mojom.gni")
import("//testing/test.gni")

mojom("mojom") {
  sources = [
    "ipc.mojom",
  ]
}

component("mojo") {
  sources = [
    "ipc_channel_mojo.cc",
    "ipc_channel_mojo.h",
    "ipc_message_pipe_reader.cc",
    "ipc_message_pipe_reader.h",
    "ipc_mojo_bootstrap.cc",
    "ipc_mojo_bootstrap.h",
    "ipc_mojo_handle_attachment.cc",
    "ipc_mojo_handle_attachment.h",
    "ipc_mojo_message_helper.cc",
    "ipc_mojo_message_helper.h",
    "ipc_mojo_param_traits.cc",
    "ipc_mojo_param_traits.h",
    "scoped_ipc_support.cc",
    "scoped_ipc_support.h",
  ]

  defines = [ "IPC_MOJO_IMPLEMENTATION" ]

  deps = [
    ":mojom",
    "//base",
    "//base/third_party/dynamic_annotations",
    "//ipc",
    "//mojo/edk/system",
    "//mojo/public/cpp/bindings",
  ]
}

test("ipc_mojo_unittests") {
  sources = [
    "ipc_channel_mojo_unittest.cc",
    "ipc_mojo_bootstrap_unittest.cc",
    "run_all_unittests.cc",
  ]

  deps = [
    ":mojo",
    ":mojom",
    "//base",
    "//base/test:test_support",
    "//base/third_party/dynamic_annotations",
    "//ipc",
    "//ipc:test_support",
    "//mojo/edk/system",
    "//mojo/edk/test:test_support",
    "//testing/gtest",
    "//url",
  ]
}

test("ipc_mojo_perftests") {
  sources = [
    "ipc_mojo_perftest.cc",
    "run_all_perftests.cc",
  ]

  deps = [
    ":mojo",
    ":mojom",
    "//base",
    "//base/test:test_support",
    "//base/third_party/dynamic_annotations",
    "//ipc",
    "//ipc:test_support",
    "//mojo/edk/system",
    "//mojo/edk/test:test_support",
    "//mojo/edk/test:test_support_impl",
    "//url",
  ]

  if (is_linux && !is_component_build) {
    public_configs = [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
  }
}