'src',
],
},
+ 'variables': {
+ 'clang_warning_flags_unset': [
+ # snappy-stubs-internal.h unapologetically has: using namespace std
+ # https://code.google.com/p/snappy/issues/detail?id=70
+ '-Wheader-hygiene',
+ ],
+ },
'sources': [
'src/snappy-internal.h',
'src/snappy-sinksource.cc',
'src/snappy.h',
],
'conditions': [
- ['clang == 1', {
- # snappy-stubs-internal.h unapologetically has: using namespace std
- # https://code.google.com/p/snappy/issues/detail?id=70
- 'xcode_settings': {
- 'WARNING_CFLAGS!': [ '-Wheader-hygiene' ],
- },
- 'cflags': [ '-Wno-header-hygiene' ],
- }],
- ['OS=="linux"', {
+ ['OS=="linux" or OS=="mac"', {
'defines': [
- # TODO(tfarina): Only Linux has the generated config.h for now.
- # Generate the config.h in the other platforms: mac, win and enable
- # this for everyone.
+ # TODO(tfarina): Only Mac and Linux has the generated config.h for
+ # now. Generate the config.h for Windows too and enable this there
+ # as well.
'HAVE_CONFIG_H=1',
],
}],
{
'target_name': 'snappy_unittest',
'type': 'executable',
- 'defines': [
- 'HAVE_CONFIG_H=1',
- ],
'sources': [
'src/snappy-test.cc',
'src/snappy-test.h',
'../../testing/gtest.gyp:gtest',
'../../third_party/zlib/zlib.gyp:zlib',
],
+ 'variables': {
+ 'clang_warning_flags': [ '-Wno-return-type' ],
+ 'clang_warning_flags_unset': [ '-Wheader-hygiene' ],
+ },
'conditions': [
- ['clang == 1', {
- 'cflags': [
- '-Wno-return-type',
- '-Wno-header-hygiene'
+ ['OS=="linux" or OS=="mac"', {
+ 'defines': [
+ # TODO(tfarina): Only Mac and Linux has the generated config.h for
+ # now. Generate the config.h for Windows too and enable this there
+ # as well.
+ 'HAVE_CONFIG_H=1',
],
}],
],