blob: 83c32072346f31410fc0c301ccc40ca7cfb3546e [file] [log] [blame]
Keir Mierle3cee8792020-01-22 17:08:13 -08001# 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
15import("$dir_pw_build/facade.gni")
16import("$dir_pw_docgen/docs.gni")
17import("$dir_pw_unit_test/test.gni")
18
19config("default_config") {
20 include_dirs = [ "public" ]
21}
22
23pw_facade("pw_assert") {
24 backend = dir_pw_assert_backend
25 public_configs = [ ":default_config" ]
Keir Mierled1211ed2020-04-03 13:20:46 -070026 public = [
27 "public/pw_assert/assert.h",
28 "public/pw_assert/internal/assert_impl.h",
29 ]
Rob Mohra0ba54f2020-02-27 11:43:49 -080030 public_deps = [ dir_pw_preprocessor ]
Keir Mierle3cee8792020-01-22 17:08:13 -080031}
32
33pw_test_group("tests") {
34 tests = []
35 if (dir_pw_assert_backend != "") {
36 tests += [ ":assert_test" ]
37 }
38}
39
40if (dir_pw_assert_backend != "") {
41 pw_test("assert_test") {
42 deps = [
43 ":pw_assert",
44 dir_pw_assert_backend,
45 ]
46
47 sources = [
48 "assert_test.c",
49 "assert_test.cc",
50 ]
51 }
52}
53
54pw_doc_group("docs") {
Rob Mohra0ba54f2020-02-27 11:43:49 -080055 sources = [ "docs.rst" ]
Keir Mierle3cee8792020-01-22 17:08:13 -080056}