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