node-cmake
Advanced tools
Comparing version 2.2.1 to 2.3.0
# ncmake Manual | ||
Usage: `ncmake [options] <command>` | ||
Usage: `ncmake [options] <command> (-- [cmake options])` | ||
@@ -40,3 +40,9 @@ Only a single command is interpreted. Options should precede the command but can occur in any order. | ||
#### CMake options | ||
Additional options can be passed to CMake during any configure step by passsing a `--` separator | ||
followed by any arguments. This is useful to set additional parameters (`-D` flags) unique to your project. | ||
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.** | ||
### Deprecated options | ||
@@ -74,2 +80,6 @@ | ||
Build a module targeting `v6.2.1` of Node.js | ||
Build a module targeting `v6.2.1` of Node.js | ||
ncmake rebuild -- -DMY_PROJECT_ARG=10 | ||
Build a module, passing additional arguments directly to cmake. |
@@ -73,3 +73,6 @@ #!/usr/bin/env node | ||
// Support a version string, and a help argument (in addition to | ||
// Exactly one command must be specified | ||
argparse = argparse.demandCommand(1, 1); | ||
// Support a version string, and a help argument (in addition to | ||
// the help command) | ||
@@ -143,2 +146,3 @@ argparse = argparse.version(); | ||
if(argv.name) args.push('-DNODEJS_NAME="' + argv.name + '"'); | ||
args.push.apply(args, argv._.slice(1)); // Include any additional arguments passed to ncmake | ||
args.push('..'); | ||
@@ -259,3 +263,3 @@ | ||
} | ||
catch(e) { | ||
catch(e) { | ||
console.error('CMake binary could not be found. Please verify your PATH.'); | ||
@@ -265,9 +269,4 @@ process.exit(127); | ||
// This script takes any number of options and a single command | ||
// Finalize command line arguments | ||
var argv = argparse.argv; | ||
if(argv._.length < 1) { | ||
console.error('A command must be specified.\n') | ||
argparse.showHelp(); | ||
process.exit(1); | ||
} | ||
@@ -274,0 +273,0 @@ // Parse the first plain-argument as the command to execute |
{ | ||
"name": "node-cmake", | ||
"author": "Colin Taylor <cjntaylor@gmail.com>", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "A CMake-based build system for node.js native modules", | ||
@@ -22,4 +22,4 @@ "keywords": [ | ||
"nan": "*", | ||
"which": "^1.2.10", | ||
"yargs": "^5.0.0" | ||
"which": "^1.2.14", | ||
"yargs": "^7.0.2" | ||
}, | ||
@@ -26,0 +26,0 @@ "devDependencies": {}, |
Sorry, the diff of this file is not supported yet
56351
319
+ Addedcall-bind@1.0.8(transitive)
+ Addedcall-bind-apply-helpers@1.0.2(transitive)
+ Addedcall-bound@1.0.3(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addeddunder-proto@1.0.1(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.1.1(transitive)
+ Addedget-intrinsic@1.3.0(transitive)
+ Addedget-proto@1.0.1(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedmath-intrinsics@1.1.0(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedobject.assign@4.1.7(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedyargs@7.1.2(transitive)
+ Addedyargs-parser@5.0.1(transitive)
- Removedlodash.assign@4.2.0(transitive)
- Removedwindow-size@0.2.0(transitive)
- Removedyargs@5.0.0(transitive)
- Removedyargs-parser@3.2.0(transitive)
Updatedwhich@^1.2.14
Updatedyargs@^7.0.2