diff options
| author | Arthur LAURENT <[email protected]> | 2024-01-29 12:18:01 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2024-01-29 12:29:21 +0100 |
| commit | d50a83fbfcd59db2a8a5fc0f8fe14770f9a0d16b (patch) | |
| tree | f50ec6b8703586050df3fe37eb588cc9187ba5c4 /xmake/rules/c++/modules/modules_support/builder.lua | |
| parent | cb8b45ba6e641156ca2e7544cce901c749b9d30a (diff) | |
apply PR suggestions
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/builder.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/builder.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/modules_support/builder.lua b/xmake/rules/c++/modules/modules_support/builder.lua index 481415661..4592e547d 100644 --- a/xmake/rules/c++/modules/modules_support/builder.lua +++ b/xmake/rules/c++/modules/modules_support/builder.lua @@ -33,6 +33,8 @@ import("dependency_scanner") function _build_modules(target, sourcebatch, modules, opt) local objectfiles = dependency_scanner.sort_modules_by_dependencies(sourcebatch.objectfiles, modules) + compiler_support.memcache():set2(target:name(), "need_to_repopulate", false) + -- build modules for _, objectfile in ipairs(objectfiles) do local module = modules[objectfile] @@ -62,6 +64,9 @@ function _build_modules(target, sourcebatch, modules, opt) table.insert(deps, opt.batchjobs and target:name() .. dep or dep) end + if build then + compiler_support.memcache():set2(target:name(), "need_to_repopulate", true) + end opt.build_module(deps, build, module, name, provide, objectfile, cppfile, fileconfig) ::CONTINUE:: @@ -183,11 +188,15 @@ function _init_build_for(target, batch, modules, opt) return { modulemap_populatejob_name = { name = job_name, job = batch:addjob(job_name, function(index, total) - progress.show((index * 100) / total, "${color.build.target}<%s> populating.%s.map", target:name(), opt.type) + if compiler_support.memcache():get2(target:name(), "need_to_repopulate") then + progress.show((index * 100) / total, "${color.build.target}<%s> populating.%s.map", target:name(), opt.type) + end _builder(target).populate_module_map(target, modules) end)}} else - batch:show_progress(opt.progress, "${color.build.target}<%s> populating.%s.map", target:name(), opt.type) + if compiler_support.memcache():get2(target:name(), "need_to_repopulate") then + batch:show_progress(opt.progress, "${color.build.target}<%s> populating.%s.map", target:name(), opt.type) + end _builder(target).populate_module_map(target, modules) end end |
