58 lines
2.1 KiB
Diff
58 lines
2.1 KiB
Diff
--- a/Modules/FindBISON.cmake 2022-11-30 14:57:03.000000000 +0100
|
|
+++ b/Modules/FindBISON.cmake 2022-12-16 19:47:44.417533396 +0100
|
|
@@ -5,15 +5,15 @@
|
|
FindBISON
|
|
---------
|
|
|
|
-Find ``bison`` executable and provide a macro to generate custom build rules.
|
|
+Find ``bison/byacc`` executable and provide a macro to generate custom build rules.
|
|
|
|
The module defines the following variables:
|
|
|
|
``BISON_EXECUTABLE``
|
|
- path to the ``bison`` program
|
|
+ path to the ``bison/byacc`` program
|
|
|
|
``BISON_VERSION``
|
|
- version of ``bison``
|
|
+ version of ``bison/byacc``
|
|
|
|
``BISON_FOUND``
|
|
"True" if the program was found
|
|
@@ -77,7 +77,7 @@
|
|
The header file generated by bison
|
|
|
|
``BISON_<Name>_OUTPUTS``
|
|
- All files generated by bison including the source, the header and the report
|
|
+ All files generated by bison/byacc including the source, the header and the report
|
|
|
|
``BISON_<Name>_COMPILE_FLAGS``
|
|
Options used in the ``bison`` command line
|
|
@@ -92,7 +92,7 @@
|
|
add_executable(Foo main.cpp ${BISON_MyParser_OUTPUTS})
|
|
#]=======================================================================]
|
|
|
|
-find_program(BISON_EXECUTABLE NAMES bison win-bison win_bison DOC "path to the bison executable")
|
|
+find_program(BISON_EXECUTABLE NAMES bison win_bison byacc yacc DOC "path to the bison/byacc executable")
|
|
mark_as_advanced(BISON_EXECUTABLE)
|
|
|
|
if(BISON_EXECUTABLE)
|
|
@@ -101,7 +101,7 @@
|
|
set(_Bison_SAVED_LC_ALL "$ENV{LC_ALL}")
|
|
set(ENV{LC_ALL} C)
|
|
|
|
- execute_process(COMMAND ${BISON_EXECUTABLE} --version
|
|
+ execute_process(COMMAND ${BISON_EXECUTABLE} -V
|
|
OUTPUT_VARIABLE BISON_version_output
|
|
ERROR_VARIABLE BISON_version_error
|
|
RESULT_VARIABLE BISON_version_result
|
|
@@ -110,7 +110,7 @@
|
|
set(ENV{LC_ALL} ${_Bison_SAVED_LC_ALL})
|
|
|
|
if(NOT ${BISON_version_result} EQUAL 0)
|
|
- message(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}")
|
|
+ message(SEND_ERROR "Command \"${BISON_EXECUTABLE} -V\" failed with output:\n${BISON_version_error}")
|
|
else()
|
|
# Bison++
|
|
if("${BISON_version_output}" MATCHES "^bison\\+\\+ Version ([^,]+)")
|