1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
{
'target_defaults': {
'default_configuration': 'Release',
'conditions': [
['OS=="mac"', {
'xcode_settings': {
'CLANG_CXX_LIBRARY': 'libc++',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'GCC_ENABLE_CPP_RTTI': 'YES',
'OTHER_CPLUSPLUSFLAGS': [
'-std=c++14',
'-Werror',
'-Wall',
'-Wextra',
'-Wshadow',
'-Wno-variadic-macros',
'-frtti',
'-fexceptions',
'${CFLAGS}',
],
'GCC_WARN_PEDANTIC': 'YES',
'GCC_WARN_UNINITIALIZED_AUTOS': 'YES_AGGRESSIVE',
'MACOSX_DEPLOYMENT_TARGET': '10.10',
},
}, {
'cflags_cc': [
'-std=c++14',
'-Werror',
'-Wall',
'-Wextra',
'-Wshadow',
'-Wno-variadic-macros',
'-Wno-error=unused-parameter',
'-frtti',
'-fexceptions',
'${CFLAGS}',
],
}],
['OS=="linux"', {
'cflags_cc': [
'-Wno-unknown-pragmas', # We are using '#pragma mark', but it is only available on Darwin.
],
'conditions': [
['cxx_host != "clang"', {
'cflags_cc': [
'-fabi-version=0',
],
}],
]
}],
],
'target_conditions': [
['_type == "static_library"', {
'conditions': [
['OS=="mac"', {
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [ '-fPIC' ],
'SKIP_INSTALL': 'YES',
},
}, {
'cflags_cc': [ '-fPIC' ],
}],
['host == "ios"', {
'xcode_settings': {
'SDKROOT': 'iphoneos',
'SUPPORTED_PLATFORMS': 'iphonesimulator iphoneos',
'IPHONEOS_DEPLOYMENT_TARGET': '7.0',
'TARGETED_DEVICE_FAMILY': '1,2',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'CODE_SIGN_IDENTITY': 'iPhone Developer',
},
'configurations': {
'Release': {
'xcode_settings': {
'ARCHS': [ "armv7", "armv7s", "arm64", "i386", "x86_64" ],
},
},
},
}],
],
}],
],
'configurations': {
'Debug': {
'conditions': [
['OS=="mac"', {
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': '0',
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES',
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
'DEAD_CODE_STRIPPING': 'NO',
'OTHER_CPLUSPLUSFLAGS': [ '-fno-omit-frame-pointer','-fwrapv', '-fstack-protector-all', '-fno-common' ],
'conditions': [
['coverage', {
'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES',
'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES',
'OTHER_CPLUSPLUSFLAGS': [ '--coverage' ],
}],
],
},
}, {
'cflags_cc': [ '-g', '-O0', '-fno-omit-frame-pointer','-fwrapv', '-fstack-protector-all', '-fno-common' ],
'conditions': [
['coverage', { 'cflags_cc': [ '--coverage' ] }],
],
}],
],
'defines': [ 'DEBUG' ],
'target_conditions': [
['_type == "executable"', {
'conditions': [
['OS=="mac" and coverage', {
'xcode_settings': { 'OTHER_LDFLAGS': [ '--coverage' ] },
}, {
'ldflags': [ '--coverage' ],
}],
],
}],
],
},
'Release': {
'defines': [ 'NDEBUG' ],
'conditions': [
['OS=="mac"', {
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': '3',
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES',
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
'DEAD_CODE_STRIPPING': 'NO',
},
}, {
'cflags_cc': [ '-g', '-O3' ],
}],
],
},
},
}
}
|