From 1e31f3a9da25e2f2b287dc1b4462e71d53fabf80 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 22 Apr 2023 00:36:27 +0800 Subject: improve cmakelists for rule order --- xmake/modules/private/utils/rule_groups.lua | 59 ----------------------------- 1 file changed, 59 deletions(-) (limited to 'xmake/modules/private/utils/rule_groups.lua') 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] -- cgit v1.3.1