summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-11-15 22:33:02 +0800
committerruki <[email protected]>2024-11-15 22:33:02 +0800
commit2a8211ad79a8aaa7a053272eb4aa8c9ec9bb6ed9 (patch)
tree3c2c850e13c98eca9c0ddf4d27f69daead8acfc2
parent5f5f87b1c089f2362087af9f2d8a516566560b3c (diff)
improve warnings for find_vstudio again
-rw-r--r--xmake/modules/detect/sdks/find_vstudio.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua
index 69d8613b7..41c019439 100644
--- a/xmake/modules/detect/sdks/find_vstudio.lua
+++ b/xmake/modules/detect/sdks/find_vstudio.lua
@@ -19,6 +19,7 @@
--
-- imports
+import("core.base.option")
import("core.project.config")
import("lib.detect.find_file")
import("lib.detect.find_tool")
@@ -154,8 +155,8 @@ function _load_vcvarsall(vcvarsall, vsver, arch, opt)
-- run genvcvars.bat
local outdata, errdata = try {function () return os.iorun(genvcvars_bat) end}
- if errdata then
- wprint("get vcvars error: %s", errdata)
+ if errdata and option.get("verbose") and option.get("diagnosis") then
+ cprint("${color.warning}checkinfo: ${clear dim}get vcvars error: %s", errdata)
end
if not outdata then
return