reduce security setup hook duplication

This commit is contained in:
Jude Taylor 2015-10-29 13:55:58 -07:00
parent 949c4017b5
commit ce4f1098ca

View file

@ -1,7 +1,10 @@
noDeprecatedDeclarations() {
# Security.framework has about 2000 deprecated constants, all of which the user will be
# warned about at compilation time
NIX_CFLAGS_COMPILE+=" -Wno-deprecated-declarations"
flag="-Wno-deprecated-declarations"
if [[ "$NIX_CFLAGS_COMPILE" != *$flag* ]]; then
NIX_CFLAGS_COMPILE+=" $flag"
fi
}
envHooks+=(noDeprecatedDeclarations)