summaryrefslogtreecommitdiff
path: root/xmake/core/project/target.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-02-18 21:41:52 +0800
committerGitHub <[email protected]>2024-02-18 21:41:52 +0800
commit3c1163b36e0817dbd5b62ec1ff495dc2e830d6ac (patch)
tree16f6cb664c031d80b1841e6978fc1d8753eb6761 /xmake/core/project/target.lua
parentcda48025005f9aa23bdd582e29bb0f1f1ca24d27 (diff)
parentbc1a30db6041c2c14ca79ccf0aa35b2d550e64e5 (diff)
Merge pull request #4673 from xmake-io/modules
Refactor modules support
Diffstat (limited to 'xmake/core/project/target.lua')
-rw-r--r--xmake/core/project/target.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index a1b2e414b..208054ff3 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -1228,9 +1228,14 @@ function _instance:is_headeronly()
return self:kind() == "headeronly"
end
+-- is moduleonly target?
+function _instance:is_moduleonly()
+ return self:kind() == "moduleonly"
+end
+
-- is library target?
function _instance:is_library()
- return self:is_static() or self:is_shared() or self:is_headeronly()
+ return self:is_static() or self:is_shared() or self:is_headeronly() or self:is_moduleonly()
end
-- is default target?
@@ -1587,7 +1592,7 @@ end
function _instance:filename()
-- no target file?
- if self:is_object() or self:is_phony() or self:is_headeronly() then
+ if self:is_object() or self:is_phony() or self:is_headeronly() or self:is_moduleonly() then
return
end