Skip to content

Commit

Permalink
build: compile in ISO C++11 mode
Browse files Browse the repository at this point in the history
* Use `cflags_cc` instead of `cflags`.

* By default `node-gyp` uses `-std=gnu++0x`. This commit modifies
  `cflags_cc` to use `-std=c++11`.

PR-URL: #37
  • Loading branch information
aqrln committed Apr 2, 2017
1 parent 64aae38 commit f2a5278
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
'variables': {
'jstp_base_cflags': ['-Wall', '-Wextra', '-Wno-unused-parameter'],
'jstp_debug_cflags': ['-g', '-O0'],
'jstp_release_cflags': ['-O3']
'jstp_base_ccflags': [
'-Wall',
'-Wextra',
'-Wno-unused-parameter',
'-std=c++11'
],
'jstp_debug_ccflags': ['-g', '-O0'],
'jstp_release_ccflags': ['-O3']
},
'targets': [
{
Expand All @@ -16,21 +21,21 @@
],
'configurations': {
'Debug': {
'cflags': ['<@(jstp_debug_cflags)'],
'cflags_cc': ['<@(jstp_debug_ccflags)'],
'xcode_settings': {
'OTHER_CFLAGS': ['<@(jstp_debug_cflags)']
'OTHER_CPLUSPLUSFLAGS': ['<@(jstp_debug_ccflags)']
}
},
'Release': {
'cflags': ['<@(jstp_release_cflags)'],
'cflags_cc': ['<@(jstp_release_ccflags)'],
'xcode_settings': {
'OTHER_CFLAGS': ['<@(jstp_release_cflags)']
'OTHER_CPLUSPLUSFLAGS': ['<@(jstp_release_ccflags)']
}
}
},
'cflags': ['<@(jstp_base_cflags)'],
'cflags_cc': ['<@(jstp_base_ccflags)'],
'xcode_settings': {
'OTHER_CFLAGS': ['<@(jstp_base_cflags)']
'OTHER_CPLUSPLUSFLAGS': ['<@(jstp_base_ccflags)']
}
}
]
Expand Down

0 comments on commit f2a5278

Please sign in to comment.