summaryrefslogtreecommitdiff
path: root/absl/base/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Derek Mauro <dmauro@google.com>2023-11-08 09:57:56 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2023-11-08 09:59:07 -0800
commit8c488c44d893e23b043fa081a4e213a3b9441433 (patch)
tree8592e6d589b11806eee424be8db34b1707a59734 /absl/base/CMakeLists.txt
parent2f77684e8dc473a48dbc19167ffe69c40ce8ada4 (diff)
Add absl::NoDestructor<T>
absl::NoDestructor<T> wraps an existing type and is used for defining a static type that does not need to be destructed upon program exit. Instead, such an object survives during program exit, and can be safely accessed at any time after construction. PiperOrigin-RevId: 580566259 Change-Id: I2cbb4cd9f6b50b98a793acd2ef0a4befd541f17f
Diffstat (limited to 'absl/base/CMakeLists.txt')
-rw-r--r--absl/base/CMakeLists.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/absl/base/CMakeLists.txt b/absl/base/CMakeLists.txt
index 3f4a1c42..9ca5cf8b 100644
--- a/absl/base/CMakeLists.txt
+++ b/absl/base/CMakeLists.txt
@@ -57,6 +57,17 @@ absl_cc_library(
absl_cc_library(
NAME
+ no_destructor
+ HDRS
+ "no_destructor.h"
+ DEPS
+ absl::config
+ COPTS
+ ${ABSL_DEFAULT_COPTS}
+)
+
+absl_cc_library(
+ NAME
nullability
HDRS
"nullability.h"
@@ -510,6 +521,20 @@ absl_cc_test(
absl_cc_test(
NAME
+ no_destructor_test
+ SRCS
+ "no_destructor_test.cc"
+ COPTS
+ ${ABSL_TEST_COPTS}
+ DEPS
+ absl::no_destructor
+ absl::config
+ absl::raw_logging_internal
+ GTest::gtest_main
+)
+
+absl_cc_test(
+ NAME
raw_logging_test
SRCS
"raw_logging_test.cc"