blob: ab55707ce2058f22ac19cf0cc048f2e404caca46 [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" ]
Rob Mohra0ba54f2020-02-27 11:43:49 -080026 public = [ "public/pw_assert/assert.h" ]
27 public_deps = [ dir_pw_preprocessor ]
Keir Mierle3cee8792020-01-22 17:08:13 -080028}
29
30pw_test_group("tests") {
31 tests = []
32 if (dir_pw_assert_backend != "") {
33 tests += [ ":assert_test" ]
34 }
35}
36
37if (dir_pw_assert_backend != "") {
38 pw_test("assert_test") {
39 deps = [
40 ":pw_assert",
41 dir_pw_assert_backend,
42 ]
43
44 sources = [
45 "assert_test.c",
46 "assert_test.cc",
47 ]
48 }
49}
50
51pw_doc_group("docs") {
Rob Mohra0ba54f2020-02-27 11:43:49 -080052 sources = [ "docs.rst" ]
Keir Mierle3cee8792020-01-22 17:08:13 -080053}