diff options
Diffstat (limited to 'xmake/rules/c++/modules/mapper.lua')
| -rw-r--r-- | xmake/rules/c++/modules/mapper.lua | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/xmake/rules/c++/modules/mapper.lua b/xmake/rules/c++/modules/mapper.lua index db709192c..d8e9075b4 100644 --- a/xmake/rules/c++/modules/mapper.lua +++ b/xmake/rules/c++/modules/mapper.lua @@ -85,16 +85,18 @@ function feed(target, modules, sourcefiles) local reused, from = support.is_reused(target, sourcefile) if reused then local module = get(from, sourcefile) - mapper[module.name] = module - for dep_name, dep_module in pairs(module.deps) do - if dep_module.headerunit then - local key = dep_name .. dep_module.key - mapper[key] = get(from, key) - local sourcefile = mapper[key].sourcefile - mapper[sourcefile .. dep_module.key] = table.clone(mapper[key]) - mapper[sourcefile .. dep_module.key].alias = false - end - end + if module.name then + mapper[module.name] = module + for dep_name, dep_module in pairs(module.deps) do + if dep_module.headerunit then + local key = dep_name .. dep_module.key + mapper[key] = get(from, key) + local sourcefile = mapper[key].sourcefile + mapper[sourcefile .. dep_module.key] = table.clone(mapper[key]) + mapper[sourcefile .. dep_module.key].alias = false + end + end + end end end end |
