git.samba.org
/
obnox
/
samba
/
samba-obnox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
837f47d
)
lib/replace: Add test for what flag we need for -Werror behaviour
author
Andrew Bartlett
<abartlet@samba.org>
Sat, 29 Sep 2012 04:36:41 +0000
(14:36 +1000)
committer
Andrew Bartlett
<abartlet@samba.org>
Sat, 29 Sep 2012 04:50:00 +0000
(14:50 +1000)
lib/replace/wscript
patch
|
blob
|
history
diff --git
a/lib/replace/wscript
b/lib/replace/wscript
index f1f1cefe6533d6b1ebd9329ccc0b69a988bedb8c..732c664b6ef8907511eef7a568a794ba0d10f926 100644
(file)
--- a/
lib/replace/wscript
+++ b/
lib/replace/wscript
@@
-53,6
+53,15
@@
struct foo bar = { .y = 'X', .x = 1 };
conf.ADD_CFLAGS(f)
break
conf.ADD_CFLAGS(f)
break
+ # Try to find the right extra flags for -Werror behaviour
+ for f in ["-Werror", "-w2", "-errwarn"]:
+ if conf.CHECK_CFLAGS([f], '''
+'''):
+ if not 'WERROR_CFLAGS' in conf.env:
+ conf.env['WERROR_CFLAGS'] = []
+ conf.env['WERROR_CFLAGS'].extend([f])
+ break
+
conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')
conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')