Skip to content

Commit

Permalink
fix module batch
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Oct 3, 2024
1 parent 0505ce1 commit 392bfd7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xmake/rules/c++/modules/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ rule("c++.build.modules")
-- moduleonly modules are implicitly public
if target:is_moduleonly() then
local sourcebatch = target:sourcebatches()["c++.build.modules.builder"]
for _, sourcefile in ipairs(sourcebatch.sourcefiles) do
target:fileconfig_add(sourcefile, {public = true})
if sourcebatch then
for _, sourcefile in ipairs(sourcebatch.sourcefiles) do
target:fileconfig_add(sourcefile, {public = true})
end
end
end
end
Expand Down

0 comments on commit 392bfd7

Please sign in to comment.