summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2020-03-04 00:37:20 +0800
committerruki <[email protected]>2020-03-03 21:44:02 +0800
commit09c073b1f36aaad61dccd02dafe2a4097ffbee67 (patch)
treef553167fc4457476c9bdf3cd0c077c1106b0103a /xmake/modules
parent35fd0056a576861e1e26d21fd7ffe8a8682d7c61 (diff)
fix global config
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/private/platform/check_vstudio.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/xmake/modules/private/platform/check_vstudio.lua b/xmake/modules/private/platform/check_vstudio.lua
index 6f4e8bab8..6657e43ea 100644
--- a/xmake/modules/private/platform/check_vstudio.lua
+++ b/xmake/modules/private/platform/check_vstudio.lua
@@ -76,8 +76,8 @@ function _check_vsenv(config)
end
end
--- check the visual stdio
-function main(config)
+-- check the visual studio
+function main(config, opt)
-- attempt to check the given vs version first
local vs = _check_vsenv(config)
@@ -91,10 +91,12 @@ function main(config)
else
-- failed
cprint("checking for the Microsoft Visual Studio (%s) version ... ${color.nothing}${text.nothing}", config.get("arch"))
- print("please run:")
- print(" - xmake config --vs=xxx [--vs_toolset=xxx]")
- print("or - xmake global --vs=xxx")
- raise()
+ if not (opt and opt.try) then
+ print("please run:")
+ print(" - xmake config --vs=xxx [--vs_toolset=xxx]")
+ print("or - xmake global --vs=xxx")
+ raise()
+ end
end
end