diff options
Diffstat (limited to 'xmake/modules/private/utils/batchcmds.lua')
| -rw-r--r-- | xmake/modules/private/utils/batchcmds.lua | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/xmake/modules/private/utils/batchcmds.lua b/xmake/modules/private/utils/batchcmds.lua index 465fe301c..944507397 100644 --- a/xmake/modules/private/utils/batchcmds.lua +++ b/xmake/modules/private/utils/batchcmds.lua @@ -279,14 +279,16 @@ function batchcmds:compile(sourcefiles, objectfile, opt) opt.target = self._TARGET -- wrap path for sourcefiles, because we need to translate path for project generator - if type(sourcefiles) == "table" then - local sourcefiles_wrap = {} - for _, sourcefile in ipairs(sourcefiles) do - table.insert(sourcefiles_wrap, path(sourcefile)) + if not path.instance_of(sourcefiles) then + if type(sourcefiles) == "table" then + local sourcefiles_wrap = {} + for _, sourcefile in ipairs(sourcefiles) do + table.insert(sourcefiles_wrap, path(sourcefile)) + end + sourcefiles = sourcefiles_wrap + else + sourcefiles = path(sourcefiles) end - sourcefiles = sourcefiles_wrap - else - sourcefiles = path(sourcefiles) end -- load compiler and get compilation command |
