CMake or gyp for node.js addon development

2019-05-07 20:07发布

问题:

In most of tutorials, they use gyp as the building system for C++ node.js add-on development. However, compared to gyp, CMake has a long history and have much much more documentations.

Therefore, my question is that: which one is better for node.js C++ addon development?

Thank you.

回答1:

I've just made available my new module today: CMake.js to support CMake based Node.js and io.js native addon development. It works exactly like node-gyp, please take a look at the readme and to the tutorial, then decide what's better for you.



回答2:

gyp is really the only one that is supported and is what almost everyone in the node community uses. Also, both v8 and node use it.