From afa8d329edd2dda64ed15f29ce1498f7943b32db Mon Sep 17 00:00:00 2001 From: Arthur LAURENT Date: Fri, 16 May 2025 15:06:02 +0200 Subject: (C++ modules support) fix unitybuild, pch and c++ modules objectfiles conflicts --- xmake/rules/c++/modules/msvc/builder.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xmake/rules/c++/modules/msvc/builder.lua') diff --git a/xmake/rules/c++/modules/msvc/builder.lua b/xmake/rules/c++/modules/msvc/builder.lua index fa9c7021c..0fb17244b 100644 --- a/xmake/rules/c++/modules/msvc/builder.lua +++ b/xmake/rules/c++/modules/msvc/builder.lua @@ -43,7 +43,7 @@ function _make_modulebuildflags(target, module, opt) local bmionly = opt.bmi and not opt.objectfile local flags - if module.interface or module.implementation then -- named module + if module.name then -- named module flags = table.join("-TP", module.interface and interfaceflag or internalpartitionflag, bmionly and ifconlyflag or {}, ifcoutputflag, path(module.bmifile)) else flags = {"-TP"} @@ -258,7 +258,7 @@ function make_module_job(target, module, opt) elseif bmi then _compile_bmi_step(target, module, opt) else - if support.has_module_extension(module.sourcefile) or module.interface or module.implementation then + if support.has_module_extension(module.sourcefile) or module.name then _compile_objectfile_step(target, module, opt) else os.tryrm(module.objectfile) -- force rebuild for .cpp files @@ -287,7 +287,7 @@ function make_module_buildcmds(target, batchcmds, module, opt) elseif bmi then _compile_bmi_step(target, module, table.join(opt, {batchcmds = batchcmds})) else - if support.has_module_extension(module.sourcefile) or module.interface or module.implementation then + if support.has_module_extension(module.sourcefile) or module.name then _compile_objectfile_step(target, module, table.join(opt, {batchcmds = batchcmds})) else batchcmds:rm(module.objectfile) -- force rebuild for .cpp files -- cgit v1.3.1