diff options
| author | Arthur LAURENT <[email protected]> | 2025-05-13 20:21:51 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2025-05-13 20:21:51 +0200 |
| commit | 1dcfa0d95ee2cbe521b707cec7e142d8706570ff (patch) | |
| tree | 3bcf8df725b306a1b36164dd60920ef041f464cf /xmake/rules/c++/modules/scanner.lua | |
| parent | 5a580f088db2e75271f133e68d549102fa334486 (diff) | |
(C++ modules support) fix _patch_sourcebatch when a dep have a namespace
Diffstat (limited to 'xmake/rules/c++/modules/scanner.lua')
| -rw-r--r-- | xmake/rules/c++/modules/scanner.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/scanner.lua b/xmake/rules/c++/modules/scanner.lua index 263b5725a..d0d197ab4 100644 --- a/xmake/rules/c++/modules/scanner.lua +++ b/xmake/rules/c++/modules/scanner.lua @@ -296,7 +296,11 @@ function _get_targetdeps_modules(target) fileconfig.undefines = table.join(fileconfig.undefines or {}, dep:get("undefines") or {}) fileconfig.includedirs = table.join(fileconfig.includedirs or {}, dep:get("includedirs") or {}) if not dep:is_phony() then - fileconfig.external = dep:fullname() + if target:namespace() == dep:namespace() then + fileconfig.external = dep:name() + else + fileconfig.external = dep:fullname() + end fileconfig.bmionly = not dep:is_moduleonly() end if not modules[sourcefile] then @@ -358,6 +362,7 @@ function _patch_sourcebatch(target, sourcebatch) local strict = target:policy("build.c++.modules.reuse.strict") or target:policy("build.c++.modules.tryreuse.discriminate_on_defines") local dep = target:dep(fileconfig.external) + assert(dep, format("dep target <%s> for <%s>", fileconfig.external, target:fullname())) local can_reuse = nocheck or _are_flags_compatible(target, dep, sourcefile, {strict = strict}) if can_reuse then |
