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 15include("$ENV{PW_ROOT}/pw_build/pigweed.cmake") 16 17if("cxx_std_20" IN_LIST CMAKE_CXX_COMPILE_FEATURES) 18 pw_add_test(pw_async2.examples.basic 19 SOURCES 20 basic.cc 21 PRIVATE_DEPS 22 pw_allocator.testing 23 pw_async2.coro 24 ) 25 26 pw_add_test(pw_async2.examples.coro_blinky_loop 27 SOURCES 28 coro_blinky_loop.cc 29 PRIVATE_DEPS 30 pw_allocator.testing 31 pw_async2.coro 32 pw_async2.dispatcher 33 pw_async2.time_provider 34 pw_async2.simulated_time_provider 35 pw_chrono.system_clock 36 ) 37 38 pw_add_test(pw_async2.examples.once_send_recv 39 SOURCES 40 once_send_recv.cc 41 PRIVATE_DEPS 42 pw_allocator.testing 43 pw_async2.coro 44 pw_async2.once_sender 45 ) 46endif() 47