From e3aa97b577dac58da1588c096140f178e53256cd Mon Sep 17 00:00:00 2001 From: Arthur LAURENT Date: Thu, 29 Dec 2022 18:33:48 +0100 Subject: add support of importing module from packages --- xmake/rules/c++/modules/modules_support/gcc.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'xmake/rules/c++/modules/modules_support/gcc.lua') 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)}) -- cgit v1.3.1