CMake with Flex and Bison (Yacc) : ADD_CUSTOM_COMMAND
In case I can not google it again. Here is this informative post. Following is the verbatim copy of this email. # Create target for the parser ADD_CUSTOM_TARGET(FooParser echo “Creating parser.c”) # Create custom command for flex/lex (note the outputs) ADD_CUSTOM_COMMAND( SOURCE ${Foo_SOURCE_DIR}/src/lexer.l COMMAND ${FLEX_EXECUTABLE} ARGS -o${Foo_BINARY_DIR}/src/lexer.c ${Foo_SOURCE_DIR}/src/lexer.l TARGET FooParser OUTPUTS ${Foo_BINARY_DIR}/src/lexer.c) # Create custom …
CMake with Flex and Bison (Yacc) : ADD_CUSTOM_COMMAND Read More »