From afcfa7fcd5dd767ecd683cdd5bacea120cfc6270 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 18 Oct 2021 21:04:08 +0800 Subject: improve unity build --- xmake/rules/c++/unity_build/unity_build.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/rules/c++/unity_build/unity_build.lua b/xmake/rules/c++/unity_build/unity_build.lua index 82338f506..e28e5aff3 100644 --- a/xmake/rules/c++/unity_build/unity_build.lua +++ b/xmake/rules/c++/unity_build/unity_build.lua @@ -83,7 +83,7 @@ function main(target, sourcebatch) local fileconfig = target:fileconfig(sourcefile) if fileconfig and fileconfig.unity_group then sourcefile_unity = path.join(sourcedir, "unity_" .. fileconfig.unity_group .. path.extension(sourcefile)) - elseif fileconfig and fileconfig.unity_ignored then + elseif (fileconfig and fileconfig.unity_ignored) or (batchsize == 0) then -- we do not add these files to unity file table.insert(sourcefiles, sourcefile) table.insert(objectfiles, objectfile) -- cgit v1.3.1