Using the -t command line to bison instead of %name-prefix
Needed to compile on machines with older bison versions. Adding a new parameter "name_prefix" to RUN_BISON() cmake macro.
This commit is contained in:
parent
191f262600
commit
75d1962a24
@ -40,7 +40,7 @@ ELSEIF(BISON_EXECUTABLE AND NOT BISON_USABLE)
|
||||
ENDIF()
|
||||
|
||||
# Use bison to generate C++ and header file
|
||||
MACRO (RUN_BISON input_yy output_cc output_h)
|
||||
MACRO (RUN_BISON input_yy output_cc output_h name_prefix)
|
||||
IF(BISON_TOO_OLD)
|
||||
IF(EXISTS ${output_cc} AND EXISTS ${output_h})
|
||||
SET(BISON_USABLE FALSE)
|
||||
@ -50,7 +50,7 @@ MACRO (RUN_BISON input_yy output_cc output_h)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${output_cc}
|
||||
${output_h}
|
||||
COMMAND ${BISON_EXECUTABLE} -y
|
||||
COMMAND ${BISON_EXECUTABLE} -y -p ${name_prefix}
|
||||
--output=${output_cc}
|
||||
--defines=${output_h}
|
||||
${input_yy}
|
||||
|
@ -279,12 +279,14 @@ RUN_BISON(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sql_yacc.yy
|
||||
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.h
|
||||
MYSQL
|
||||
)
|
||||
|
||||
RUN_BISON(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sql_yacc_ora.yy
|
||||
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.cc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.h
|
||||
ORA
|
||||
)
|
||||
|
||||
# Gen_lex_hash
|
||||
|
@ -852,7 +852,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
||||
%}
|
||||
|
||||
%pure-parser /* We have threads */
|
||||
%name-prefix "MYSQL"
|
||||
%parse-param { THD *thd }
|
||||
%lex-param { THD *thd }
|
||||
/*
|
||||
|
@ -270,7 +270,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
||||
%}
|
||||
|
||||
%pure-parser /* We have threads */
|
||||
%name-prefix "ORA"
|
||||
%parse-param { THD *thd }
|
||||
%lex-param { THD *thd }
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user