blob: 2b840417d5b3a7facf7cd096756286cbeb3130ad [file] [log] [blame]
Brian Silvermanfbe79b82015-09-12 15:10:54 -04001licenses(['notice'])
2
3common_copts = [
4 '-Ithird_party/gflags/include/gflags',
5 '-Ithird_party/empty_config_h',
6
7 '-DHAVE_STDINT_H=',
8 '-DHAVE_SYS_TYPES_H=',
9 '-DHAVE_INTTYPES_H=',
10 '-DHAVE_SYS_STAT_H=',
11 '-DHAVE_UNISTD_H=',
12 '-DHAVE_FNMATCH_H=',
13 '-DHAVE_STRTOLL=',
14 '-DHAVE_PTHREAD=',
15 '-DHAVE_RWLOCK=',
16 '-D__STDC_FORMAT_MACROS=1',
17 '-DPATH_SEPARATOR=\"\'/\'\"',
18 '-DGFLAGS_IS_A_DLL=0',
19 '-DGFLAGS_DLL_DECL=',
20 '-DGFLAGS_DLL_DEFINE_FLAG=',
Brian Silvermanf1cff392015-10-11 19:36:18 -040021
22 '-Wno-format-nonliteral',
Austin Schuh23da18b2015-10-11 20:52:49 -070023 '-Wno-unused-local-typedefs',
Brian Silvermanf1cff392015-10-11 19:36:18 -040024 '-Wno-sign-compare',
Austin Schuh23da18b2015-10-11 20:52:49 -070025 '-Wno-missing-field-initializers',
Brian Silvermanfbe79b82015-09-12 15:10:54 -040026]
27
28cc_library(
29 name = 'gflags',
30 visibility = ['//visibility:public'],
31 srcs = glob([
32 'src/*.cc',
33 'src/*.h',
Brian Silvermanb200c172017-01-02 17:35:35 -080034 ], exclude=[
Brian Silvermanfbe79b82015-09-12 15:10:54 -040035 'src/windows_*',
36 ]) + [
37 'include/gflags/gflags_declare.h',
38 'include/gflags/gflags_gflags.h',
39 ],
40 hdrs = [
41 'include/gflags/gflags.h',
42 'include/gflags/gflags_completions.h',
43 ],
Brian Silvermanf1cff392015-10-11 19:36:18 -040044 deps = [
Austin Schuh044e18b2015-10-21 20:17:09 -070045 '//third_party/empty_config_h',
Brian Silvermanf1cff392015-10-11 19:36:18 -040046 ],
Philipp Schraderb3a057e2018-03-10 18:59:40 -080047 linkopts = [
48 '-pthread',
49 ],
Brian Silvermanfbe79b82015-09-12 15:10:54 -040050 copts = common_copts,
51 includes = [ 'include' ],
52)