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