BUILD.bazel (1691B)
1 # Copyright 2021 The Abseil Authors. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of 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, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 load( 16 "//absl:copts/configure_copts.bzl", 17 "ABSL_DEFAULT_COPTS", 18 "ABSL_DEFAULT_LINKOPTS", 19 "ABSL_TEST_COPTS", 20 ) 21 22 package( 23 default_visibility = ["//visibility:public"], 24 features = [ 25 "header_modules", 26 "layering_check", 27 "parse_headers", 28 ], 29 ) 30 31 licenses(["notice"]) 32 33 cc_library( 34 name = "cleanup_internal", 35 hdrs = ["internal/cleanup.h"], 36 copts = ABSL_DEFAULT_COPTS, 37 linkopts = ABSL_DEFAULT_LINKOPTS, 38 deps = [ 39 "//absl/base:core_headers", 40 "//absl/utility", 41 ], 42 ) 43 44 cc_library( 45 name = "cleanup", 46 hdrs = [ 47 "cleanup.h", 48 ], 49 copts = ABSL_DEFAULT_COPTS, 50 linkopts = ABSL_DEFAULT_LINKOPTS, 51 deps = [ 52 ":cleanup_internal", 53 "//absl/base:config", 54 "//absl/base:core_headers", 55 ], 56 ) 57 58 cc_test( 59 name = "cleanup_test", 60 size = "small", 61 srcs = [ 62 "cleanup_test.cc", 63 ], 64 copts = ABSL_TEST_COPTS, 65 deps = [ 66 ":cleanup", 67 "//absl/base:config", 68 "//absl/utility", 69 "@googletest//:gtest", 70 "@googletest//:gtest_main", 71 ], 72 )