Skip to content

Commit

Permalink
Enable C++ exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
mcheshkov committed Oct 6, 2020
1 parent 437a3cb commit 9fedfcc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"<(src_dir)/PngImgAdapter.cc",
"<(src_dir)/PngImg.cc"
],
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
"include_dirs": [
"<!(node -e \"require('nan')\")",
],
Expand All @@ -21,7 +23,8 @@
"xcode_settings": {
"OTHER_CPLUSPLUSFLAGS" : ["-std=c++11", "-stdlib=libc++"],
"OTHER_LDFLAGS": ["-stdlib=libc++"],
"MACOSX_DEPLOYMENT_TARGET": "10.7"
"MACOSX_DEPLOYMENT_TARGET": "10.7",
"GCC_ENABLE_CPP_EXCEPTIONS": "YES"
}
}],
[ "OS=='linux'", {
Expand All @@ -30,7 +33,8 @@
[ "OS=='win'", {
"msvs_settings": {
"VCCLCompilerTool": {
"AdditionalOptions": ["/EHsc", "/wd4506"]
"ExceptionHandling": 1,
"AdditionalOptions": ["/wd4506"]
},
"VCLinkerTool": {
"GenerateDebugInformation": "false" # Avoid 'incorrect MSPDB120.DLL version' link error
Expand Down

0 comments on commit 9fedfcc

Please sign in to comment.