From cbf9452ce0bf312b6ddcc4ab4bcdf61553100a3c Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 14 Aug 2022 11:52:39 +0800 Subject: fix modules --- xmake/rules/c++/modules/modules_support/common.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xmake/rules/c++/modules/modules_support/common.lua') diff --git a/xmake/rules/c++/modules/modules_support/common.lua b/xmake/rules/c++/modules/modules_support/common.lua index 0bd1e20d8..aa7c0fb59 100644 --- a/xmake/rules/c++/modules/modules_support/common.lua +++ b/xmake/rules/c++/modules/modules_support/common.lua @@ -137,11 +137,12 @@ end -- this target contains module files? function contains_modules(target) - local target_with_modules = target:sourcebatches()["c++.build.modules.builder"] and true or false + -- we can not use `"c++.build.modules.builder"`, because it contains sourcekind/cxx. + local target_with_modules = target:sourcebatches()["c++.build.modules"] and true or false if not target_with_modules then for _, dep in ipairs(target:orderdeps()) do local sourcebatches = dep:sourcebatches() - if sourcebatches["c++.build.modules.builder"] then + if sourcebatches["c++.build.modules"] then target_with_modules = true break end -- cgit v1.3.1