ecbuild_generate_yy

Process lex/yacc files.

ecbuild_generate_yy( YYPREFIX <prefix>
                     YACC <file>
                     LEX <file>
                     DEPENDANT <file1> [ <file2> ... ]
                     [ SOURCE_DIR <dir> ]
                     [ OUTPUT_DIRECTORY <dir> ]
                     [ YACC_TARGET <file> ]
                     [ LEX_TARGET <file> ]
                     [ YACC_FLAGS <flags> ]
                     [ LEX_FLAGS <flags> ]
                     [ BISON_FLAGS <flags> ]
                     [ FLEX_FLAGS <flags> ] )

Options

YYPREFIXrequired

prefix to use for file and function names

YACCrequired

base name of the yacc source file (without .y extension)

LEXrequired

base name of the lex source file (without .l extension)

DEPENDANTrequired

list of files which depend on the generated lex and yacc target files At least one should be an existing source file (not generated itself).

SOURCE_DIRoptional, defaults to CMAKE_CURRENT_SOURCE_DIR

directory where yacc and lex source files are located

OUTPUT_DIRECTORYoptional, defaults to CMAKE_CURRENT_BINARY_DIR

output directory for yacc and lex target files

YACC_TARGEToptional, defaults to YACC

base name of the generated yacc target file (without .c extension)

LEX_TARGEToptional, defaults to LEX

base name of the generated lex target file (without .c extension)

YACC_FLAGSoptional, defaults to -t

flags to pass to yacc executable

LEX_FLAGSoptional

flags to pass to lex executable

BISON_FLAGSoptional, defaults to -t

flags to pass to bison executable

FLEX_FLAGSoptional, defaults to -l

flags to pass to flex executable