diff options
| author | ruki <[email protected]> | 2024-11-23 21:49:31 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-11-23 22:26:22 +0800 |
| commit | 2d3b07d32233a0fa4b072dee4b0a25e530279723 (patch) | |
| tree | 31a059b3721869046c66bbd45cfca7a59ac7889d | |
| parent | 313e5138663cc9a3beb83aa036b2ebb97186f944 (diff) | |
improve build_files #5860
| -rw-r--r-- | xmake/actions/build/build_files.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/actions/build/build_files.lua b/xmake/actions/build/build_files.lua index 57b586173..f5604f0bd 100644 --- a/xmake/actions/build/build_files.lua +++ b/xmake/actions/build/build_files.lua @@ -80,8 +80,6 @@ function _add_batchjobs(batchjobs, rootjob, target, filepatterns) end if sourcecount > 0 then return object.add_batchjobs_for_sourcefiles(batchjobs, rootjob, target, newbatches) - else - return rootjob, rootjob end end @@ -106,8 +104,10 @@ function _add_batchjobs_for_target_and_deps(batchjobs, rootjob, jobrefs, target, local targetjob, targetjob_root = _add_batchjobs_for_target(batchjobs, rootjob, target, filepatterns) if targetjob and targetjob_root then jobrefs[target:name()] = targetjob_root - for _, depname in ipairs(target:get("deps")) do - _add_batchjobs_for_target_and_deps(batchjobs, targetjob, jobrefs, project.target(depname), filepatterns) + if not option.get("shallow") then + for _, depname in ipairs(target:get("deps")) do + _add_batchjobs_for_target_and_deps(batchjobs, targetjob, jobrefs, project.target(depname), filepatterns) + end end end end |
