1 | # ncmake Manual
|
2 |
|
3 | Usage: `ncmake [options] <command> (-- [cmake options])`
|
4 |
|
5 | Only a single command is interpreted. Options should precede the command but can occur in any order.
|
6 |
|
7 | | **Command** | **Description**
|
8 | |:--------------|:--------------------------------------------------------
|
9 | | `help` | Shows the help dialog
|
10 | | `build` | Builds the native addon
|
11 | | `clean` | Cleans the build
|
12 | | `distclean` | Removes all build files
|
13 | | `configure` | Runs CMake to generate the project configuration
|
14 | | `rebuild` | Runs clean, configure and build
|
15 | | `update` | Copies the NodeJS.cmake from the installed module
|
16 | | `install` | (Advanced) Installs the native addon
|
17 | | `list` | Deprecated `node-gyp` command (no-op)
|
18 | | `remove` | Deprecated `node-gyp` command (no-op)
|
19 |
|
20 |
|
21 | ## Command Options
|
22 |
|
23 | `node-gyp` accepts the following command options:
|
24 |
|
25 | | **Command** | **Description**
|
26 | |:----------------------------------|:------------------------------------------
|
27 | | `-d`, `--debug` | Make Debug build (default=Release)
|
28 | | `-h`, `--help` | Shows the help dialog
|
29 | | `--version` | Shows the version of ncmake
|
30 |
|
31 | ### Advanced options
|
32 |
|
33 | | **Command** | **Description**
|
34 | |:----------------------------------|:------------------------------------------
|
35 | | `--target` | Node version to build for (default="installed")
|
36 | | `--dist-url` | Download dependencies from custom URL
|
37 | | `--name` | The executable target name (default="node")
|
38 | | `-o`, `--output` | The output directory (default="build")
|
39 | | `-g`, `--generator` | The CMake generator to use
|
40 | | `-a`, `--arch` | The target architecture (see process.arch)
|
41 |
|
42 | #### CMake options
|
43 |
|
44 | Additional options can be passed to CMake during any configure step by passsing a `--` separator
|
45 | followed by any arguments. This is useful to set additional parameters (`-D` flags) unique to your project.
|
46 |
|
47 | Ncmake translates several of its own options into `-D` flags passed to cmake. The default behaviour of cmake is that the last value passed via command line wins. Ncmake uses the flag `-DCMAKE_BUILD_TYPE`, which is set to ensure the binary output directory matches node-gyp's behaviour. If you override this property, ncmake makes no guarantee of proper execution. To ensure proper execution, use the `-d` flag to switch between `Debug` and `Release` output instead of setting the value directly. **YOU HAVE BEEN WARNED.**
|
48 |
|
49 | ### Deprecated options
|
50 |
|
51 | All deprecated options are silently ignored
|
52 |
|
53 | | **Command** | **Description**
|
54 | |:----------------------------------|:------------------------------------------
|
55 | | `-j n`, `--jobs n` | Ignored
|
56 | | `--silly`, `--loglevel=silly` | Ignored
|
57 | | `--verbose`, `--loglevel=verbose` | Ignored
|
58 | | `--silent`, `--loglevel=silent` | Ignored
|
59 | | `--release`, `--no-debug` | Default
|
60 | | `-C $dir`, `--directory=$dir` | Ignored
|
61 | | `--make=$make` | Ignored
|
62 | | `--thin=yes` | Ignored
|
63 | | `--tarball=$path` | Ignored
|
64 | | `--ensure` | Ignored
|
65 | | `--proxy=$url` | Ignored
|
66 | | `--cafile=$cafile` | Ignored
|
67 | | `--nodedir=$path` | Ignored
|
68 | | `--python=$path` | Ignored
|
69 | | `--msvs_version=$version` | Ignored
|
70 | | `--solution=$solution` | Ignored
|
71 |
|
72 | # Examples
|
73 |
|
74 | ncmake rebuild -d
|
75 |
|
76 | Build the module in debug mode
|
77 |
|
78 | ncmake --target v6.2.1 rebuild
|
79 |
|
80 | Build a module targeting `v6.2.1` of Node.js
|
81 |
|
82 | ncmake rebuild -- -DMY_PROJECT_ARG=10
|
83 |
|
84 | Build a module, passing additional arguments directly to cmake.
|