Skip to content

Commit

Permalink
Enable exceptions in debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Apr 8, 2021
1 parent 2958c1d commit 2025aa0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@

'defines': [
'NAPI_VERSION=3',
'NAPI_DISABLE_CPP_EXCEPTIONS',
'ZMQ_STATIC',
],

Expand Down Expand Up @@ -84,6 +83,7 @@

'configurations': {
'Debug': {
'defines': ['NAPI_CPP_EXCEPTIONS', 'DEBUG', '_DEBUG'],
'conditions': [
['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', {
'cflags_cc!': [
Expand Down Expand Up @@ -113,21 +113,29 @@
['OS == "win"', {
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': 2, # /EHsc
# 0 - MultiThreaded (/MT)
# 1 - MultiThreadedDebug (/MTd)
# 2 - MultiThreadedDLL (/MD)
# 3 - MultiThreadedDebugDLL (/MDd)
'RuntimeLibrary': 3,
'AdditionalOptions': [
'-std:c++17',
"/DEBUG",
],
},
'VCLinkerTool': {
'BasicRuntimeChecks': 3, # /RTC1
},
},
}],
],
},

'Release': {
'defines': [
'NAPI_DISABLE_CPP_EXCEPTIONS',
],
'conditions': [
['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', {
'cflags_cc!': [
Expand Down

0 comments on commit 2025aa0

Please sign in to comment.