72 lines
2.7 KiB
Plaintext
72 lines
2.7 KiB
Plaintext
# Copyright 2022 The Pigweed Authors
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
# use this file except in compliance with the License. You may obtain a copy of
|
|
# the License at
|
|
#
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations under
|
|
# the License.
|
|
|
|
import("//build_overrides/pigweed.gni")
|
|
import("$dir_pw_build/python.gni")
|
|
|
|
import("$dir_pw_docgen/docs.gni")
|
|
import("$dir_pw_third_party/emboss/emboss.gni")
|
|
|
|
config("default_config") {
|
|
# EMBOSS_DCHECK is used as an assert() for logic embedded in Emboss, where
|
|
# EMBOSS_CHECK is used to check preconditions on application logic (e.g.
|
|
# Write() checks the [requires: ...] attribute).
|
|
defines = [
|
|
"EMBOSS_CHECK=PW_DCHECK",
|
|
"EMBOSS_CHECK_ABORTS",
|
|
"EMBOSS_DCHECK=PW_DCHECK",
|
|
"EMBOSS_DCHECK_ABORTS",
|
|
]
|
|
}
|
|
|
|
source_set("cpp_utils") {
|
|
public_configs = [ pw_third_party_emboss_CONFIG ]
|
|
sources = [
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_arithmetic.h",
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_arithmetic_all_known_generated.h",
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_arithmetic_maximum_operation_generated.h",
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_array_view.h",
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_bit_util.h",
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_constant_view.h",
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_cpp_types.h",
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_cpp_util.h",
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_defines.h",
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_enum_view.h",
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_maybe.h",
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_memory_util.h",
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_prelude.h",
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_text_util.h",
|
|
"$dir_pw_third_party_emboss/runtime/cpp/emboss_view_parameters.h",
|
|
]
|
|
}
|
|
|
|
# Exists solely to satisfy presubmit. embossc_runner.py is used for real in
|
|
# build_defs.gni.
|
|
action("embossc_runner") {
|
|
script = "embossc_runner.py"
|
|
visibility = []
|
|
outputs = [ "$target_gen_dir/foo" ]
|
|
}
|
|
|
|
pw_doc_group("docs") {
|
|
sources = [ "docs.rst" ]
|
|
}
|
|
|
|
# Flags that are needed to compile targets that depend on Emboss.
|
|
# TODO(benlawson): Fix Emboss upstream so this can be removed
|
|
# (https://github.com/google/emboss/issues/69)
|
|
config("flags") {
|
|
cflags = [ "-Wno-unused-parameter" ]
|
|
}
|