diff options
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/project.lua | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/base/project.lua b/src/base/project.lua index 261f0fa..6a41c54 100644 --- a/src/base/project.lua +++ b/src/base/project.lua @@ -611,54 +611,3 @@ function premake.isdotnetproject(prj) return (prj.language == "C#") end - - - --- --- Walk the list of source code files, breaking them into "groups" based --- on the directory hierarchy. --- - - local function walksources(cfg, fn, group, nestlevel, finished) - local grouplen = group:len() - local gname = iif(group:endswith("/"), group:sub(1, -2), group) - - -- open this new group - if (nestlevel >= 0) then - fn(cfg, gname, "GroupStart", nestlevel) - end - - -- scan the list of files for items which belong in this group - for _,fname in ipairs(cfg.files) do - if (fname:startswith(group)) then - - -- is there a subgroup within this item? - local _,split = fname:find("[^\.]/", grouplen + 1) - if (split) then - local subgroup = fname:sub(1, split) - if (not finished[subgroup]) then - finished[subgroup] = true - walksources(cfg, fn, subgroup, nestlevel + 1, finished) - end - end - - end - end - - -- process all files that belong in this group - for _,fname in ipairs(cfg.files) do - if (fname:startswith(group) and not fname:find("[^\.]/", grouplen + 1)) then - fn(cfg, fname, "GroupItem", nestlevel + 1) - end - end - - -- close the group - if (nestlevel >= 0) then - fn(cfg, gname, "GroupEnd", nestlevel) - end - end - - - function premake.walksources(cfg, fn) - walksources(cfg, fn, "", -1, {}) - end |