node-cmake-generator
v1.2.0
Published
CMakeLists generator for Node.js sources
Downloads
22
Maintainers
Readme
Table of Contents
- Motivation
- Problem
- Solution
- Instructions
- Troubleshoot
- Supported versions
- Issues regarding node's build system
Motivation
Build, develop and debug node on macOS.
Problem
Node uses gyp as it's build system.
No IDE for mac is known to support gyp.
Solution
Use CMake to build node on CLion.
Instructions
- install Xcode
- clone your node fork
cd node
npm install -g node-cmake-generator
- run
node-cmake-generator
- open the project in CLion
- build the node target
- enjoy :)
Troubleshoot
By default CLion runs CMake with a -j 4
flag in order to reduce build time by running 4 compilation jobs concurrently.
For some reason, the icudata__icutrim target fails to build if running concurrenlty.
One option is run CMake with a -j 1
flag:
Preferences -> Build, Execution, Deployment -> CMake -> Build options:
An alternative is to build the icudata__icutrim target independently and only then build the node target.
Supported versions
- node: 8.7.0, 8.9.0, 8.9.4, 12.0.0, 10.15.4
- macOS: Sierra 10.12.4, High Sierra 10.13.3, 10.13.6
- CLion: 2017.1.3, 2017.3, 2018.1, 2019.1
- CMake: 3.7.2, 3.9.4, 3.10.2, 3.13.4
Issues regarding node's build system
- https://github.com/nodejs/NG/issues/24
- https://github.com/nodejs/node/issues/12425