summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/unity_build
diff options
context:
space:
mode:
authorruki <[email protected]>2022-06-30 22:35:48 +0800
committerruki <[email protected]>2022-06-30 09:36:35 +0800
commit4c352130e376592dab4ec8724001c8df7d9d924d (patch)
tree0d3a20bdd45892267f301c3e3bbea01e8fa7134d /xmake/rules/c++/unity_build
parent2b30eff4ddbbcc2462ed075fc40b39ecd360240b (diff)
improve unity build
Diffstat (limited to 'xmake/rules/c++/unity_build')
-rw-r--r--xmake/rules/c++/unity_build/unity_build.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/rules/c++/unity_build/unity_build.lua b/xmake/rules/c++/unity_build/unity_build.lua
index 5e7a14598..ad93753c0 100644
--- a/xmake/rules/c++/unity_build/unity_build.lua
+++ b/xmake/rules/c++/unity_build/unity_build.lua
@@ -73,6 +73,11 @@ end
--
function main(target, sourcebatch)
+ -- we cannot generate unity build files in project generator
+ if os.getenv("XMAKE_IN_PROJECT_GENERATOR") then
+ return
+ end
+
-- get unit batch sources
local extraconf = target:extraconf("rules", sourcebatch.sourcekind == "cxx" and "c++.unity_build" or "c.unity_build")
local batchsize = extraconf and extraconf.batchsize