blob: ded925562fcc34e045d9f7188b80a9ba02729a8f [file] [log] [blame]
# 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_build/target_types.gni")
import("$dir_pw_docgen/docs.gni")
import("$dir_pw_unit_test/test.gni")
pw_doc_group("docs") {
sources = [ "docs.rst" ]
}
config("fit_public_include_path") {
include_dirs = [ "repo/sdk/lib/fit/include" ]
visibility = [ ":*" ]
}
config("stdcompat_public_include_path") {
include_dirs = [ "repo/sdk/lib/stdcompat/include" ]
visibility = [ ":*" ]
}
pw_source_set("fit") {
public_configs = [ ":fit_public_include_path" ]
public_deps = [ ":stdcompat" ]
public = [
"repo/sdk/lib/fit/include/lib/fit/function.h",
"repo/sdk/lib/fit/include/lib/fit/nullable.h",
"repo/sdk/lib/fit/include/lib/fit/traits.h",
]
sources = [
"repo/sdk/lib/fit/include/lib/fit/function_internal.h",
"repo/sdk/lib/fit/include/lib/fit/utility_internal.h",
]
}
pw_test("function_tests") {
sources = [ "repo/sdk/lib/fit/test/function_tests.cc" ]
deps = [ ":fit" ]
# Define EXPECT_NULL(), which Pigweed's test framework does not have
defines = [ "EXPECT_NULL(arg)=EXPECT_EQ((arg), nullptr)" ]
# This test does not build with strict warnings, so disable them.
remove_configs = [ "$dir_pw_build:strict_warnings" ]
}
pw_source_set("stdcompat") {
public_configs = [ ":stdcompat_public_include_path" ]
public = [
"repo/sdk/lib/stdcompat/include/lib/stdcompat/optional.h",
"repo/sdk/lib/stdcompat/include/lib/stdcompat/type_traits.h",
"repo/sdk/lib/stdcompat/include/lib/stdcompat/utility.h",
"repo/sdk/lib/stdcompat/include/lib/stdcompat/version.h",
]
sources = [
"repo/sdk/lib/stdcompat/include/lib/stdcompat/internal/constructors.h",
"repo/sdk/lib/stdcompat/include/lib/stdcompat/internal/exception.h",
"repo/sdk/lib/stdcompat/include/lib/stdcompat/internal/storage.h",
"repo/sdk/lib/stdcompat/include/lib/stdcompat/internal/type_traits.h",
"repo/sdk/lib/stdcompat/include/lib/stdcompat/internal/utility.h",
]
}
pw_python_script("generate_fuchsia_patch") {
sources = [ "generate_fuchsia_patch.py" ]
}