diff options
| author | ruki <[email protected]> | 2017-11-08 00:14:34 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-11-07 19:27:30 +0800 |
| commit | 1dbc7da494ce9ac38795a5b31e9c3ebc250aa37c (patch) | |
| tree | b0d5128b4672d416260c65266cc9857cc5f54203 /xmake/platforms/checker.lua | |
| parent | c911900a035e04a301f938526c6d224fba14f46d (diff) | |
improve to detect toolchains on macOS
Diffstat (limited to 'xmake/platforms/checker.lua')
| -rw-r--r-- | xmake/platforms/checker.lua | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/xmake/platforms/checker.lua b/xmake/platforms/checker.lua index b38178a2b..b6c0b894c 100644 --- a/xmake/platforms/checker.lua +++ b/xmake/platforms/checker.lua @@ -116,7 +116,7 @@ function check_arch(config, default) end -- check the xcode application directory -function check_xcode_dir(config) +function check_xcode_dir(config, optional) -- get the xcode directory local xcode_dir = config.get("xcode_dir") @@ -131,7 +131,9 @@ function check_xcode_dir(config) -- trace cprint("checking for the Xcode application directory ... ${green}%s", xcode_dir) - else + + elseif not optional then + -- failed cprint("checking for the Xcode application directory ... ${red}no") cprint("${bright red}please run:") @@ -143,10 +145,10 @@ function check_xcode_dir(config) end -- check the xcode sdk version -function check_xcode_sdkver(config) +function check_xcode_sdkver(config, optional) -- get the xcode sdk version - local xcode_sdkver = config.get("xcode_sdkver") + local xcode_sdkver = config.get("xcode_sdkver") if not xcode_sdkver then -- check ok? update it @@ -158,7 +160,9 @@ function check_xcode_sdkver(config) -- trace cprint("checking for the Xcode SDK version for %s ... ${green}%s", config.get("plat"), xcode_sdkver) - else + + elseif not optional then + -- failed cprint("checking for the Xcode SDK version for %s ... ${red}no", config.get("plat")) cprint("${bright red}please run:") |
