Index: gyp/common_conditions.gypi |
=================================================================== |
--- gyp/common_conditions.gypi (revision 8310) |
+++ gyp/common_conditions.gypi (working copy) |
@@ -6,7 +6,7 @@ |
# 'SK_SUPPORT_HINTING_SCALE_FACTOR', |
], |
'conditions' : [ |
- ['skia_gpu == 1', |
+ [ 'skia_gpu == 1', |
{ |
'defines': [ |
'SK_SUPPORT_GPU=1', |
@@ -17,7 +17,7 @@ |
], |
}, |
], |
- ['skia_os == "win"', |
+ [ 'skia_os == "win"', |
{ |
'defines': [ |
'SK_BUILD_FOR_WIN32', |
@@ -82,48 +82,27 @@ |
}, |
}, |
'conditions' : [ |
- ['skia_arch_width == 64', { |
+ [ 'skia_arch_width == 64', { |
'msvs_configuration_platform': 'x64', |
+ }], |
+ [ 'skia_arch_width == 32', { |
+ 'msvs_configuration_platform': 'Win32', |
+ }], |
+ [ 'skia_warnings_as_errors', { |
'msvs_settings': { |
'VCCLCompilerTool': { |
- 'WarnAsError': 'false', |
+ 'WarnAsError': 'true', |
+ 'AdditionalOptions': [ |
+ '/we4189', # initialized but unused var warning |
+ ], |
}, |
}, |
}], |
- ['skia_arch_width == 32', { |
- # 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', |
- 'AdditionalOptions': [ |
- '/we4189', # initialized but unused var warning |
- ], |
- }, |
- }, |
- }], |
- ], |
- }], |
], |
}, |
], |
- ['skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl"]', |
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl"]', |
{ |
'defines': [ |
'SK_SAMPLES_FOR_X', |
@@ -139,7 +118,6 @@ |
}, |
}, |
'cflags': [ |
- '-Werror', |
'-Wall', |
'-Wextra', |
# suppressions below here were added for clang |
@@ -147,12 +125,12 @@ |
'-Wno-c++11-extensions' |
], |
'conditions' : [ |
- ['skia_warnings_as_errors == 1', { |
+ [ 'skia_warnings_as_errors', { |
'cflags': [ |
'-Werror', |
], |
}], |
- ['skia_arch_width == 64', { |
+ [ 'skia_arch_width == 64', { |
'cflags': [ |
'-m64', |
], |
@@ -160,7 +138,7 @@ |
'-m64', |
], |
}], |
- ['skia_arch_width == 32', { |
+ [ 'skia_arch_width == 32', { |
'cflags': [ |
'-m32', |
], |
@@ -189,7 +167,7 @@ |
}, |
], |
- ['skia_os == "mac"', |
+ [ 'skia_os == "mac"', |
{ |
'variables': { |
'mac_sdk%': '<!(python <(DEPTH)/tools/find_mac_sdk.py 10.6)', |
@@ -198,14 +176,18 @@ |
'SK_BUILD_FOR_MAC', |
], |
'conditions' : [ |
- ['skia_arch_width == 64', { |
+ [ 'skia_arch_width == 64', { |
'xcode_settings': { |
'ARCHS': 'x86_64', |
}, |
}], |
- ['skia_arch_width == 32', { |
+ [ 'skia_arch_width == 32', { |
'xcode_settings': { |
'ARCHS': 'i386', |
+ }, |
+ }], |
+ [ 'skia_warnings_as_errors', { |
+ 'xcode_settings': { |
'OTHER_CPLUSPLUSFLAGS': [ |
'-Werror', |
], |
@@ -228,7 +210,7 @@ |
'xcode_settings': { |
'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', |
'conditions': [ |
- ['skia_osx_sdkroot==""', { |
+ [ 'skia_osx_sdkroot==""', { |
'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
}, { |
'SDKROOT': '<(skia_osx_sdkroot)', # -isysroot |
@@ -264,11 +246,20 @@ |
}, |
], |
- ['skia_os == "ios"', |
+ [ 'skia_os == "ios"', |
{ |
'defines': [ |
'SK_BUILD_FOR_IOS', |
], |
+ 'conditions' : [ |
+ [ 'skia_warnings_as_errors', { |
+ 'xcode_settings': { |
+ 'OTHER_CPLUSPLUSFLAGS': [ |
+ '-Werror', |
+ ], |
+ }, |
+ }], |
+ ], |
'configurations': { |
'Debug': { |
'xcode_settings': { |
@@ -289,13 +280,16 @@ |
'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)', |
'SDKROOT': 'iphoneos', |
'TARGETED_DEVICE_FAMILY': '1,2', |
- 'OTHER_CPLUSPLUSFLAGS': '-fvisibility=hidden -fvisibility-inlines-hidden', |
+ 'OTHER_CPLUSPLUSFLAGS': [ |
+ '-fvisibility=hidden', |
+ '-fvisibility-inlines-hidden', |
+ ], |
'GCC_THUMB_SUPPORT': 'NO', |
}, |
}, |
], |
- ['skia_os == "android"', |
+ [ 'skia_os == "android"', |
{ |
'defines': [ |
'SK_BUILD_FOR_ANDROID', |
@@ -322,7 +316,7 @@ |
'-fuse-ld=gold', |
], |
'conditions': [ |
- [ 'skia_warnings_as_errors == 1', { |
+ [ 'skia_warnings_as_errors', { |
'cflags': [ |
'-Werror', |
], |