diff options
| author | ruki <[email protected]> | 2025-08-06 23:23:32 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-08-06 23:23:32 +0800 |
| commit | 30200cba21674a06566c3da913cc7c57f5fd4752 (patch) | |
| tree | 2c5aeb0b054dc127d5d6a31d46898a4b7688f573 | |
| parent | 973082f48ff11a714de9e1859d3349755375e955 (diff) | |
fix config targets
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/project/project.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/private/action/build/target.lua | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/xmake/core/sandbox/modules/import/core/project/project.lua b/xmake/core/sandbox/modules/import/core/project/project.lua index ae185dc2c..d28fde282 100644 --- a/xmake/core/sandbox/modules/import/core/project/project.lua +++ b/xmake/core/sandbox/modules/import/core/project/project.lua @@ -139,7 +139,9 @@ end -- function sandbox_core_project._config_targets(opt) import("private.action.build.target", {alias = "target_buildutils"}) - local targets_root = target_buildutils.get_root_targets() + + -- we need to config all targets (contains non-default targets) + local targets_root = target_buildutils.get_root_targets(nil, {all = true}) target_buildutils.run_targetjobs(targets_root, {job_kind = "config", job_opt = opt}) end diff --git a/xmake/modules/private/action/build/target.lua b/xmake/modules/private/action/build/target.lua index bd5730e1c..0116dcd6f 100644 --- a/xmake/modules/private/action/build/target.lua +++ b/xmake/modules/private/action/build/target.lua @@ -747,13 +747,14 @@ function get_root_targets(targetnames, opt) end end else + local all = opt.all local group_pattern = opt.group_pattern local depset = hashset.new() local targets = {} for _, target in ipairs(project.ordertargets()) do if target:is_enabled() then local group = target:get("group") - if (target:is_default() and not group_pattern) or option.get("all") or (group_pattern and group and group:match(group_pattern)) then + if (target:is_default() and not group_pattern) or all or option.get("all") or (group_pattern and group and group:match(group_pattern)) then for _, depname in ipairs(target:get("deps")) do depset:insert(depname) end |
