From 4c8a1ea5e88a3b3ac78f3e06eee4c2b4d9973c7c Mon Sep 17 00:00:00 2001 From: Oliver Buchtala Date: Sun, 27 Apr 2014 00:30:57 +0200 Subject: [PATCH] Fix node-gyp configuration for example 'exception'. --- Examples/javascript/exception/binding.gyp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Examples/javascript/exception/binding.gyp b/Examples/javascript/exception/binding.gyp index 54eebfaa0..2be0a17a2 100644 --- a/Examples/javascript/exception/binding.gyp +++ b/Examples/javascript/exception/binding.gyp @@ -2,7 +2,28 @@ "targets": [ { "target_name": "example", - "sources": [ "example.cxx", "example_wrap.cxx" ] + "sources": [ "example.cxx", "example_wrap.cxx" ], + 'defines': [ + 'BUILDING_NODE_EXTENSION=1', + ], + 'conditions': [ + ['OS=="mac"', + { + 'xcode_settings': { + 'GCC_ENABLE_CPP_RTTI': 'YES', + 'GCC_ENABLE_CPP_EXCEPTIONS' : 'YES' + } + } + ], + ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', + { + 'cflags': [ "-Wno-unused-variable", "-Wno-unused-but-set-variable", "-Wno-unused-but-set-parameter"], + 'cflags_cc': [ "-Wno-unused-variable", "-Wno-unused-but-set-variable", "-Wno-unused-but-set-parameter"], + 'cflags!': [ '-fno-exceptions' ], + 'cflags_cc!': [ '-fno-exceptions', '-fno-rtti' ] + } + ] + ] } ] }