• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright 2019 The Abseil Authors.
3#
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#
8#      https://www.apache.org/licenses/LICENSE-2.0
9#
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
17# Internal-only target, do not depend on directly.
18absl_cc_library(
19  NAME
20    flags_path_util
21  HDRS
22    "internal/path_util.h"
23  COPTS
24    ${ABSL_DEFAULT_COPTS}
25  LINKOPTS
26    ${ABSL_DEFAULT_LINKOPTS}
27  DEPS
28    absl::config
29    absl::strings
30  PUBLIC
31)
32
33# Internal-only target, do not depend on directly.
34absl_cc_library(
35  NAME
36    flags_program_name
37  SRCS
38    "internal/program_name.cc"
39  HDRS
40    "internal/program_name.h"
41  COPTS
42    ${ABSL_DEFAULT_COPTS}
43  LINKOPTS
44    ${ABSL_DEFAULT_LINKOPTS}
45  DEPS
46    absl::config
47    absl::core_headers
48    absl::flags_path_util
49    absl::strings
50    absl::synchronization
51  PUBLIC
52)
53
54absl_cc_library(
55  NAME
56    flags_config
57  SRCS
58    "usage_config.cc"
59  HDRS
60    "config.h"
61    "usage_config.h"
62  COPTS
63    ${ABSL_DEFAULT_COPTS}
64  LINKOPTS
65    ${ABSL_DEFAULT_LINKOPTS}
66  DEPS
67    absl::config
68    absl::flags_path_util
69    absl::flags_program_name
70    absl::core_headers
71    absl::strings
72    absl::synchronization
73)
74
75absl_cc_library(
76  NAME
77    flags_marshalling
78  SRCS
79    "marshalling.cc"
80  HDRS
81    "marshalling.h"
82  COPTS
83    ${ABSL_DEFAULT_COPTS}
84  LINKOPTS
85    ${ABSL_DEFAULT_LINKOPTS}
86  DEPS
87    absl::config
88    absl::core_headers
89    absl::log_severity
90    absl::strings
91    absl::str_format
92)
93
94# Internal-only target, do not depend on directly.
95absl_cc_library(
96  NAME
97    flags_commandlineflag_internal
98  SRCS
99    "internal/commandlineflag.cc"
100  HDRS
101    "internal/commandlineflag.h"
102  COPTS
103    ${ABSL_DEFAULT_COPTS}
104  LINKOPTS
105    ${ABSL_DEFAULT_LINKOPTS}
106  DEPS
107    absl::config
108    absl::fast_type_id
109)
110
111absl_cc_library(
112  NAME
113    flags_commandlineflag
114  SRCS
115    "commandlineflag.cc"
116  HDRS
117    "commandlineflag.h"
118  COPTS
119    ${ABSL_DEFAULT_COPTS}
120  LINKOPTS
121    ${ABSL_DEFAULT_LINKOPTS}
122  DEPS
123    absl::config
124    absl::fast_type_id
125    absl::flags_commandlineflag_internal
126    absl::optional
127    absl::strings
128)
129
130# Internal-only target, do not depend on directly.
131absl_cc_library(
132  NAME
133    flags_private_handle_accessor
134  SRCS
135    "internal/private_handle_accessor.cc"
136  HDRS
137    "internal/private_handle_accessor.h"
138  COPTS
139    ${ABSL_DEFAULT_COPTS}
140  LINKOPTS
141    ${ABSL_DEFAULT_LINKOPTS}
142  DEPS
143    absl::config
144    absl::flags_commandlineflag
145    absl::flags_commandlineflag_internal
146    absl::strings
147)
148
149absl_cc_library(
150  NAME
151    flags_reflection
152  SRCS
153    "reflection.cc"
154  HDRS
155    "reflection.h"
156    "internal/registry.h"
157  COPTS
158    ${ABSL_DEFAULT_COPTS}
159  LINKOPTS
160    ${ABSL_DEFAULT_LINKOPTS}
161  DEPS
162    absl::config
163    absl::flags_commandlineflag
164    absl::flags_private_handle_accessor
165    absl::flags_config
166    absl::strings
167    absl::synchronization
168    absl::flat_hash_map
169)
170
171# Internal-only target, do not depend on directly.
172absl_cc_library(
173  NAME
174    flags_internal
175  SRCS
176    "internal/flag.cc"
177  HDRS
178    "internal/flag.h"
179  COPTS
180    ${ABSL_DEFAULT_COPTS}
181  LINKOPTS
182    ${ABSL_DEFAULT_LINKOPTS}
183  DEPS
184    absl::base
185    absl::config
186    absl::flags_commandlineflag
187    absl::flags_commandlineflag_internal
188    absl::flags_config
189    absl::flags_marshalling
190    absl::synchronization
191    absl::meta
192    absl::utility
193  PUBLIC
194)
195
196absl_cc_library(
197  NAME
198    flags
199  SRCS
200    "flag.cc"
201  HDRS
202    "declare.h"
203    "flag.h"
204  COPTS
205    ${ABSL_DEFAULT_COPTS}
206  LINKOPTS
207    ${ABSL_DEFAULT_LINKOPTS}
208  DEPS
209    absl::config
210    absl::flags_commandlineflag
211    absl::flags_config
212    absl::flags_internal
213    absl::flags_reflection
214    absl::base
215    absl::core_headers
216    absl::strings
217)
218
219# Internal-only target, do not depend on directly.
220absl_cc_library(
221  NAME
222    flags_usage_internal
223  SRCS
224    "internal/usage.cc"
225  HDRS
226    "internal/usage.h"
227  COPTS
228    ${ABSL_DEFAULT_COPTS}
229  LINKOPTS
230    ${ABSL_DEFAULT_LINKOPTS}
231  DEPS
232    absl::config
233    absl::flags_config
234    absl::flags
235    absl::flags_commandlineflag
236    absl::flags_internal
237    absl::flags_path_util
238    absl::flags_private_handle_accessor
239    absl::flags_program_name
240    absl::flags_reflection
241    absl::strings
242    absl::synchronization
243)
244
245absl_cc_library(
246  NAME
247    flags_usage
248  SRCS
249    "usage.cc"
250  HDRS
251    "usage.h"
252  COPTS
253    ${ABSL_DEFAULT_COPTS}
254  LINKOPTS
255    ${ABSL_DEFAULT_LINKOPTS}
256  DEPS
257    absl::config
258    absl::core_headers
259    absl::flags_usage_internal
260    absl::strings
261    absl::synchronization
262)
263
264absl_cc_library(
265  NAME
266    flags_parse
267  SRCS
268    "parse.cc"
269  HDRS
270    "internal/parse.h"
271    "parse.h"
272  COPTS
273    ${ABSL_DEFAULT_COPTS}
274  LINKOPTS
275    ${ABSL_DEFAULT_LINKOPTS}
276  DEPS
277    absl::config
278    absl::core_headers
279    absl::flags_config
280    absl::flags
281    absl::flags_commandlineflag
282    absl::flags_commandlineflag_internal
283    absl::flags_internal
284    absl::flags_private_handle_accessor
285    absl::flags_program_name
286    absl::flags_reflection
287    absl::flags_usage
288    absl::strings
289    absl::synchronization
290)
291
292############################################################################
293# Unit tests in alpahabetical order.
294
295absl_cc_test(
296  NAME
297    flags_commandlineflag_test
298  SRCS
299    "commandlineflag_test.cc"
300  COPTS
301    ${ABSL_TEST_COPTS}
302  DEPS
303    absl::flags
304    absl::flags_commandlineflag
305    absl::flags_commandlineflag_internal
306    absl::flags_config
307    absl::flags_private_handle_accessor
308    absl::flags_reflection
309    absl::memory
310    absl::strings
311    gtest_main
312)
313
314absl_cc_test(
315  NAME
316    flags_config_test
317  SRCS
318    "config_test.cc"
319  COPTS
320    ${ABSL_TEST_COPTS}
321  DEPS
322    absl::flags_config
323    gtest_main
324)
325
326absl_cc_test(
327  NAME
328    flags_flag_test
329  SRCS
330    "flag_test.cc"
331    "flag_test_defs.cc"
332  COPTS
333    ${ABSL_TEST_COPTS}
334  DEPS
335    absl::core_headers
336    absl::flags
337    absl::flags_config
338    absl::flags_internal
339    absl::flags_marshalling
340    absl::flags_reflection
341    absl::strings
342    absl::time
343    gtest_main
344)
345
346absl_cc_test(
347  NAME
348    flags_marshalling_test
349  SRCS
350    "marshalling_test.cc"
351  COPTS
352    ${ABSL_TEST_COPTS}
353  DEPS
354    absl::flags_marshalling
355    gtest_main
356)
357
358absl_cc_test(
359  NAME
360    flags_parse_test
361  SRCS
362    "parse_test.cc"
363  COPTS
364    ${ABSL_TEST_COPTS}
365  DEPS
366    absl::flags
367    absl::flags_parse
368    absl::flags_reflection
369    absl::flags_usage_internal
370    absl::raw_logging_internal
371    absl::scoped_set_env
372    absl::span
373    absl::strings
374    gmock_main
375)
376
377absl_cc_test(
378  NAME
379    flags_path_util_test
380  SRCS
381    "internal/path_util_test.cc"
382  COPTS
383    ${ABSL_TEST_COPTS}
384  DEPS
385    absl::flags_path_util
386    gtest_main
387)
388
389absl_cc_test(
390  NAME
391    flags_program_name_test
392  SRCS
393    "internal/program_name_test.cc"
394  COPTS
395    ${ABSL_TEST_COPTS}
396  DEPS
397    absl::flags_program_name
398    absl::strings
399    gtest_main
400)
401
402absl_cc_test(
403  NAME
404    flags_reflection_test
405  SRCS
406    "reflection_test.cc"
407  COPTS
408    ${ABSL_TEST_COPTS}
409  DEPS
410    absl::flags_commandlineflag_internal
411    absl::flags
412    absl::flags_reflection
413    absl::flags_usage
414    absl::memory
415    absl::strings
416    gmock_main
417)
418
419absl_cc_test(
420  NAME
421    flags_usage_config_test
422  SRCS
423    "usage_config_test.cc"
424  COPTS
425    ${ABSL_TEST_COPTS}
426  DEPS
427    absl::flags_config
428    absl::flags_path_util
429    absl::flags_program_name
430    absl::strings
431    gtest_main
432)
433
434absl_cc_test(
435  NAME
436    flags_usage_test
437  SRCS
438    "internal/usage_test.cc"
439  COPTS
440    ${ABSL_TEST_COPTS}
441  DEPS
442    absl::flags_config
443    absl::flags
444    absl::flags_path_util
445    absl::flags_program_name
446    absl::flags_parse
447    absl::flags_reflection
448    absl::flags_usage
449    absl::strings
450    gtest
451)
452