From 2d3b07d32233a0fa4b072dee4b0a25e530279723 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 23 Nov 2024 21:49:31 +0800 Subject: [PATCH] improve build_files #5860 --- xmake/actions/build/build_files.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xmake/actions/build/build_files.lua b/xmake/actions/build/build_files.lua index 57b5861732..f5604f0bda 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