summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstar9029 <[email protected]>2024-08-29 21:00:10 +0800
committerstar9029 <[email protected]>2024-08-29 21:00:10 +0800
commit7d2b49214caa15642cbdff28bf8797692e14768c (patch)
tree800c48aa1715333729989130dd8220fc903e6725
parent2292b165497b0f2c560899c2436a52b779ee043b (diff)
target -> targets
-rw-r--r--xmake/modules/package/tools/cmake.lua16
-rw-r--r--xmake/modules/package/tools/ninja.lua6
-rw-r--r--xmake/modules/package/tools/xmake.lua6
3 files changed, 14 insertions, 14 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 27268613d..2dabe8b86 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -1002,9 +1002,9 @@ end
-- do build for make
function _build_for_make(package, configs, opt)
local argv = {}
- local target = table.wrap(opt.target)
- if #target ~= 0 then
- table.join2(argv, target)
+ local targets = table.wrap(opt.target)
+ if #targets ~= 0 then
+ table.join2(argv, targets)
end
local jobs = _get_parallel_njobs(opt)
table.insert(argv, "-j" .. jobs)
@@ -1048,18 +1048,18 @@ function _build_for_cmakebuild(package, configs, opt)
table.insert(argv, "--config")
table.insert(argv, opt.config)
end
- local target = table.wrap(opt.target)
- if #target ~= 0 then
+ local targets = table.wrap(opt.target)
+ if #targets ~= 0 then
table.insert(argv, "--target")
- if #target > 1 then
+ if #targets > 1 then
-- https://stackoverflow.com/questions/47553569/how-can-i-build-multiple-targets-using-cmake-build
if _get_cmake_version():ge("3.15") then
- table.join2(argv, target)
+ table.join2(argv, targets)
else
raise("Build multiple targets need cmake >=3.15")
end
else
- table.insert(argv, target[1])
+ table.insert(argv, targets[1])
end
end
os.vrunv(cmake.program, argv, {envs = opt.envs or buildenvs(package)})
diff --git a/xmake/modules/package/tools/ninja.lua b/xmake/modules/package/tools/ninja.lua
index df5ba21da..2d2fb734d 100644
--- a/xmake/modules/package/tools/ninja.lua
+++ b/xmake/modules/package/tools/ninja.lua
@@ -28,9 +28,9 @@ function _default_argv(package, configs, opt)
local njob = opt.jobs or option.get("jobs") or tostring(os.default_njob())
local argv = {}
- local target = table.wrap(opt.target)
- if #target ~= 0 then
- table.join2(argv, target)
+ local targets = table.wrap(opt.target)
+ if #targets ~= 0 then
+ table.join2(argv, targets)
end
table.insert(argv, "-C")
table.insert(argv, buildir)
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua
index b9cf605ce..c779a9ff5 100644
--- a/xmake/modules/package/tools/xmake.lua
+++ b/xmake/modules/package/tools/xmake.lua
@@ -526,9 +526,9 @@ function install(package, configs, opt)
-- do install
argv = {"install", "-y", "--nopkgs", "-o", package:installdir()}
_set_builtin_argv(package, argv)
- local target = table.wrap(opt.target)
- if #target ~= 0 then
- table.join2(argv, target)
+ local targets = table.wrap(opt.target)
+ if #targets ~= 0 then
+ table.join2(argv, targets)
end
os.vrunv(os.programfile(), argv, {envs = envs})
end