summaryrefslogtreecommitdiff
path: root/xmake/core/project/project.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/project/project.lua')
-rw-r--r--xmake/core/project/project.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua
index 5a069f644..043ff3cfa 100644
--- a/xmake/core/project/project.lua
+++ b/xmake/core/project/project.lua
@@ -417,7 +417,8 @@ function project._load_targets()
for _, sourcefile in ipairs(table.wrap(t:get("files"))) do
local extension = path.extension((sourcefile:gsub("|.*$", "")))
if not extensions[extension] then
- local lang = language.load_ex(extension)
+ local sourcekind = t:extraconf("files", sourcefile, "sourcekind")
+ local lang = sourcekind and language.load_sk(sourcekind) or language.load_ex(extension)
if lang and lang:rules() then
table.join2(rulenames, lang:rules())
end