From e0a66639122aef90577f67a1e2b7de664fe31e89 Mon Sep 17 00:00:00 2001 From: Jérôme Leclercq Date: Sat, 11 Dec 2021 23:44:24 +0100 Subject: Project: fix common flag search was wrongly handling the case where a flag was present multiple times --- xmake/plugins/project/make/makefile.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmake/plugins/project/make/makefile.lua') diff --git a/xmake/plugins/project/make/makefile.lua b/xmake/plugins/project/make/makefile.lua index f9f0581c0..601f920c9 100644 --- a/xmake/plugins/project/make/makefile.lua +++ b/xmake/plugins/project/make/makefile.lua @@ -109,7 +109,7 @@ function _make_common_flags(target, sourcekind, sourcebatch) -- make common flags local commonflags = {} for _, flag in ipairs(first_flags) do - if flags_stats[flag] == files_count then + if flags_stats[flag] >= files_count then table.insert(commonflags, flag) end end @@ -119,7 +119,7 @@ function _make_common_flags(target, sourcekind, sourcebatch) for sourcefile, flags in pairs(sourceflags) do local otherflags = {} for _, flag in ipairs(flags) do - if flags_stats[flag] ~= files_count then + if flags_stats[flag] < files_count then table.insert(otherflags, flag) end end -- cgit v1.3.1