diff options
| author | Arthur LAURENT <[email protected]> | 2022-12-29 19:04:22 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2023-01-06 12:01:43 +0100 |
| commit | 35cae5edfac1118b66a521363e1a07c90bc7d900 (patch) | |
| tree | 3b99ed507c963d3381e51c987796f766e35fa0c5 /xmake/rules/c++/modules/modules_support/gcc.lua | |
| parent | e3aa97b577dac58da1588c096140f178e53256cd (diff) | |
fix meta info generation on gcc and clang
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/gcc.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/gcc.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/xmake/rules/c++/modules/modules_support/gcc.lua b/xmake/rules/c++/modules/modules_support/gcc.lua index acc06039f..7659c9f8d 100644 --- a/xmake/rules/c++/modules/modules_support/gcc.lua +++ b/xmake/rules/c++/modules/modules_support/gcc.lua @@ -424,6 +424,24 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op end local moduleinfo = table.copy(provide) or {} local dependfile = (provide and provide.bmi) and target:dependfile(provide.bmi) or target:dependfile(objectfile) + + if provide then + local fileconfig = target:fileconfig(cppfile) + if fileconfig and fileconfig.install then + batchjobs:addjob(name .. "_metafile", function(index, total) + local cachedir = common.modules_cachedir(target) + local metafilepath = path.join(cachedir, path.filename(cppfile) .. ".meta-info") + depend.on_changed(function() + progress.show(opt.progress, "${color.build.object}generating.module.metadata %s", name) + local metadata = common.generate_meta_module_info(target, name, cppfile, module.requires) + json.savefile(metafilepath, metadata) + + end, {dependfile = target:dependfile(metafilepath), files = {cppfile}}) + + end, {rootjob = opt.rootjob}) + end + end + table.join2(moduleinfo, { name = name or cppfile, deps = table.keys(module.requires or {}), |
