summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/cmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-01-12 23:01:38 +0800
committerruki <[email protected]>2021-01-12 23:01:38 +0800
commit1d7ff7a14fd27aa6164d43a62a66a516f574978b (patch)
treec7802081086a8c751702e7a984fd458f7045623b /xmake/modules/package/tools/cmake.lua
parentde0f58af5a504ac72e7c23632fafdd5abdf0e771 (diff)
pass jobs for xrepo
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
-rw-r--r--xmake/modules/package/tools/cmake.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index c17282be3..e13453303 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -470,7 +470,7 @@ end
-- do build for make
function _build_for_make(package, configs, opt)
- local njob = opt.jobs or tostring(math.ceil(os.cpuinfo().ncpu * 3 / 2))
+ local njob = opt.jobs or option.get("jobs") or tostring(math.ceil(os.cpuinfo().ncpu * 3 / 2))
local argv = {"-j" .. njob}
if option.get("verbose") then
table.insert(argv, "VERBOSE=1")
@@ -539,7 +539,7 @@ end
-- do install for make
function _install_for_make(package, configs, opt)
- local njob = opt.jobs or tostring(math.ceil(os.cpuinfo().ncpu * 3 / 2))
+ local njob = opt.jobs or option.get("jobs") or tostring(math.ceil(os.cpuinfo().ncpu * 3 / 2))
local argv = {"-j" .. njob}
if option.get("verbose") then
table.insert(argv, "VERBOSE=1")