summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-08-01 12:14:05 +0800
committerGitHub <[email protected]>2023-08-01 12:14:05 +0800
commitcb552e88c55f64f8beccfb1b2612998eb6dbde7c (patch)
tree10d45e6db072bc3fe92ecb4450fdafb50174946a
parente888f3f32af2306eb3b8d3b934be196e11430c22 (diff)
Update find_bison.lua
-rw-r--r--xmake/modules/detect/tools/find_bison.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/xmake/modules/detect/tools/find_bison.lua b/xmake/modules/detect/tools/find_bison.lua
index 56eda7dfe..fcea71574 100644
--- a/xmake/modules/detect/tools/find_bison.lua
+++ b/xmake/modules/detect/tools/find_bison.lua
@@ -38,13 +38,9 @@ import("lib.detect.find_programver")
function main(opt)
opt = opt or {}
local program = find_program(opt.program or "bison", opt)
-
- -- try win_bison if bison is not found on windows
- if not program and is_host("windows") then
+ if not program and not opt.program and is_host("windows") then
program = find_program("win_bison", opt)
end
-
- -- find program version
local version = nil
if program and opt and opt.version then
version = find_programver(program, opt)