summaryrefslogtreecommitdiff
path: root/xmake/modules/private/detect/find_platform.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-02-11 00:06:24 +0800
committerruki <[email protected]>2026-02-11 00:06:24 +0800
commitf9a18b3ce8bac2a91f0975d2965d07b724524923 (patch)
tree30869204b5070532e1447d3e2cec17fa224e0adf /xmake/modules/private/detect/find_platform.lua
parentee98b61be7054e1b8b8e2668b67c662ba12e264b (diff)
improve check tips
Diffstat (limited to 'xmake/modules/private/detect/find_platform.lua')
-rw-r--r--xmake/modules/private/detect/find_platform.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/xmake/modules/private/detect/find_platform.lua b/xmake/modules/private/detect/find_platform.lua
index 6df2da9fe..a94b5ade3 100644
--- a/xmake/modules/private/detect/find_platform.lua
+++ b/xmake/modules/private/detect/find_platform.lua
@@ -145,19 +145,26 @@ function main(opt)
-- find platform
opt = opt or {}
local plat = _find_plat(opt.plat)
+ local will_set_plat = false
if opt.global then
if not opt.plat and not config.get("plat") then
+ will_set_plat = true
config.set("plat", plat)
- cprint("checking for platform ... ${color.success}%s", plat)
end
end
-- find architecture
local arch = _find_arch(plat, opt.arch)
+ local will_set_arch = false
if opt.global then
if not opt.arch and not config.get("arch") then
+ will_set_arch = true
config.set("arch", arch)
- cprint("checking for architecture ... ${color.success}%s", arch)
+ end
+ end
+ if opt.global then
+ if will_set_plat or will_set_arch then
+ cprint("checking for platform ... ${color.success}%s (%s)", plat, arch)
end
end
return plat, arch