about summary refs log tree commit diff
path: root/absl/flags/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'absl/flags/CMakeLists.txt')
-rw-r--r--absl/flags/CMakeLists.txt60
1 files changed, 47 insertions, 13 deletions
diff --git a/absl/flags/CMakeLists.txt b/absl/flags/CMakeLists.txt
index 3eac8f0a1972..3a7162f9347b 100644
--- a/absl/flags/CMakeLists.txt
+++ b/absl/flags/CMakeLists.txt
@@ -19,20 +19,54 @@ absl_cc_library(
   NAME
     flags_internal
   SRCS
+    "internal/flag.cc"
+  HDRS
+    "internal/flag.h"
+  COPTS
+    ${ABSL_DEFAULT_COPTS}
+  LINKOPTS
+    ${ABSL_DEFAULT_LINKOPTS}
+  DEPS
+    absl::flags_handle
+    absl::flags_registry
+    absl::synchronization
+  PUBLIC
+)
+
+# Internal-only target, do not depend on directly.
+absl_cc_library(
+  NAME
+    flags_program_name
+  SRCS
     "internal/program_name.cc"
   HDRS
-    "internal/path_util.h"
     "internal/program_name.h"
   COPTS
     ${ABSL_DEFAULT_COPTS}
   LINKOPTS
     ${ABSL_DEFAULT_LINKOPTS}
   DEPS
+    absl::flags_path_util
     absl::strings
     absl::synchronization
   PUBLIC
 )
 
+# Internal-only target, do not depend on directly.
+absl_cc_library(
+  NAME
+    flags_path_util
+  HDRS
+    "internal/path_util.h"
+  COPTS
+    ${ABSL_DEFAULT_COPTS}
+  LINKOPTS
+    ${ABSL_DEFAULT_LINKOPTS}
+  DEPS
+    absl::strings
+  PUBLIC
+)
+
 absl_cc_library(
   NAME
     flags_config
@@ -46,7 +80,8 @@ absl_cc_library(
   LINKOPTS
     ${ABSL_DEFAULT_LINKOPTS}
   DEPS
-    absl::flags_internal
+    absl::flags_path_util
+    absl::flags_program_name
     absl::core_headers
     absl::strings
     absl::synchronization
@@ -120,11 +155,9 @@ absl_cc_library(
     flags
   SRCS
     "flag.cc"
-    "internal/flag.cc"
   HDRS
     "declare.h"
     "flag.h"
-    "internal/flag.h"
   COPTS
     ${ABSL_DEFAULT_COPTS}
   LINKOPTS
@@ -132,12 +165,11 @@ absl_cc_library(
   DEPS
     absl::flags_config
     absl::flags_handle
+    absl::flags_internal
     absl::flags_marshalling
-    absl::flags_registry
     absl::base
     absl::core_headers
     absl::strings
-    absl::synchronization
 )
 
 # Internal-only target, do not depend on directly.
@@ -156,7 +188,8 @@ absl_cc_library(
     absl::flags_config
     absl::flags
     absl::flags_handle
-    absl::flags_internal
+    absl::flags_path_util
+    absl::flags_program_name
     absl::strings
     absl::synchronization
 )
@@ -193,8 +226,7 @@ absl_cc_library(
   DEPS
     absl::flags_config
     absl::flags
-    absl::flags_handle
-    absl::flags_internal
+    absl::flags_program_name
     absl::flags_registry
     absl::flags_usage
     absl::strings
@@ -285,7 +317,7 @@ absl_cc_test(
   COPTS
     ${ABSL_TEST_COPTS}
   DEPS
-    absl::flags_internal
+    absl::flags_path_util
     gtest_main
 )
 
@@ -297,7 +329,7 @@ absl_cc_test(
   COPTS
     ${ABSL_TEST_COPTS}
   DEPS
-    absl::flags_internal
+    absl::flags_program_name
     absl::strings
     gtest_main
 )
@@ -326,7 +358,8 @@ absl_cc_test(
     ${ABSL_TEST_COPTS}
   DEPS
     absl::flags_config
-    absl::flags_internal
+    absl::flags_path_util
+    absl::flags_program_name
     absl::strings
     gtest_main
 )
@@ -341,7 +374,8 @@ absl_cc_test(
   DEPS
     absl::flags_config
     absl::flags
-    absl::flags_internal
+    absl::flags_path_util
+    absl::flags_program_name
     absl::flags_parse
     absl::flags_usage
     absl::memory