From c2e614548b92821c8396e2a2e9f06afeb97cc7bd Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 11 Jun 2015 21:56:03 +0800 Subject: optimizate to find tool script --- xmake/scripts/base/compiler.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xmake/scripts/base/compiler.lua') 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? -- cgit v1.3.1