From c2e6fba79fc6ae2a1529ac571e8cce7d50ed7cfc Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 17 Aug 2022 22:40:11 +0800 Subject: add build.c++.modules policy --- xmake/rules/c++/modules/modules_support/common.lua | 3 +++ 1 file changed, 3 insertions(+) (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 aa7c0fb59..138c8e36f 100644 --- a/xmake/rules/c++/modules/modules_support/common.lua +++ b/xmake/rules/c++/modules/modules_support/common.lua @@ -139,6 +139,9 @@ end function contains_modules(target) -- 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 + target_with_modules = target:policy("build.c++.modules") + end if not target_with_modules then for _, dep in ipairs(target:orderdeps()) do local sourcebatches = dep:sourcebatches() -- cgit v1.3.1