charto / nbind

:sparkles: Magical headers that make your C++ library accessible from JavaScript :rocket:
MIT License
1.98k stars 119 forks source link

Compiling w/ C++14 or higher #48

Open arcanis opened 7 years ago

arcanis commented 7 years ago

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 ?

jjrv commented 7 years ago

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:

khanhas commented 6 years ago

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?