summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support/builder.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/builder.lua')
-rw-r--r--xmake/rules/c++/modules/modules_support/builder.lua12
1 files changed, 3 insertions, 9 deletions
diff --git a/xmake/rules/c++/modules/modules_support/builder.lua b/xmake/rules/c++/modules/modules_support/builder.lua
index 7e51ad6f8..60e1112d8 100644
--- a/xmake/rules/c++/modules/modules_support/builder.lua
+++ b/xmake/rules/c++/modules/modules_support/builder.lua
@@ -464,19 +464,14 @@ end
-- check if dependencies changed
function is_dependencies_changed(target, module)
local cachekey = target:name() .. module.name
-
- local requires = hashset.new()
- for required, _ in table.orderpairs(module.requires) do
- requires:insert(required)
- end
-
+ local requires = hashset.from(table.keys(module.requires or {}))
local oldrequires = compiler_support.memcache():get2(cachekey, "oldrequires")
local changed = false
if oldrequires then
- if oldrequires ~= requires:size() then
+ if oldrequires ~= requires then
requires_changed = true
else
- for _, required in requires:keys() do
+ for required in requires:items() do
if not oldrequires:has(required) then
requires_changed = true
break
@@ -484,6 +479,5 @@ function is_dependencies_changed(target, module)
end
end
end
-
return requires, changed
end