diff --git a/test/addons/async-hello-world/binding.gyp b/test/addons/async-hello-world/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/async-hello-world/binding.gyp +++ b/test/addons/async-hello-world/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/async-hooks-id/binding.gyp b/test/addons/async-hooks-id/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/async-hooks-id/binding.gyp +++ b/test/addons/async-hooks-id/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/async-hooks-promise/binding.gyp b/test/addons/async-hooks-promise/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/async-hooks-promise/binding.gyp +++ b/test/addons/async-hooks-promise/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/async-resource/binding.gyp b/test/addons/async-resource/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/async-resource/binding.gyp +++ b/test/addons/async-resource/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/at-exit/binding.gyp b/test/addons/at-exit/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/at-exit/binding.gyp +++ b/test/addons/at-exit/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/buffer-free-callback/binding.gyp b/test/addons/buffer-free-callback/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/buffer-free-callback/binding.gyp +++ b/test/addons/buffer-free-callback/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/callback-scope/binding.gyp b/test/addons/callback-scope/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/callback-scope/binding.gyp +++ b/test/addons/callback-scope/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/common.gypi b/test/addons/common.gypi new file mode 100644 index 00000000000000..3f1c11dc3cda15 --- /dev/null +++ b/test/addons/common.gypi @@ -0,0 +1,8 @@ +{ + 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], + 'conditions': [ + [ 'OS in "linux freebsd openbsd solaris android aix cloudabi"', { + 'cflags': ['-Wno-cast-function-type'], + }], + ], +} diff --git a/test/addons/dlopen-ping-pong/binding.gyp b/test/addons/dlopen-ping-pong/binding.gyp index 48af696b326507..8569b011fac8e5 100644 --- a/test/addons/dlopen-ping-pong/binding.gyp +++ b/test/addons/dlopen-ping-pong/binding.gyp @@ -17,8 +17,8 @@ }, { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/errno-exception/binding.gyp b/test/addons/errno-exception/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/errno-exception/binding.gyp +++ b/test/addons/errno-exception/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/heap-profiler/binding.gyp b/test/addons/heap-profiler/binding.gyp index ceb1d3e73415de..2d26a785709dd1 100644 --- a/test/addons/heap-profiler/binding.gyp +++ b/test/addons/heap-profiler/binding.gyp @@ -2,9 +2,9 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], 'sources': [ 'binding.cc' ], - 'win_delay_load_hook': 'false' + 'win_delay_load_hook': 'false', + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/hello-world-esm/binding.gyp b/test/addons/hello-world-esm/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/hello-world-esm/binding.gyp +++ b/test/addons/hello-world-esm/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/hello-world-function-export/binding.gyp b/test/addons/hello-world-function-export/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/hello-world-function-export/binding.gyp +++ b/test/addons/hello-world-function-export/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/hello-world/binding.gyp b/test/addons/hello-world/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/hello-world/binding.gyp +++ b/test/addons/hello-world/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/load-long-path/binding.gyp b/test/addons/load-long-path/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/load-long-path/binding.gyp +++ b/test/addons/load-long-path/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/make-callback-domain-warning/binding.gyp b/test/addons/make-callback-domain-warning/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/make-callback-domain-warning/binding.gyp +++ b/test/addons/make-callback-domain-warning/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/make-callback-recurse/binding.gyp b/test/addons/make-callback-recurse/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/make-callback-recurse/binding.gyp +++ b/test/addons/make-callback-recurse/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/make-callback/binding.gyp b/test/addons/make-callback/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/make-callback/binding.gyp +++ b/test/addons/make-callback/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/new-target/binding.gyp b/test/addons/new-target/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/new-target/binding.gyp +++ b/test/addons/new-target/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/node-module-version/binding.gyp b/test/addons/node-module-version/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/node-module-version/binding.gyp +++ b/test/addons/node-module-version/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/non-node-context/binding.gyp b/test/addons/non-node-context/binding.gyp index b83bae308260f2..2eb456719623b9 100644 --- a/test/addons/non-node-context/binding.gyp +++ b/test/addons/non-node-context/binding.gyp @@ -2,7 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'sources': ['binding.cc'] + 'sources': ['binding.cc'], + 'includes': ['../common.gypi'], }, ] } diff --git a/test/addons/not-a-binding/binding.gyp b/test/addons/not-a-binding/binding.gyp index 7ddad59c1d1683..43036995f8e5d4 100644 --- a/test/addons/not-a-binding/binding.gyp +++ b/test/addons/not-a-binding/binding.gyp @@ -2,7 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'sources': [ 'not_a_binding.c' ] + 'sources': [ 'not_a_binding.c' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/null-buffer-neuter/binding.gyp b/test/addons/null-buffer-neuter/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/null-buffer-neuter/binding.gyp +++ b/test/addons/null-buffer-neuter/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/openssl-binding/binding.gyp b/test/addons/openssl-binding/binding.gyp index 3bfe93350fe3bf..38a7c10d672d92 100644 --- a/test/addons/openssl-binding/binding.gyp +++ b/test/addons/openssl-binding/binding.gyp @@ -2,12 +2,13 @@ 'targets': [ { 'target_name': 'binding', + 'includes': ['../common.gypi'], 'conditions': [ ['node_use_openssl=="true"', { 'sources': ['binding.cc'], 'include_dirs': ['../../../deps/openssl/openssl/include'], - }] - ] + }], + ], }, ] } diff --git a/test/addons/openssl-client-cert-engine/binding.gyp b/test/addons/openssl-client-cert-engine/binding.gyp index f43be602199ad0..9d5f501fd633bc 100644 --- a/test/addons/openssl-client-cert-engine/binding.gyp +++ b/test/addons/openssl-client-cert-engine/binding.gyp @@ -3,6 +3,7 @@ { 'target_name': 'testengine', 'type': 'none', + 'includes': ['../common.gypi'], 'conditions': [ ['OS=="mac" and ' 'node_use_openssl=="true" and ' @@ -17,7 +18,7 @@ '../../../../out/<(PRODUCT_DIR)/<(openssl_product)' ] }, - }] + }], ] } ] diff --git a/test/addons/parse-encoding/binding.gyp b/test/addons/parse-encoding/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/parse-encoding/binding.gyp +++ b/test/addons/parse-encoding/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/repl-domain-abort/binding.gyp b/test/addons/repl-domain-abort/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/repl-domain-abort/binding.gyp +++ b/test/addons/repl-domain-abort/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/stringbytes-external-exceed-max/binding.gyp b/test/addons/stringbytes-external-exceed-max/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/stringbytes-external-exceed-max/binding.gyp +++ b/test/addons/stringbytes-external-exceed-max/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/symlinked-module/binding.gyp b/test/addons/symlinked-module/binding.gyp index 3bfb84493f3e87..55fbe7050f18e4 100644 --- a/test/addons/symlinked-module/binding.gyp +++ b/test/addons/symlinked-module/binding.gyp @@ -2,7 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/uv-handle-leak/binding.gyp b/test/addons/uv-handle-leak/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/uv-handle-leak/binding.gyp +++ b/test/addons/uv-handle-leak/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/worker-addon/binding.gyp b/test/addons/worker-addon/binding.gyp index 7ede63d94a0d77..55fbe7050f18e4 100644 --- a/test/addons/worker-addon/binding.gyp +++ b/test/addons/worker-addon/binding.gyp @@ -2,8 +2,8 @@ 'targets': [ { 'target_name': 'binding', - 'defines': [ 'V8_DEPRECATION_WARNINGS=1' ], - 'sources': [ 'binding.cc' ] + 'sources': [ 'binding.cc' ], + 'includes': ['../common.gypi'], } ] } diff --git a/test/addons/zlib-binding/binding.gyp b/test/addons/zlib-binding/binding.gyp index 60a9bb82661820..0451f21782ff19 100644 --- a/test/addons/zlib-binding/binding.gyp +++ b/test/addons/zlib-binding/binding.gyp @@ -4,6 +4,7 @@ 'target_name': 'binding', 'sources': ['binding.cc'], 'include_dirs': ['../../../deps/zlib'], + 'includes': ['../common.gypi'], }, ] } diff --git a/tools/doc/addon-verify.js b/tools/doc/addon-verify.js index ae6a08b2cc6475..2ff61c21f5c22e 100644 --- a/tools/doc/addon-verify.js +++ b/tools/doc/addon-verify.js @@ -79,8 +79,8 @@ ${files[name].replace( targets: [ { target_name: 'addon', - defines: [ 'V8_DEPRECATION_WARNINGS=1' ], - sources: files.map(({ name }) => name) + sources: files.map(({ name }) => name), + includes: ['../common.gypi'], } ] })