From 1adf896ec842bd9788a1bbede94a33e1402b8ecb Mon Sep 17 00:00:00 2001 From: Derek Mauro Date: Tue, 11 Jul 2023 13:36:35 -0700 Subject: Add a smaller library for string_view so that users can depend on string_view without depending on all of //absl/strings:strings New code that uses string_view.h should depend on //absl/strings:string_view (Bazel) or absl::string_view (CMake) instead. PiperOrigin-RevId: 547283268 Change-Id: I6006b19605ce377d12c462129dda14251d16e1c1 --- absl/strings/CMakeLists.txt | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'absl/strings/CMakeLists.txt') diff --git a/absl/strings/CMakeLists.txt b/absl/strings/CMakeLists.txt index 878ff4f1..1959dc91 100644 --- a/absl/strings/CMakeLists.txt +++ b/absl/strings/CMakeLists.txt @@ -14,6 +14,23 @@ # limitations under the License. # +absl_cc_library( + NAME + string_view + HDRS + string_view.h + SRCS + string_view.cc + COPTS + ${ABSL_DEFAULT_COPTS} + DEPS + absl::base + absl::config + absl::core_headers + absl::throw_delegate + PUBLIC +) + absl_cc_library( NAME strings @@ -30,7 +47,6 @@ absl_cc_library( "str_join.h" "str_replace.h" "str_split.h" - "string_view.h" "strip.h" "substitute.h" SRCS @@ -54,11 +70,11 @@ absl_cc_library( "str_cat.cc" "str_replace.cc" "str_split.cc" - "string_view.cc" "substitute.cc" COPTS ${ABSL_DEFAULT_COPTS} DEPS + absl::string_view absl::strings_internal absl::base absl::bits -- cgit v1.2.3