1# Copyright 2022 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("//build_overrides/pigweed.gni") 16import("$dir_pw_build/python.gni") 17import("$dir_pw_build/target_types.gni") 18 19import("$dir_pw_docgen/docs.gni") 20import("$dir_pw_third_party/emboss/emboss.gni") 21 22config("default_config") { 23 # EMBOSS_DCHECK is used as an assert() for logic embedded in Emboss, where 24 # EMBOSS_CHECK is used to check preconditions on application logic (e.g. 25 # Write() checks the [requires: ...] attribute). 26 defines = [ 27 "EMBOSS_CHECK=PW_DASSERT", 28 "EMBOSS_CHECK_ABORTS", 29 "EMBOSS_DCHECK=PW_DASSERT", 30 "EMBOSS_DCHECK_ABORTS", 31 ] 32 cflags_cc = [ 33 "-include", 34 rebase_path("$dir_pw_assert/public/pw_assert/assert.h", root_build_dir), 35 ] 36} 37 38pw_source_set("default_overrides") { 39 public_configs = [ ":default_config" ] 40 public_deps = [ "$dir_pw_assert" ] 41} 42 43pw_source_set("cpp_utils") { 44 # emboss depends on a separate checkout not included in pigweed, so 45 # ignore gn check for this module. 46 check_includes = false 47 public = [ 48 "$dir_pw_third_party_emboss/runtime/cpp/emboss_arithmetic.h", 49 "$dir_pw_third_party_emboss/runtime/cpp/emboss_arithmetic_all_known_generated.h", 50 "$dir_pw_third_party_emboss/runtime/cpp/emboss_arithmetic_maximum_operation_generated.h", 51 "$dir_pw_third_party_emboss/runtime/cpp/emboss_array_view.h", 52 "$dir_pw_third_party_emboss/runtime/cpp/emboss_bit_util.h", 53 "$dir_pw_third_party_emboss/runtime/cpp/emboss_constant_view.h", 54 "$dir_pw_third_party_emboss/runtime/cpp/emboss_cpp_types.h", 55 "$dir_pw_third_party_emboss/runtime/cpp/emboss_cpp_util.h", 56 "$dir_pw_third_party_emboss/runtime/cpp/emboss_defines.h", 57 "$dir_pw_third_party_emboss/runtime/cpp/emboss_enum_view.h", 58 "$dir_pw_third_party_emboss/runtime/cpp/emboss_maybe.h", 59 "$dir_pw_third_party_emboss/runtime/cpp/emboss_memory_util.h", 60 "$dir_pw_third_party_emboss/runtime/cpp/emboss_prelude.h", 61 "$dir_pw_third_party_emboss/runtime/cpp/emboss_text_util.h", 62 "$dir_pw_third_party_emboss/runtime/cpp/emboss_view_parameters.h", 63 ] 64 public_deps = [ pw_third_party_emboss_CONFIG ] 65 visibility = [ "*" ] 66} 67 68# Exists solely to satisfy presubmit. embossc_runner.py is used for real in 69# build_defs.gni. 70action("embossc_runner") { 71 script = "embossc_runner.py" 72 visibility = [] 73 outputs = [ "$target_gen_dir/foo" ] 74} 75 76pw_doc_group("docs") { 77 sources = [ "docs.rst" ] 78} 79