summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/xmake.lua
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2022-08-09 06:56:47 +0200
committerArthur LAURENT <[email protected]>2022-08-10 16:52:51 +0200
commit172d2c7fcd0bf09fb24d286df3d2da5b556c291b (patch)
treebfcb02144ece8e29236a050c647d5fb98a45da91 /xmake/rules/c++/modules/xmake.lua
parent334a540681025ad0d71fc5f390252c4879593858 (diff)
Avoid building a same header unit at the same time
Diffstat (limited to 'xmake/rules/c++/modules/xmake.lua')
-rw-r--r--xmake/rules/c++/modules/xmake.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/rules/c++/modules/xmake.lua b/xmake/rules/c++/modules/xmake.lua
index 23f9a0f77..05d7a76e9 100644
--- a/xmake/rules/c++/modules/xmake.lua
+++ b/xmake/rules/c++/modules/xmake.lua
@@ -61,10 +61,16 @@ rule("c++.build.modules.builder")
import("modules_support.common")
local sourcebatch = target:sourcebatches()["c++.build.modules.builder"]
common.patch_sourcebatch(target, sourcebatch, opt)
+
+ -- generate headerunits
local modules = common.get_module_dependencies(target, sourcebatch, opt)
batchjobs:group_enter(target:name() .. "/generate_headerunits")
common.generate_headerunits_for_batchjobs(target, batchjobs, sourcebatch, modules, opt)
job = batchjobs:group_leave()
+
+ -- append module mapper flags
+ local cache = common.localcache():get("mapflags") or {}
+ target:add("cxxflags", cache, {force = true})
end
return job or opt.rootjob
end, {batch = true})