summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/scanner.lua
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2025-08-14 21:00:23 +0200
committerArthur LAURENT <[email protected]>2025-08-14 21:00:23 +0200
commitde2dd38726f49b8bdedd17641486a3d3a39907aa (patch)
treee301452350975a3f634b0ec84023a5ee9091e437 /xmake/rules/c++/modules/scanner.lua
parent84fcc1fd63aec5b6126f35806305326e4ecb936f (diff)
fix(c++ modules) fix disabled target getting configured for module compilation
Diffstat (limited to 'xmake/rules/c++/modules/scanner.lua')
-rw-r--r--xmake/rules/c++/modules/scanner.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/scanner.lua b/xmake/rules/c++/modules/scanner.lua
index ff1c0f700..6f3e88252 100644
--- a/xmake/rules/c++/modules/scanner.lua
+++ b/xmake/rules/c++/modules/scanner.lua
@@ -527,7 +527,6 @@ function _do_computedag(target, modules, sourcebatch)
localcache:save()
end
profiler.leave(target:fullname(), "c++ modules", "scanner", "compute dag")
- -- jobgraph:dump()
end
function _do_scan(target, sourcefile, opt)
@@ -897,7 +896,7 @@ end
function get_modules(target)
local modules = support.localcache():get2(target:fullname(), "c++.modules")
- assert(modules, "no modules!")
+ assert(modules, "no modules! (" .. target:fullname() .. ")")
return modules
end
@@ -932,6 +931,12 @@ function main(target, jobgraph, sourcebatch)
profiler.enter(target:fullname(), "c++ modules", "scanner", "scan")
local compile_commands = os.getenv("XMAKE_IN_PROJECT_GENERATOR") and os.getenv("XMAKE_IN_COMPILE_COMMANDS_PROJECT_GENERATOR")
if target:data("cxx.has_modules") and (not os.getenv("XMAKE_IN_PROJECT_GENERATOR") or compile_commands) then
+ local memcache = support.memcache()
+ local targets = memcache:get("targets") or {}
+ targets[target:fullname()] = {}
+ targets[target:fullname()].finished_parsing = false
+ memcache:set("targets", targets)
+
_patch_sourcebatch(target, sourcebatch)
_schedule_module_dependencies_scan(target, jobgraph, sourcebatch)
end