xref: /aosp_15_r20/external/pigweed/pw_async2/examples/BUILD.bazel (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1# Copyright 2024 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15load("@rules_python//sphinxdocs:sphinx_docs_library.bzl", "sphinx_docs_library")
16load("//pw_build:compatibility.bzl", "incompatible_with_mcu")
17load("//pw_unit_test:pw_cc_test.bzl", "pw_cc_test")
18
19package(default_visibility = ["//visibility:public"])
20
21licenses(["notice"])
22
23pw_cc_test(
24    name = "basic",
25    srcs = ["basic.cc"],
26    deps = [
27        "//pw_allocator:testing",
28        "//pw_async2:coro",
29        "//pw_async2:dispatcher",
30    ],
31)
32
33pw_cc_test(
34    name = "coro_blinky_loop",
35    srcs = ["coro_blinky_loop.cc"],
36    deps = [
37        "//pw_allocator:testing",
38        "//pw_async2:coro",
39        "//pw_async2:dispatcher",
40        "//pw_async2:simulated_time_provider",
41        "//pw_async2:time_provider",
42        "//pw_chrono:system_clock",
43    ],
44)
45
46pw_cc_test(
47    name = "once_send_recv",
48    srcs = ["once_send_recv.cc"],
49    deps = [
50        "//pw_allocator:testing",
51        "//pw_async2:coro",
52        "//pw_async2:dispatcher",
53        "//pw_async2:once_sender",
54    ],
55)
56
57sphinx_docs_library(
58    name = "docs",
59    srcs = [
60        "basic.cc",
61        "once_send_recv.cc",
62    ],
63    prefix = "pw_async2/",
64    target_compatible_with = incompatible_with_mcu(),
65)
66