[CMake] cmake, lex & yacc

Timur Ivanov timur.ivanov at gmail.com
Mon Jul 30 10:46:44 EDT 2007


Hello!

Sorry if it was discussed already but I can't find anything really
useful for me.

In current project I use lex & yacc and Makefile rules looks like:

YACC=bison
LEX=flex

config_yacc.c: config_yacc.y config.h
        $(YACC) -d -o config_yacc.c config_yacc.y

config_lex.c: config_lex.l config_yacc.c
        $(LEX) -oconfig_lex.c config_lex.l

then compile config_yacc.c and config_lex.c

Now I want to port all of that to cmake but can't find how to express
dependences for yacc and lex sources, that is if .y or .l file changes
proper .c file will be regenerated by yacc or lex.


More information about the CMake mailing list