nbind
nbind copied to clipboard
Compiling w/ C++14 or higher
Because nbind.gypi contains a bunch of various flags (such as -std=c++11), setting our own flags is actually a bit painful: one has to create another gypi file, include it after auto.gypi, and add a truthy condition inside (such as 1==1).
Is it really nbind's task to set the standard and optimization flags ? Shouldn't setting these flags be left to the user ? Or at least hidden behind a node-gyp variable ?
You're right. This is also related to issue #32. The default flags need to be provided somewhere to make usage easier, but there's three options for handling this better:
- Add a new node-gyp variable that disables the default flags, so you can define your own more easily.
- Add several variables for setting individual things like RTTI support and C++ standard version. A bit complicated to maintain.
- Tweak integration with
autogypiso its--init-gypcommand adds the flags to the new project'sbinding.gyp, so they can be removed from the mainnbind.gypi.
How is this going?
I'm currently having issue with RTTI with msvc.
Nothing I can do to override RunTimeTypeInfo option.
I can manually edit nbind.gypi, change RunTimeTypeInfo to true and compiling alright.
Because I intend to publish my package, do I need to write a script to automatically do that before every install routine (configure && build) or will you guys have a solution for this problem later?