• 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    "internal/sequence_lock.h"
180  COPTS
181    ${ABSL_DEFAULT_COPTS}
182  LINKOPTS
183    ${ABSL_DEFAULT_LINKOPTS}
184  DEPS
185    absl::base
186    absl::config
187    absl::flags_commandlineflag
188    absl::flags_commandlineflag_internal
189    absl::flags_config
190    absl::flags_marshalling
191    absl::synchronization
192    absl::meta
193    absl::utility
194  PUBLIC
195)
196
197absl_cc_library(
198  NAME
199    flags
200  SRCS
201    "flag.cc"
202  HDRS
203    "declare.h"
204    "flag.h"
205  COPTS
206    ${ABSL_DEFAULT_COPTS}
207  LINKOPTS
208    ${ABSL_DEFAULT_LINKOPTS}
209  DEPS
210    absl::config
211    absl::flags_commandlineflag
212    absl::flags_config
213    absl::flags_internal
214    absl::flags_reflection
215    absl::base
216    absl::core_headers
217    absl::strings
218)
219
220# Internal-only target, do not depend on directly.
221absl_cc_library(
222  NAME
223    flags_usage_internal
224  SRCS
225    "internal/usage.cc"
226  HDRS
227    "internal/usage.h"
228  COPTS
229    ${ABSL_DEFAULT_COPTS}
230  LINKOPTS
231    ${ABSL_DEFAULT_LINKOPTS}
232  DEPS
233    absl::config
234    absl::flags_config
235    absl::flags
236    absl::flags_commandlineflag
237    absl::flags_internal
238    absl::flags_path_util
239    absl::flags_private_handle_accessor
240    absl::flags_program_name
241    absl::flags_reflection
242    absl::flat_hash_map
243    absl::strings
244    absl::synchronization
245)
246
247absl_cc_library(
248  NAME
249    flags_usage
250  SRCS
251    "usage.cc"
252  HDRS
253    "usage.h"
254  COPTS
255    ${ABSL_DEFAULT_COPTS}
256  LINKOPTS
257    ${ABSL_DEFAULT_LINKOPTS}
258  DEPS
259    absl::config
260    absl::core_headers
261    absl::flags_usage_internal
262    absl::strings
263    absl::synchronization
264)
265
266absl_cc_library(
267  NAME
268    flags_parse
269  SRCS
270    "parse.cc"
271  HDRS
272    "internal/parse.h"
273    "parse.h"
274  COPTS
275    ${ABSL_DEFAULT_COPTS}
276  LINKOPTS
277    ${ABSL_DEFAULT_LINKOPTS}
278  DEPS
279    absl::config
280    absl::core_headers
281    absl::flags_config
282    absl::flags
283    absl::flags_commandlineflag
284    absl::flags_commandlineflag_internal
285    absl::flags_internal
286    absl::flags_private_handle_accessor
287    absl::flags_program_name
288    absl::flags_reflection
289    absl::flags_usage
290    absl::strings
291    absl::synchronization
292)
293
294############################################################################
295# Unit tests in alpahabetical order.
296
297absl_cc_test(
298  NAME
299    flags_commandlineflag_test
300  SRCS
301    "commandlineflag_test.cc"
302  COPTS
303    ${ABSL_TEST_COPTS}
304  DEPS
305    absl::flags
306    absl::flags_commandlineflag
307    absl::flags_commandlineflag_internal
308    absl::flags_config
309    absl::flags_private_handle_accessor
310    absl::flags_reflection
311    absl::memory
312    absl::strings
313    GTest::gtest_main
314)
315
316absl_cc_test(
317  NAME
318    flags_config_test
319  SRCS
320    "config_test.cc"
321  COPTS
322    ${ABSL_TEST_COPTS}
323  DEPS
324    absl::flags_config
325    GTest::gtest_main
326)
327
328absl_cc_test(
329  NAME
330    flags_flag_test
331  SRCS
332    "flag_test.cc"
333    "flag_test_defs.cc"
334  COPTS
335    ${ABSL_TEST_COPTS}
336  DEPS
337    absl::core_headers
338    absl::flags
339    absl::flags_config
340    absl::flags_internal
341    absl::flags_marshalling
342    absl::flags_reflection
343    absl::strings
344    absl::time
345    GTest::gtest_main
346)
347
348absl_cc_test(
349  NAME
350    flags_marshalling_test
351  SRCS
352    "marshalling_test.cc"
353  COPTS
354    ${ABSL_TEST_COPTS}
355  DEPS
356    absl::flags_marshalling
357    GTest::gtest_main
358)
359
360absl_cc_test(
361  NAME
362    flags_parse_test
363  SRCS
364    "parse_test.cc"
365  COPTS
366    ${ABSL_TEST_COPTS}
367  DEPS
368    absl::flags
369    absl::flags_parse
370    absl::flags_reflection
371    absl::flags_usage_internal
372    absl::raw_logging_internal
373    absl::scoped_set_env
374    absl::span
375    absl::strings
376    GTest::gmock_main
377)
378
379absl_cc_test(
380  NAME
381    flags_path_util_test
382  SRCS
383    "internal/path_util_test.cc"
384  COPTS
385    ${ABSL_TEST_COPTS}
386  DEPS
387    absl::flags_path_util
388    GTest::gtest_main
389)
390
391absl_cc_test(
392  NAME
393    flags_program_name_test
394  SRCS
395    "internal/program_name_test.cc"
396  COPTS
397    ${ABSL_TEST_COPTS}
398  DEPS
399    absl::flags_program_name
400    absl::strings
401    GTest::gtest_main
402)
403
404absl_cc_test(
405  NAME
406    flags_reflection_test
407  SRCS
408    "reflection_test.cc"
409  COPTS
410    ${ABSL_TEST_COPTS}
411  DEPS
412    absl::flags_commandlineflag_internal
413    absl::flags
414    absl::flags_reflection
415    absl::flags_usage
416    absl::memory
417    absl::strings
418    GTest::gmock_main
419)
420
421absl_cc_test(
422  NAME
423    flags_sequence_lock_test
424  SRCS
425    "internal/sequence_lock_test.cc"
426  COPTS
427    ${ABSL_TEST_COPTS}
428  DEPS
429    absl::base
430    absl::flags_internal
431    absl::time
432    GTest::gmock_main
433)
434
435absl_cc_test(
436  NAME
437    flags_usage_config_test
438  SRCS
439    "usage_config_test.cc"
440  COPTS
441    ${ABSL_TEST_COPTS}
442  DEPS
443    absl::flags_config
444    absl::flags_path_util
445    absl::flags_program_name
446    absl::strings
447    GTest::gtest_main
448)
449
450absl_cc_test(
451  NAME
452    flags_usage_test
453  SRCS
454    "internal/usage_test.cc"
455  COPTS
456    ${ABSL_TEST_COPTS}
457  DEPS
458    absl::flags_config
459    absl::flags
460    absl::flags_path_util
461    absl::flags_program_name
462    absl::flags_parse
463    absl::flags_reflection
464    absl::flags_usage
465    absl::strings
466    GTest::gtest
467)
468