Turn off WarnAsError when building ANGLE projects on windows.
authorbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 8 Jan 2013 21:46:05 +0000 (21:46 +0000)
committerbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 8 Jan 2013 21:46:05 +0000 (21:46 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@7096 2bbb7eff-a529-9590-31e7-b0007b416f81

gyp/angle.gyp
gyp/common_conditions.gypi

index 70ab5c2228d6e240e8a067c2aba1cc4f941e6438..088895b97b6a51c657d4c46ed8915128913d1600 100644 (file)
@@ -10,6 +10,7 @@
       },
       'variables': {
         'component': 'static_library',
+            'skia_building_angle': 1, # See comment in common_conditions.gypi.
       },
       'includes': [
         '../third_party/externals/angle/src/build_angle.gypi',
index 51865bf2d145d76df0e183e3f1791c6253b87086..0e1333368235875d0eea80aabcb2d050c2bfb850 100644 (file)
             },
           }],
           ['skia_arch_width == 32', {
-            'msvs_configuration_platform': 'Win32',
-            'msvs_settings': {
-              'VCCLCompilerTool': {
-                'WarnAsError': 'true',
-              },
+            # This gypi file will be included directly into the gyp(i) files in the angle repo by
+            # our gyp_skia script. We don't want force WarnAsError on angle. So angle.gyp defines
+            # skia_building_angle=1 and here we select whether to enable WarnAsError based on that
+            # var's value. Here it defaults to 0.
+            'variables' : {
+              'skia_building_angle%': 0,
             },
+            'conditions' : [
+              ['skia_building_angle', {
+                'msvs_configuration_platform': 'Win32',
+                'msvs_settings': {
+                  'VCCLCompilerTool': {
+                    'WarnAsError': 'false',
+                  },
+                },
+              },{ # not angle
+                'msvs_configuration_platform': 'Win32',
+                'msvs_settings': {
+                  'VCCLCompilerTool': {
+                    'WarnAsError': 'true',
+                  },
+                },
+              }],
+            ],
           }],
         ],
       },