diff options
| author | ruki <[email protected]> | 2023-06-16 23:59:58 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-06-16 23:59:58 +0800 |
| commit | 4e1b39f0f2a4381997d0e73b071507cf399ce897 (patch) | |
| tree | 38b6c04453581bc352926e642508d17ebee9c68b /xmake/modules/private/action/build/object.lua | |
| parent | ff6d29ac8742fd494054d49ff049d35acd0e86f7 (diff) | |
improve pack and pch
Diffstat (limited to 'xmake/modules/private/action/build/object.lua')
| -rw-r--r-- | xmake/modules/private/action/build/object.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xmake/modules/private/action/build/object.lua b/xmake/modules/private/action/build/object.lua index 00493cf4d..479ef8add 100644 --- a/xmake/modules/private/action/build/object.lua +++ b/xmake/modules/private/action/build/object.lua @@ -92,7 +92,15 @@ function _do_build_file(target, sourcefile, opt) -- update files and values to the dependent file dependinfo.values = depvalues - table.join2(dependinfo.files, sourcefile, target:pcoutputfile("cxx") or {}, target:pcoutputfile("c")) + table.insert(dependinfo.files, sourcefile) + local pcoutputfile = target:pcoutputfile("cxx") + if target:has_sourcekind("cxx") and pcoutputfile then + table.insert(dependinfo.files, pcoutputfile) + end + local pcoutputfile = target:pcoutputfile("c") + if target:has_sourcekind("cc") and pcoutputfile then + table.insert(dependinfo.files, pcoutputfile) + end depend.save(dependinfo, dependfile) end end |
