tuple: update to make use of C++11
[chromium-blink-merge.git] / mojo / edk / system / BUILD.gn
blob8d24a08844af364a8c5022e8443da238f9110283
1 # Copyright 2014 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.
5 import("../mojo_edk.gni")
7 if (is_android) {
8   import("//build/config/android/config.gni")
9   import("//build/config/android/rules.gni")
12 config("system_config") {
13   defines = [
14     # Ensures that dependent projects import the core functions on Windows.
15     "MOJO_USE_SYSTEM_IMPL",
16   ]
19 component("system") {
20   output_name = "mojo_system_impl"
22   sources = [
23     "awakable.h",
24     "awakable_list.cc",
25     "awakable_list.h",
26     "channel.cc",
27     "channel.h",
28     "channel_endpoint.cc",
29     "channel_endpoint.h",
30     "channel_endpoint_client.h",
31     "channel_endpoint_id.cc",
32     "channel_endpoint_id.h",
33     "channel_info.cc",
34     "channel_info.h",
35     "channel_manager.cc",
36     "channel_manager.h",
37     "configuration.cc",
38     "configuration.h",
39     "core.cc",
40     "core.h",
41     "data_pipe.cc",
42     "data_pipe.h",
43     "data_pipe_consumer_dispatcher.cc",
44     "data_pipe_consumer_dispatcher.h",
45     "data_pipe_producer_dispatcher.cc",
46     "data_pipe_producer_dispatcher.h",
47     "dispatcher.cc",
48     "dispatcher.h",
49     "endpoint_relayer.cc",
50     "endpoint_relayer.h",
51     "handle_signals_state.h",
52     "handle_table.cc",
53     "handle_table.h",
54     "local_data_pipe.cc",
55     "local_data_pipe.h",
56     "local_message_pipe_endpoint.cc",
57     "local_message_pipe_endpoint.h",
58     "mapping_table.cc",
59     "mapping_table.h",
60     "memory.cc",
61     "memory.h",
62     "message_in_transit.cc",
63     "message_in_transit.h",
64     "message_in_transit_queue.cc",
65     "message_in_transit_queue.h",
66     "message_pipe.cc",
67     "message_pipe.h",
68     "message_pipe_dispatcher.cc",
69     "message_pipe_dispatcher.h",
70     "message_pipe_endpoint.cc",
71     "message_pipe_endpoint.h",
72     "options_validation.h",
73     "platform_handle_dispatcher.cc",
74     "platform_handle_dispatcher.h",
75     "proxy_message_pipe_endpoint.cc",
76     "proxy_message_pipe_endpoint.h",
77     "raw_channel.cc",
78     "raw_channel.h",
79     "raw_channel_posix.cc",
80     "raw_channel_win.cc",
81     "shared_buffer_dispatcher.cc",
82     "shared_buffer_dispatcher.h",
83     "simple_dispatcher.cc",
84     "simple_dispatcher.h",
85     "transport_data.cc",
86     "transport_data.h",
87     "waiter.cc",
88     "waiter.h",
89   ]
91   defines = [
92     "MOJO_SYSTEM_IMPL_IMPLEMENTATION",
93     "MOJO_SYSTEM_IMPLEMENTATION",
94   ]
96   all_dependent_configs = [ ":system_config" ]
98   public_deps = [
99     "../embedder",
100     "../embedder:platform",
101     "../../public/c/system",
102   ]
104   deps = [
105     "//base",
106     "//base/third_party/dynamic_annotations",
107   ]
109   allow_circular_includes_from = [ "../embedder" ]
112 mojo_edk_source_set("test_utils") {
113   testonly = true
115   sources = [
116     "test_utils.cc",
117     "test_utils.h",
118   ]
120   deps = [
121     "//base",
122     "//base/test:test_support",
123   ]
126 # GYP version: mojo/edk/mojo_edk.gyp:mojo_system_unittests
127 test("mojo_system_unittests") {
128   sources = [
129     "../test/multiprocess_test_helper_unittest.cc",
130     "awakable_list_unittest.cc",
131     "channel_endpoint_id_unittest.cc",
132     "channel_manager_unittest.cc",
133     "channel_unittest.cc",
134     "core_test_base.cc",
135     "core_test_base.h",
136     "core_unittest.cc",
137     "data_pipe_unittest.cc",
138     "dispatcher_unittest.cc",
139     "local_data_pipe_unittest.cc",
140     "memory_unittest.cc",
141     "message_pipe_dispatcher_unittest.cc",
142     "message_pipe_test_utils.cc",
143     "message_pipe_test_utils.h",
144     "message_pipe_unittest.cc",
145     "multiprocess_message_pipe_unittest.cc",
146     "options_validation_unittest.cc",
147     "platform_handle_dispatcher_unittest.cc",
148     "raw_channel_unittest.cc",
149     "remote_message_pipe_unittest.cc",
150     "run_all_unittests.cc",
151     "shared_buffer_dispatcher_unittest.cc",
152     "simple_dispatcher_unittest.cc",
153     "waiter_test_utils.cc",
154     "waiter_test_utils.h",
155     "waiter_unittest.cc",
156   ]
158   deps = [
159     ":system",
160     ":test_utils",
161     "../embedder:embedder_unittests",
162     "../test:test_support",
163     "//base",
164     "//base/test:test_support",
165     "//testing/gtest",
166   ]
168   if (is_android) {
169     deps += [ "//testing/android:native_test_native_code" ]
170   }
172   allow_circular_includes_from = [ "../embedder:embedder_unittests" ]
175 # GYP version: mojo/edk/mojo_edk.gyp:mojo_message_pipe_perftests
176 test("mojo_message_pipe_perftests") {
177   sources = [
178     "message_pipe_perftest.cc",
179     "message_pipe_test_utils.h",
180     "message_pipe_test_utils.cc",
181   ]
183   deps = [
184     ":system",
185     ":test_utils",
186     "../test:test_support",
187     "//base",
188     "//base/test:test_support",
189     "//base/test:test_support_perf",
190     "//testing/gtest",
191   ]
194 if (is_android) {
195   unittest_apk("mojo_system_unittests_apk") {
196     deps = [
197       ":mojo_system_unittests",
198     ]
199     unittests_dep = ":mojo_system_unittests"
200   }