aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authormaxvujovic@gmail.com <maxvujovic@gmail.com@736b8ea6-26fd-11df-bfd4-992fa37f6226>2012-07-25 21:01:45 +0000
committermaxvujovic@gmail.com <maxvujovic@gmail.com@736b8ea6-26fd-11df-bfd4-992fa37f6226>2012-07-25 21:01:45 +0000
commit28a6b5f8dad04ce73aac9ce6d6466bbc67d9c5de (patch)
treec9b800d640fbe5d8dc3e76e50ae315d4493237c3 /build
parent728f279824b651ef47fdc3f0e90d4cdc48edda20 (diff)
downloadangle-28a6b5f8dad04ce73aac9ce6d6466bbc67d9c5de.tar.gz
Add angle_code var to common.gypi and build_angle.gyp. Add GCC and clang warning flags from WebKit to ANGLE Mac and Linux builds.
The angle_code var differentiates between core ANGLE code vs. test code, sample code, and third party code. Review URL: https://codereview.appspot.com/6427049/ git-svn-id: https://angleproject.googlecode.com/svn/trunk@1244 736b8ea6-26fd-11df-bfd4-992fa37f6226
Diffstat (limited to 'build')
-rw-r--r--build/common.gypi34
1 files changed, 34 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi
index a2b7835d..541e914e 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -5,6 +5,26 @@
{
'variables': {
'component%': 'static_library',
+ # angle_code is set to 1 for the core ANGLE targets defined in src/build_angle.gyp.
+ # angle_code is set to 0 for test code, sample code, and third party code.
+ # When angle_code is 1, we build with additional warning flags on Mac and Linux.
+ 'angle_code%': 0,
+ 'gcc_or_clang_warnings': [
+ '-Wall',
+ '-Wchar-subscripts',
+ '-Werror',
+ '-Wextra',
+ '-Wformat=2',
+ '-Winit-self',
+ '-Wno-sign-compare',
+ '-Wno-unused-function',
+ '-Wno-unused-parameter',
+ '-Wno-unknown-pragmas',
+ '-Wpacked',
+ '-Wpointer-arith',
+ '-Wundef',
+ '-Wwrite-strings',
+ ],
},
'target_defaults': {
'default_configuration': 'Debug',
@@ -130,6 +150,20 @@
},
},
}],
+ ['angle_code==1', {
+ 'target_defaults': {
+ 'conditions': [
+ ['OS=="mac"', {
+ 'xcode_settings': {
+ 'WARNING_CFLAGS': ['<@(gcc_or_clang_warnings)']
+ },
+ }],
+ ['OS!="win" and OS!="mac"', {
+ 'cflags': ['<@(gcc_or_clang_warnings)']
+ }],
+ ]
+ }
+ }],
],
}