summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/compiler.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-11 21:56:03 +0800
committerruki <[email protected]>2015-06-11 21:56:03 +0800
commitc2e614548b92821c8396e2a2e9f06afeb97cc7bd (patch)
treeea54e043c6f065fce7a778e459440d138a075b54 /xmake/scripts/base/compiler.lua
parent5198147b0b71e43883f4454eaabecfec9b8f9c74 (diff)
optimizate to find tool script
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?