diff options
| author | Arthur LAURENT <[email protected]> | 2022-08-06 06:24:34 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2022-08-06 06:30:16 +0200 |
| commit | 57ac4f46f10e8525d4a5dec0e6c4c19f1ac35ab7 (patch) | |
| tree | 62bb082a332eb3f6443ee7f4ec56b029f773b926 /xmake/rules/c++/modules/modules_support/common.lua | |
| parent | b0379bcadce0b66fa5d3e5fc45d85a8ba365c92b (diff) | |
Implement module mapper file for MSVC
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/common.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/common.lua | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/xmake/rules/c++/modules/modules_support/common.lua b/xmake/rules/c++/modules/modules_support/common.lua index c91f52a9b..e5c8285b5 100644 --- a/xmake/rules/c++/modules/modules_support/common.lua +++ b/xmake/rules/c++/modules/modules_support/common.lua @@ -448,18 +448,19 @@ end function generate_headerunits_for_batchcmds(target, batchcmds, sourcebatch, modules, opt) -- get headerunits info - local headerunits, stl_headerunits = get_headerunits(target, sourcebatch, modules) + local user_headerunits, stl_headerunits = get_headerunits(target, sourcebatch, modules) -- generate headerunits -- build stl header units as other headerunits may need them - local headerunits_flags - if stl_headerunits then - headerunits_flags = headerunits_flags or {} + if stl_headerunits or user_headerunits then + local headerunits_flags = localcache():get("headerunits_flags") + if stl_headerunits then + modules_support(target).generate_stl_headerunits_for_batchcmds(target, batchcmds, stl_headerunits, opt) table.join2(headerunits_flags, modules_support(target).generate_stl_headerunits_for_batchcmds(target, batchcmds, stl_headerunits, opt)) - end - if headerunits then - headerunits_flags = headerunits_flags or {} - table.join2(headerunits_flags, modules_support(target).generate_user_headerunits_for_batchcmds(target, batchcmds, headerunits, opt)) + end + if user_headerunits then + modules_support(target).generate_user_headerunits_for_batchcmds(target, batchcmds, user_headerunits, opt) + end end return headerunits_flags end |
