blob: 4573f17d26ef52e59d9c2a4318a40154e85754c7 [file] [log] [blame]
mistergc2e75482017-09-19 16:54:40 -04001#
Abseil Team1948f6f2019-08-30 15:03:24 -04002# Copyright 2019 The Abseil Authors.
mistergc2e75482017-09-19 16:54:40 -04003#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
nik727338b70432019-03-08 10:27:53 -05008# https://www.apache.org/licenses/LICENSE-2.0
mistergc2e75482017-09-19 16:54:40 -04009#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17load(
Abseil Team284378a2018-12-05 12:37:41 -080018 "//absl:copts/configure_copts.bzl",
mistergc2e75482017-09-19 16:54:40 -040019 "ABSL_DEFAULT_COPTS",
Abseil Team5b65c4a2019-03-27 08:05:41 -070020 "ABSL_DEFAULT_LINKOPTS",
Yannic36910d32019-08-16 14:38:13 +000021 "ABSL_TEST_COPTS",
mistergc2e75482017-09-19 16:54:40 -040022)
mistergc2e75482017-09-19 16:54:40 -040023
Derek Mauro143e9832023-10-10 13:29:16 -070024package(
25 default_visibility = ["//visibility:public"],
26 features = [
Derek Mauro0ef3ef42023-10-11 07:57:33 -070027 "header_modules",
Derek Mauro143e9832023-10-10 13:29:16 -070028 "layering_check",
29 "parse_headers",
30 ],
31)
mistergc2e75482017-09-19 16:54:40 -040032
Abseil Teamfbf0fda2020-08-20 08:54:55 -070033licenses(["notice"])
mistergc2e75482017-09-19 16:54:40 -040034
35cc_library(
36 name = "memory",
37 hdrs = ["memory.h"],
38 copts = ABSL_DEFAULT_COPTS,
Abseil Team4dcae402022-03-31 09:48:42 -070039 defines = select({
40 "//conditions:default": [],
41 }),
Abseil Team5b65c4a2019-03-27 08:05:41 -070042 linkopts = ABSL_DEFAULT_LINKOPTS,
Abseil Team9850abf2017-11-08 09:43:13 -080043 deps = [
44 "//absl/base:core_headers",
45 "//absl/meta:type_traits",
46 ],
mistergc2e75482017-09-19 16:54:40 -040047)
48
49cc_test(
50 name = "memory_test",
51 srcs = ["memory_test.cc"],
52 copts = ABSL_TEST_COPTS,
Abseil Team5b65c4a2019-03-27 08:05:41 -070053 linkopts = ABSL_DEFAULT_LINKOPTS,
mistergc2e75482017-09-19 16:54:40 -040054 deps = [
55 ":memory",
mistergc2e75482017-09-19 16:54:40 -040056 "//absl/base:core_headers",
Derek Mauro143e9832023-10-10 13:29:16 -070057 "@com_google_googletest//:gtest",
Abseil Team2a62fbd2017-09-25 15:35:12 -070058 "@com_google_googletest//:gtest_main",
59 ],
mistergc2e75482017-09-19 16:54:40 -040060)