Skip to content

Commit 7d2b492

Browse files
committed
target -> targets
1 parent 2292b16 commit 7d2b492

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

xmake/modules/package/tools/cmake.lua

+8-8
Original file line numberDiff line numberDiff line change
@@ -1002,9 +1002,9 @@ end
10021002
-- do build for make
10031003
function _build_for_make(package, configs, opt)
10041004
local argv = {}
1005-
local target = table.wrap(opt.target)
1006-
if #target ~= 0 then
1007-
table.join2(argv, target)
1005+
local targets = table.wrap(opt.target)
1006+
if #targets ~= 0 then
1007+
table.join2(argv, targets)
10081008
end
10091009
local jobs = _get_parallel_njobs(opt)
10101010
table.insert(argv, "-j" .. jobs)
@@ -1048,18 +1048,18 @@ function _build_for_cmakebuild(package, configs, opt)
10481048
table.insert(argv, "--config")
10491049
table.insert(argv, opt.config)
10501050
end
1051-
local target = table.wrap(opt.target)
1052-
if #target ~= 0 then
1051+
local targets = table.wrap(opt.target)
1052+
if #targets ~= 0 then
10531053
table.insert(argv, "--target")
1054-
if #target > 1 then
1054+
if #targets > 1 then
10551055
-- https://stackoverflow.com/questions/47553569/how-can-i-build-multiple-targets-using-cmake-build
10561056
if _get_cmake_version():ge("3.15") then
1057-
table.join2(argv, target)
1057+
table.join2(argv, targets)
10581058
else
10591059
raise("Build multiple targets need cmake >=3.15")
10601060
end
10611061
else
1062-
table.insert(argv, target[1])
1062+
table.insert(argv, targets[1])
10631063
end
10641064
end
10651065
os.vrunv(cmake.program, argv, {envs = opt.envs or buildenvs(package)})

xmake/modules/package/tools/ninja.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ function _default_argv(package, configs, opt)
2828
local njob = opt.jobs or option.get("jobs") or tostring(os.default_njob())
2929

3030
local argv = {}
31-
local target = table.wrap(opt.target)
32-
if #target ~= 0 then
33-
table.join2(argv, target)
31+
local targets = table.wrap(opt.target)
32+
if #targets ~= 0 then
33+
table.join2(argv, targets)
3434
end
3535
table.insert(argv, "-C")
3636
table.insert(argv, buildir)

xmake/modules/package/tools/xmake.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,9 @@ function install(package, configs, opt)
526526
-- do install
527527
argv = {"install", "-y", "--nopkgs", "-o", package:installdir()}
528528
_set_builtin_argv(package, argv)
529-
local target = table.wrap(opt.target)
530-
if #target ~= 0 then
531-
table.join2(argv, target)
529+
local targets = table.wrap(opt.target)
530+
if #targets ~= 0 then
531+
table.join2(argv, targets)
532532
end
533533
os.vrunv(os.programfile(), argv, {envs = envs})
534534
end

0 commit comments

Comments
 (0)