diff options
| author | Arthur LAURENT <[email protected]> | 2022-12-29 18:33:48 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2023-01-06 12:01:43 +0100 |
| commit | e3aa97b577dac58da1588c096140f178e53256cd (patch) | |
| tree | 793dff96c466b5a91dc016db8c1bfa1d8ef103dd /xmake/rules/c++/modules/modules_support/clang.lua | |
| parent | 4b83826396c3bef99e138e2c6b13e2a6f818f017 (diff) | |
add support of importing module from packages
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/clang.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang.lua | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua index 02d08e6b0..074ed331f 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -484,13 +484,18 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op if provide or common.has_module_extension(cppfile) then local bmifile = provide and provide.bmi - _build_modulefile(target, provide and provide.sourcefile or cppfile, { - objectfile = objectfile, - dependfile = target:dependfile(bmifile or objectfile), - provide = provide and {bmifile = bmifile, name = name}, - common_args = common_args, - requiresflags = requiresflags, - 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, provide and provide.sourcefile or cppfile, { + objectfile = objectfile, + dependfile = target:dependfile(bmifile or objectfile), + provide = provide and {bmifile = bmifile, name = name}, + common_args = common_args, + requiresflags = requiresflags, + progress = (index * 100) / total}) + end target:add("objectfiles", objectfile) if provide then |
