Keir Mierle | b776cb2 | 2020-08-14 16:46:50 -0700 | [diff] [blame] | 1 | # Copyright 2020 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 | |
Keir Mierle | b776cb2 | 2020-08-14 16:46:50 -0700 | [diff] [blame] | 15 | import("//build_overrides/pigweed.gni") |
| 16 | |
| 17 | import("$dir_pw_build/target_types.gni") |
| 18 | import("$dir_pw_docgen/docs.gni") |
Wyatt Hepler | d49f8fe | 2020-10-15 10:13:47 -0700 | [diff] [blame] | 19 | |
Keir Mierle | b776cb2 | 2020-08-14 16:46:50 -0700 | [diff] [blame] | 20 | config("default_config") { |
| 21 | include_dirs = [ "public" ] |
| 22 | } |
| 23 | |
| 24 | config("backend_config") { |
| 25 | include_dirs = [ "public_overrides" ] |
| 26 | } |
| 27 | |
Ewout van Bekkum | 2b42268 | 2022-02-25 13:28:53 -0800 | [diff] [blame] | 28 | config("lite_backend_overrides") { |
| 29 | include_dirs = [ "assert_lite_public_overrides" ] |
| 30 | } |
| 31 | |
| 32 | # This backend to pw_assert's PW_CHECK()/PW_CRASH() macros via PW_LOG. |
Keir Mierle | b776cb2 | 2020-08-14 16:46:50 -0700 | [diff] [blame] | 33 | pw_source_set("pw_assert_log") { |
| 34 | public_configs = [ |
| 35 | ":backend_config", |
| 36 | ":default_config", |
| 37 | ] |
Keir Mierle | b776cb2 | 2020-08-14 16:46:50 -0700 | [diff] [blame] | 38 | public_deps = [ "$dir_pw_log" ] |
Ewout van Bekkum | 2b42268 | 2022-02-25 13:28:53 -0800 | [diff] [blame] | 39 | public = [ "public_overrides/pw_assert_backend/assert_backend.h" ] |
Ewout van Bekkum | e4d7b69 | 2020-10-15 13:12:30 -0700 | [diff] [blame] | 40 | deps = [ |
Ewout van Bekkum | 2aff88e | 2021-11-12 15:36:57 -0800 | [diff] [blame] | 41 | "$dir_pw_assert:config", |
Ewout van Bekkum | e4d7b69 | 2020-10-15 13:12:30 -0700 | [diff] [blame] | 42 | "$dir_pw_assert:facade", |
| 43 | "$dir_pw_preprocessor", |
| 44 | ] |
Ewout van Bekkum | 2b42268 | 2022-02-25 13:28:53 -0800 | [diff] [blame] | 45 | sources = [ |
| 46 | "assert_log.cc", |
| 47 | "public/pw_assert_log/assert_log.h", |
| 48 | ] |
| 49 | } |
| 50 | |
| 51 | # This backend to pw_assert's PW_ASSERT() macros via PW_LOG. It is intended only |
| 52 | # for use with PW_LOG backends which are constexpr compatible such as |
| 53 | # pw_log_android. |
| 54 | # |
| 55 | # Warning: The "lite" naming is transitional. assert_lite_backend.h headers |
| 56 | # will be renamed as the pw_assert API is reassessed. (pwbug/246) |
| 57 | pw_source_set("lite_backend") { |
| 58 | public_configs = [ |
| 59 | ":lite_backend_overrides", |
| 60 | ":default_config", |
| 61 | ] |
| 62 | public_deps = [ dir_pw_preprocessor ] |
| 63 | public = |
| 64 | [ "assert_lite_public_overrides/pw_assert_backend/assert_lite_backend.h" ] |
| 65 | sources = [ "public/pw_assert_log/assert_lite_log.h" ] |
| 66 | } |
| 67 | |
| 68 | group("lite_compatibility_backend.impl") { |
Keir Mierle | b776cb2 | 2020-08-14 16:46:50 -0700 | [diff] [blame] | 69 | } |
| 70 | |
Wyatt Hepler | 1e36400 | 2021-05-06 17:44:03 -0700 | [diff] [blame] | 71 | # pw_assert_log doesn't have deps with potential circular dependencies, so this |
| 72 | # impl group can be empty. |
Wyatt Hepler | 6166322 | 2021-05-06 10:57:43 -0700 | [diff] [blame] | 73 | group("pw_assert_log.impl") { |
Wyatt Hepler | 8bd4fb0 | 2021-05-03 15:30:58 -0700 | [diff] [blame] | 74 | } |
| 75 | |
Keir Mierle | b776cb2 | 2020-08-14 16:46:50 -0700 | [diff] [blame] | 76 | pw_doc_group("docs") { |
| 77 | sources = [ "docs.rst" ] |
| 78 | } |