summaryrefslogtreecommitdiff
path: root/xmake/modules/private/utils/rule_groups.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-04-22 00:36:27 +0800
committerruki <[email protected]>2023-04-22 00:36:27 +0800
commit1e31f3a9da25e2f2b287dc1b4462e71d53fabf80 (patch)
treefbb316f2561526f32b00879b5f19ef382c47365f /xmake/modules/private/utils/rule_groups.lua
parente3ce80f3ff6b7bfa5be75eb434b4ce6ccc18554c (diff)
improve cmakelists for rule order
Diffstat (limited to 'xmake/modules/private/utils/rule_groups.lua')
-rw-r--r--xmake/modules/private/utils/rule_groups.lua59
1 files changed, 0 insertions, 59 deletions
diff --git a/xmake/modules/private/utils/rule_groups.lua b/xmake/modules/private/utils/rule_groups.lua
index 65ecea104..f8f8181ec 100644
--- a/xmake/modules/private/utils/rule_groups.lua
+++ b/xmake/modules/private/utils/rule_groups.lua
@@ -48,65 +48,6 @@ function _get_rule_max_depth(target, ruleinst, depth)
return max_depth
end
--- has scripts for the custom rule
-function has_scripts_for_rule(ruleinst, suffix)
-
- -- add batch jobs for xx_build_files
- local scriptname = "build_files" .. (suffix and ("_" .. suffix) or "")
- local script = ruleinst:script(scriptname)
- if script then
- return true
- end
-
- -- add batch jobs for xx_build_file
- scriptname = "build_file" .. (suffix and ("_" .. suffix) or "")
- script = ruleinst:script(scriptname)
- if script then
- return true
- end
-
- -- add batch jobs for xx_buildcmd_files
- scriptname = "buildcmd_files" .. (suffix and ("_" .. suffix) or "")
- script = ruleinst:script(scriptname)
- if script then
- return true
- end
-
- -- add batch jobs for xx_buildcmd_file
- scriptname = "buildcmd_file" .. (suffix and ("_" .. suffix) or "")
- script = ruleinst:script(scriptname)
- if script then
- return true
- end
-end
-
--- has scripts for target
-function has_scripts_for_target(target, suffix)
- local scriptname = "build_files" .. (suffix and ("_" .. suffix) or "")
- local script = target:script(scriptname)
- if script then
- return true
- else
- scriptname = "build_file" .. (suffix and ("_" .. suffix) or "")
- script = target:script(scriptname)
- if script then
- return true
- end
- end
-end
-
--- has scripts for group
-function has_scripts_for_group(group, suffix)
- for _, item in pairs(group) do
- if item.target and has_scripts_for_target(item.target, suffix) then
- return true
- end
- if item.rule and has_scripts_for_rule(item.rule, suffix) then
- return true
- end
- end
-end
-
-- build sourcebatch groups for target
function _build_sourcebatch_groups_for_target(groups, target, sourcebatches)
local group = groups[1]