summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support/gcc.lua
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2022-12-29 18:33:48 +0100
committerArthur LAURENT <[email protected]>2023-01-06 12:01:43 +0100
commite3aa97b577dac58da1588c096140f178e53256cd (patch)
tree793dff96c466b5a91dc016db8c1bfa1d8ef103dd /xmake/rules/c++/modules/modules_support/gcc.lua
parent4b83826396c3bef99e138e2c6b13e2a6f818f017 (diff)
add support of importing module from packages
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/gcc.lua')
-rw-r--r--xmake/rules/c++/modules/modules_support/gcc.lua15
1 files changed, 10 insertions, 5 deletions
diff --git a/xmake/rules/c++/modules/modules_support/gcc.lua b/xmake/rules/c++/modules/modules_support/gcc.lua
index f178e550a..acc06039f 100644
--- a/xmake/rules/c++/modules/modules_support/gcc.lua
+++ b/xmake/rules/c++/modules/modules_support/gcc.lua
@@ -445,11 +445,16 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op
end
if provide or common.has_module_extension(cppfile) then
- _build_modulefile(target, cppfile, {
- objectfile = objectfile,
- dependfile = dependfile,
- name = name or cppfile,
- progress = (index * 100) / total})
+ if not common.memcache():get2(name or cppfile, "compiling") then
+ if name and module.external then
+ common.memcache():set2(name or cppfile, "compiling", true)
+ end
+ _build_modulefile(target, cppfile, {
+ objectfile = objectfile,
+ dependfile = dependfile,
+ name = name or cppfile,
+ progress = (index * 100) / total})
+ end
target:add("objectfiles", objectfile)
end
end)})