cmake-js
Version:
CMake.js - a Node.js native addon build tool
42 lines (38 loc) • 915 B
JavaScript
;
const environment = require("./environment");
function TargetOptions(options) {
this.options = options || {};
}
Object.defineProperties(TargetOptions.prototype, {
arch: {
get: function () {
return this.options.arch || environment.arch;
}
},
isX86: {
get: function () {
return this.arch === "ia32" || this.arch === "x86";
}
},
isX64: {
get: function () {
return this.arch === "x64";
}
},
isArm: {
get: function () {
return this.arch === "arm";
}
},
runtime: {
get: function () {
return this.options.runtime || environment.runtime;
}
},
runtimeVersion: {
get: function () {
return this.options.runtimeVersion || environment.runtimeVersion;
}
}
});
module.exports = TargetOptions;