diff options
| author | Arthur LAURENT <[email protected]> | 2025-08-12 11:33:34 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2025-08-12 11:35:11 +0200 |
| commit | d7fbdd461df84c443c325b15f1a2bf95d7dbe67a (patch) | |
| tree | 910ba37a8dc8d35d7025961c3f22213b513d39b6 /xmake/rules/c++/modules/scanner.lua | |
| parent | 4f16fd80688304613bdb06e26f8f02bc30183b32 (diff) | |
fix(c++ modules) fix xmake not updating module mapper when module file is removed
Diffstat (limited to 'xmake/rules/c++/modules/scanner.lua')
| -rw-r--r-- | xmake/rules/c++/modules/scanner.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/scanner.lua b/xmake/rules/c++/modules/scanner.lua index cd23746e2..ff1c0f700 100644 --- a/xmake/rules/c++/modules/scanner.lua +++ b/xmake/rules/c++/modules/scanner.lua @@ -374,6 +374,7 @@ function _patch_sourcebatch(target, sourcebatch) keys = keys .. (#externalmodules > 0 and table.concat(table.orderkeys(externalmodules)) or " ") local md5sum = hash.md5(bytes(keys)) local localcache = support.localcache() + local cached_patched_sourcebatch = localcache:get2(target:fullname(), "patched_sourcebatch") if not cached_patched_sourcebatch or md5sum ~= cached_patched_sourcebatch.md5sum then local reuse = target:policy("build.c++.modules.reuse") or @@ -403,7 +404,6 @@ function _patch_sourcebatch(target, sourcebatch) end table.insert(sourcebatch.sourcefiles, sourcefile) target:fileconfig_add(sourcefile, fileconfig) - memcache:set2(target:fullname(), "modules.changed", true) end sourcebatch.sourcekind = "cxx" sourcebatch.objectfiles = {} @@ -416,6 +416,7 @@ function _patch_sourcebatch(target, sourcebatch) table.insert(sourcebatch.dependfiles, dependfile) end localcache:set2(target:fullname(), "patched_sourcebatch", {sourcefiles = sourcebatch.sourcefiles, dependfiles = sourcebatch.dependfiles, reused = reused, md5sum = md5sum}) + memcache:set2(target:fullname(), "modules.changed", true) else local reused = hashset.from(cached_patched_sourcebatch.reused) for sourcefile, fileconfig in pairs(externalmodules) do |
