Skip to content

lev-kazakov/node-cmake-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

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

  1. install Xcode
  2. clone your node fork
  3. cd node
  4. npm install -g node-cmake-generator
  5. run node-cmake-generator
  6. open the project in CLion
  7. build the node target
  8. 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

About

CMakeLists generator for Node.js sources

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published