File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 11MODULE_NAME := $(shell node -e "console.log(require('./package.json') .binary.module_name)")
22
3+ # Whether to turn compiler warnings into errors
4+ export WERROR ?= true
5+
36default : release
47
58node_modules :
@@ -8,11 +11,11 @@ node_modules:
811 npm install --ignore-scripts
912
1013release : node_modules
11- V=1 ./node_modules/.bin/node-pre-gyp configure build --loglevel=error
14+ V=1 ./node_modules/.bin/node-pre-gyp configure build --error_on_warnings= $( WERROR ) -- loglevel=error
1215 @echo " run 'make clean' for full rebuild"
1316
1417debug : node_modules
15- V=1 ./node_modules/.bin/node-pre-gyp configure build --loglevel=error --debug
18+ V=1 ./node_modules/.bin/node-pre-gyp configure build --error_on_warnings= $( WERROR ) -- loglevel=error --debug
1619 @echo " run 'make clean' for full rebuild"
1720
1821coverage :
Original file line number Diff line number Diff line change 11{
22 'includes' : [ 'common.gypi' ],
3+ 'variables' : {
4+ 'error_on_warnings%' :'true'
5+ },
36 'targets' : [
47 {
58 'target_name' : '<(module_name)' ,
1114 'ldflags' : [
1215 '-Wl,-z,now' ,
1316 ],
17+ 'conditions' : [
18+ ['error_on_warnings != "false"' , {
19+ 'cflags_cc' : [ '-Werror' ],
20+ 'xcode_settings' : {
21+ 'OTHER_CPLUSPLUSFLAGS' : [ '-Werror' ]
22+ }
23+ }]
24+ ],
1425 'xcode_settings' : {
1526 'OTHER_LDFLAGS' :[
1627 '-Wl,-bind_at_load'
You can’t perform that action at this time.
0 commit comments