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::optional 91 absl::strings 92 absl::str_format 93) 94 95# Internal-only target, do not depend on directly. 96absl_cc_library( 97 NAME 98 flags_commandlineflag_internal 99 SRCS 100 "internal/commandlineflag.cc" 101 HDRS 102 "internal/commandlineflag.h" 103 COPTS 104 ${ABSL_DEFAULT_COPTS} 105 LINKOPTS 106 ${ABSL_DEFAULT_LINKOPTS} 107 DEPS 108 absl::config 109 absl::dynamic_annotations 110 absl::fast_type_id 111) 112 113absl_cc_library( 114 NAME 115 flags_commandlineflag 116 SRCS 117 "commandlineflag.cc" 118 HDRS 119 "commandlineflag.h" 120 COPTS 121 ${ABSL_DEFAULT_COPTS} 122 LINKOPTS 123 ${ABSL_DEFAULT_LINKOPTS} 124 DEPS 125 absl::config 126 absl::fast_type_id 127 absl::flags_commandlineflag_internal 128 absl::optional 129 absl::strings 130) 131 132# Internal-only target, do not depend on directly. 133absl_cc_library( 134 NAME 135 flags_private_handle_accessor 136 SRCS 137 "internal/private_handle_accessor.cc" 138 HDRS 139 "internal/private_handle_accessor.h" 140 COPTS 141 ${ABSL_DEFAULT_COPTS} 142 LINKOPTS 143 ${ABSL_DEFAULT_LINKOPTS} 144 DEPS 145 absl::config 146 absl::flags_commandlineflag 147 absl::flags_commandlineflag_internal 148 absl::strings 149) 150 151absl_cc_library( 152 NAME 153 flags_reflection 154 SRCS 155 "reflection.cc" 156 HDRS 157 "reflection.h" 158 "internal/registry.h" 159 COPTS 160 ${ABSL_DEFAULT_COPTS} 161 LINKOPTS 162 ${ABSL_DEFAULT_LINKOPTS} 163 DEPS 164 absl::config 165 absl::flags_commandlineflag 166 absl::flags_private_handle_accessor 167 absl::flags_config 168 absl::strings 169 absl::synchronization 170 absl::flat_hash_map 171) 172 173# Internal-only target, do not depend on directly. 174absl_cc_library( 175 NAME 176 flags_internal 177 SRCS 178 "internal/flag.cc" 179 HDRS 180 "internal/flag.h" 181 "internal/sequence_lock.h" 182 COPTS 183 ${ABSL_DEFAULT_COPTS} 184 LINKOPTS 185 ${ABSL_DEFAULT_LINKOPTS} 186 DEPS 187 absl::base 188 absl::config 189 absl::flags_commandlineflag 190 absl::flags_commandlineflag_internal 191 absl::flags_config 192 absl::flags_marshalling 193 absl::synchronization 194 absl::meta 195 absl::utility 196 PUBLIC 197) 198 199absl_cc_library( 200 NAME 201 flags 202 SRCS 203 "flag.cc" 204 HDRS 205 "declare.h" 206 "flag.h" 207 "internal/flag_msvc.inc" 208 COPTS 209 ${ABSL_DEFAULT_COPTS} 210 LINKOPTS 211 ${ABSL_DEFAULT_LINKOPTS} 212 DEPS 213 absl::config 214 absl::flags_commandlineflag 215 absl::flags_config 216 absl::flags_internal 217 absl::flags_reflection 218 absl::base 219 absl::core_headers 220 absl::strings 221) 222 223# Internal-only target, do not depend on directly. 224absl_cc_library( 225 NAME 226 flags_usage_internal 227 SRCS 228 "internal/usage.cc" 229 HDRS 230 "internal/usage.h" 231 COPTS 232 ${ABSL_DEFAULT_COPTS} 233 LINKOPTS 234 ${ABSL_DEFAULT_LINKOPTS} 235 DEPS 236 absl::config 237 absl::flags_config 238 absl::flags 239 absl::flags_commandlineflag 240 absl::flags_internal 241 absl::flags_path_util 242 absl::flags_private_handle_accessor 243 absl::flags_program_name 244 absl::flags_reflection 245 absl::flat_hash_map 246 absl::strings 247 absl::synchronization 248) 249 250absl_cc_library( 251 NAME 252 flags_usage 253 SRCS 254 "usage.cc" 255 HDRS 256 "usage.h" 257 COPTS 258 ${ABSL_DEFAULT_COPTS} 259 LINKOPTS 260 ${ABSL_DEFAULT_LINKOPTS} 261 DEPS 262 absl::config 263 absl::core_headers 264 absl::flags_usage_internal 265 absl::raw_logging_internal 266 absl::strings 267 absl::synchronization 268) 269 270absl_cc_library( 271 NAME 272 flags_parse 273 SRCS 274 "parse.cc" 275 HDRS 276 "internal/parse.h" 277 "parse.h" 278 COPTS 279 ${ABSL_DEFAULT_COPTS} 280 LINKOPTS 281 ${ABSL_DEFAULT_LINKOPTS} 282 DEPS 283 absl::algorithm_container 284 absl::config 285 absl::core_headers 286 absl::flags_config 287 absl::flags 288 absl::flags_commandlineflag 289 absl::flags_commandlineflag_internal 290 absl::flags_internal 291 absl::flags_private_handle_accessor 292 absl::flags_program_name 293 absl::flags_reflection 294 absl::flags_usage 295 absl::strings 296 absl::synchronization 297) 298 299############################################################################ 300# Unit tests in alpahabetical order. 301 302absl_cc_test( 303 NAME 304 flags_commandlineflag_test 305 SRCS 306 "commandlineflag_test.cc" 307 COPTS 308 ${ABSL_TEST_COPTS} 309 DEPS 310 absl::flags 311 absl::flags_commandlineflag 312 absl::flags_commandlineflag_internal 313 absl::flags_config 314 absl::flags_private_handle_accessor 315 absl::flags_reflection 316 absl::memory 317 absl::strings 318 GTest::gtest_main 319) 320 321absl_cc_test( 322 NAME 323 flags_config_test 324 SRCS 325 "config_test.cc" 326 COPTS 327 ${ABSL_TEST_COPTS} 328 DEPS 329 absl::flags_config 330 GTest::gtest_main 331) 332 333absl_cc_test( 334 NAME 335 flags_flag_test 336 SRCS 337 "flag_test.cc" 338 "flag_test_defs.cc" 339 COPTS 340 ${ABSL_TEST_COPTS} 341 DEPS 342 absl::core_headers 343 absl::flags 344 absl::flags_config 345 absl::flags_internal 346 absl::flags_marshalling 347 absl::flags_reflection 348 absl::strings 349 absl::time 350 GTest::gtest_main 351) 352 353absl_cc_test( 354 NAME 355 flags_marshalling_test 356 SRCS 357 "marshalling_test.cc" 358 COPTS 359 ${ABSL_TEST_COPTS} 360 DEPS 361 absl::flags_marshalling 362 GTest::gtest_main 363) 364 365absl_cc_test( 366 NAME 367 flags_parse_test 368 SRCS 369 "parse_test.cc" 370 COPTS 371 ${ABSL_TEST_COPTS} 372 DEPS 373 absl::flags 374 absl::flags_parse 375 absl::flags_reflection 376 absl::flags_usage_internal 377 absl::raw_logging_internal 378 absl::scoped_set_env 379 absl::span 380 absl::strings 381 GTest::gmock_main 382) 383 384absl_cc_test( 385 NAME 386 flags_path_util_test 387 SRCS 388 "internal/path_util_test.cc" 389 COPTS 390 ${ABSL_TEST_COPTS} 391 DEPS 392 absl::flags_path_util 393 GTest::gtest_main 394) 395 396absl_cc_test( 397 NAME 398 flags_program_name_test 399 SRCS 400 "internal/program_name_test.cc" 401 COPTS 402 ${ABSL_TEST_COPTS} 403 DEPS 404 absl::flags_program_name 405 absl::strings 406 GTest::gtest_main 407) 408 409absl_cc_test( 410 NAME 411 flags_reflection_test 412 SRCS 413 "reflection_test.cc" 414 COPTS 415 ${ABSL_TEST_COPTS} 416 DEPS 417 absl::flags_commandlineflag_internal 418 absl::flags 419 absl::flags_reflection 420 absl::flags_usage 421 absl::memory 422 absl::strings 423 GTest::gmock_main 424) 425 426absl_cc_test( 427 NAME 428 flags_sequence_lock_test 429 SRCS 430 "internal/sequence_lock_test.cc" 431 COPTS 432 ${ABSL_TEST_COPTS} 433 DEPS 434 absl::base 435 absl::flags_internal 436 absl::time 437 GTest::gmock_main 438) 439 440absl_cc_test( 441 NAME 442 flags_usage_config_test 443 SRCS 444 "usage_config_test.cc" 445 COPTS 446 ${ABSL_TEST_COPTS} 447 DEPS 448 absl::flags_config 449 absl::flags_path_util 450 absl::flags_program_name 451 absl::strings 452 GTest::gtest_main 453) 454 455absl_cc_test( 456 NAME 457 flags_usage_test 458 SRCS 459 "internal/usage_test.cc" 460 COPTS 461 ${ABSL_TEST_COPTS} 462 DEPS 463 absl::flags_config 464 absl::flags 465 absl::flags_path_util 466 absl::flags_program_name 467 absl::flags_parse 468 absl::flags_reflection 469 absl::flags_usage 470 absl::strings 471 GTest::gmock 472) 473