summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/compiler.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/base/compiler.lua')
-rw-r--r--xmake/scripts/base/compiler.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/scripts/base/compiler.lua b/xmake/scripts/base/compiler.lua
index d9c3a7c5e..53d5a2e5d 100644
--- a/xmake/scripts/base/compiler.lua
+++ b/xmake/scripts/base/compiler.lua
@@ -362,7 +362,7 @@ function compiler.get(srcfile)
-- get the compiler kind
local kind = compiler._kind(srcfile)
if not kind then
- return
+ return nil, string.format("unknown source file: %s", srcfile)
end
-- get compiler from the source file type
@@ -371,11 +371,13 @@ function compiler.get(srcfile)
-- invalid compiler
if not module.command_compile then
- return
+ return nil, string.format("invalid compiler: %s", platform.tool(kind))
end
-- save kind
module._KIND = kind
+ else
+ return nil, string.format("not found compiler: %s", platform.tool(kind))
end
-- ok?