summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support/msvc
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2024-01-31 13:02:11 +0100
committerArthur LAURENT <[email protected]>2024-01-31 13:45:43 +0100
commit89f151ab335ad2aa1e5d1cc900f1e3837caa6437 (patch)
tree51400158d69a54fafac973d4a7b8ca40ff540265 /xmake/rules/c++/modules/modules_support/msvc
parentf3ec9cc0f7cf6d0b48dce8a69c5f6103b9dd6df3 (diff)
add a test for aliased headerunits
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/msvc')
-rw-r--r--xmake/rules/c++/modules/modules_support/msvc/builder.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/xmake/rules/c++/modules/modules_support/msvc/builder.lua b/xmake/rules/c++/modules/modules_support/msvc/builder.lua
index 9b7bd330e..00326143e 100644
--- a/xmake/rules/c++/modules/modules_support/msvc/builder.lua
+++ b/xmake/rules/c++/modules/modules_support/msvc/builder.lua
@@ -123,7 +123,7 @@ function _get_requiresflags(target, module, opt)
assert(dep_module, "module dependency %s required for %s not found <%s>", required, name, target:name())
local mapflag
- local bmifile
+ local bmifile = dep_module.bmi
-- aliased headerunit
if dep_module.aliasof then
local aliased = get_from_target_mapper(target, dep_module.aliasof)
@@ -131,11 +131,9 @@ function _get_requiresflags(target, module, opt)
mapflag = {headerunitflag .. aliased.headerunit.type, required .. "=" .. bmifile}
-- headerunit
elseif dep_module.headerunit then
- bmifile = dep_module.bmi
mapflag = {headerunitflag .. dep_module.headerunit.type, required .. "=" .. bmifile}
-- named module
else
- bmifile = dep_module.bmi
mapflag = {referenceflag, required .. "=" .. bmifile}
end
table.insert(deps_flags, mapflag)