1# Copyright 2019 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 15load("//pw_unit_test:pw_cc_test.bzl", "pw_cc_test") 16 17package(default_visibility = ["//visibility:public"]) 18 19licenses(["notice"]) 20 21cc_library( 22 name = "pw_preprocessor", 23 hdrs = [ 24 "public/pw_preprocessor/apply.h", 25 "public/pw_preprocessor/arguments.h", 26 "public/pw_preprocessor/boolean.h", 27 "public/pw_preprocessor/compiler.h", 28 "public/pw_preprocessor/concat.h", 29 "public/pw_preprocessor/internal/apply_macros.h", 30 "public/pw_preprocessor/internal/arg_count_impl.h", 31 "public/pw_preprocessor/util.h", 32 ], 33 strip_include_prefix = "public", 34 deps = ["//pw_polyfill"], 35) 36 37cc_library( 38 name = "cortex_m", 39 hdrs = [ 40 "public/pw_preprocessor/arch.h", 41 ], 42 strip_include_prefix = "public", 43 deps = [":config_override"], 44) 45 46label_flag( 47 name = "config_override", 48 build_setting_default = "//pw_build:default_module_config", 49) 50 51TESTS = [ 52 "arguments_test", 53 "boolean_test", 54 "compiler_test", 55 "concat_test", 56 "util_test", 57] 58 59[ 60 pw_cc_test( 61 name = t, 62 srcs = [t + ".cc"], 63 deps = [ 64 ":pw_preprocessor", 65 "//pw_unit_test", 66 ], 67 ) 68 for t in TESTS 69] 70 71filegroup( 72 name = "doxygen", 73 srcs = [ 74 "public/pw_preprocessor/apply.h", 75 "public/pw_preprocessor/compiler.h", 76 ], 77) 78