We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e478170 commit 8913eedCopy full SHA for 8913eed
1 file changed
src/cmake/flexbison.cmake
@@ -21,9 +21,14 @@
21
# MacOS/xcode in /usr/bin, which seems to be too old for the reentrant
22
# parser directives we use. Only do this if there is no BISON_ROOT
23
# specifying a particular Bison to use.
24
-if (APPLE AND EXISTS /usr/local/opt
25
- AND NOT BISON_ROOT AND NOT DEFINED ENV{BISON_ROOT})
26
- find_program(BISON_EXECUTABLE NAMES /usr/local/opt/bison/bin/bison
+if (APPLE AND NOT BISON_ROOT AND NOT DEFINED ENV{BISON_ROOT}
+ AND (EXISTS /usr/local/opt OR EXISTS /opt/homebrew
+ OR DEFINED ENV{HOMEBREW_PREFIX}))
27
+ find_program(BISON_EXECUTABLE
28
+ NAMES
29
+ ENV{HOMEBREW_PREFIX}/opt/bison/bin/bison
30
+ /opt/homebrew/opt/bison/bin/bison
31
+ /usr/local/opt/bison/bin/bison
32
DOC "path to the bison executable")
33
endif()
34
0 commit comments