Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / snappy / snappy.gyp
index 877c2a0..ac0186f 100644 (file)
           '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',
           ],
         }],
@@ -70,9 +69,6 @@
     {
       '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',
           ],
         }],
       ],