summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-22 18:46:42 +0800
committerruki <[email protected]>2022-05-22 18:46:59 +0800
commit0c354983c76505f843d76b916fbd1716f93fd369 (patch)
tree0341842177877281756113f41cb481e0979f55f9
parent0b460a9fd1215ac89de539c91eabe2eb234f9d24 (diff)
improve cmakelists
-rw-r--r--xmake/plugins/project/cmake/cmakelists.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua
index 34c8bc126..a627e1f81 100644
--- a/xmake/plugins/project/cmake/cmakelists.lua
+++ b/xmake/plugins/project/cmake/cmakelists.lua
@@ -619,7 +619,7 @@ function _get_command_string(cmd, outputdir)
if cmd.program then
-- @see https://github.com/xmake-io/xmake/discussions/2156
local argv = {}
- for _, v in ipairs(table.join(cmd.program, cmd.argv)) do
+ for _, v in ipairs(cmd.argv) do
if path.instance_of(v) then
v = v:clone():set(_get_unix_path_relative_to_cmake(v:rawstr(), outputdir)):str()
elseif path.is_absolute(v) then
@@ -627,7 +627,7 @@ function _get_command_string(cmd, outputdir)
end
table.insert(argv, v)
end
- local command = os.args(argv)
+ local command = cmd.program .. " " .. os.args(argv)
if opt and opt.curdir then
command = "${CMAKE_COMMAND} -E chdir " .. _get_unix_path_relative_to_cmake(opt.curdir, outputdir) .. " " .. command
end