blob: 2e60199fc50d38e6f7dc024afff03248cdde920d [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" ]
26 public = [
27 "public/pw_assert/assert.h",
28 ]
29 public_deps = [
30 dir_pw_preprocessor,
31 ]
32}
33
34pw_test_group("tests") {
35 tests = []
36 if (dir_pw_assert_backend != "") {
37 tests += [ ":assert_test" ]
38 }
39}
40
41if (dir_pw_assert_backend != "") {
42 pw_test("assert_test") {
43 deps = [
44 ":pw_assert",
45 dir_pw_assert_backend,
46 ]
47
48 sources = [
49 "assert_test.c",
50 "assert_test.cc",
51 ]
52 }
53}
54
55pw_doc_group("docs") {
56 sources = [
57 "docs.rst",
58 ]
59}