• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15load(
16    "//absl:copts/configure_copts.bzl",
17    "ABSL_DEFAULT_COPTS",
18    "ABSL_DEFAULT_LINKOPTS",
19    "ABSL_TEST_COPTS",
20)
21
22package(default_visibility = ["//visibility:public"])
23
24licenses(["notice"])
25
26cc_library(
27    name = "cleanup_internal",
28    hdrs = ["internal/cleanup.h"],
29    copts = ABSL_DEFAULT_COPTS,
30    linkopts = ABSL_DEFAULT_LINKOPTS,
31    deps = [
32        "//absl/base:base_internal",
33        "//absl/base:core_headers",
34        "//absl/utility",
35    ],
36)
37
38cc_library(
39    name = "cleanup",
40    hdrs = [
41        "cleanup.h",
42    ],
43    copts = ABSL_DEFAULT_COPTS,
44    linkopts = ABSL_DEFAULT_LINKOPTS,
45    deps = [
46        ":cleanup_internal",
47        "//absl/base:config",
48        "//absl/base:core_headers",
49    ],
50)
51
52cc_test(
53    name = "cleanup_test",
54    size = "small",
55    srcs = [
56        "cleanup_test.cc",
57    ],
58    copts = ABSL_TEST_COPTS,
59    deps = [
60        ":cleanup",
61        "//absl/base:config",
62        "//absl/utility",
63        "@com_google_googletest//:gtest_main",
64    ],
65)
66