[CMake] XCode generator and flex

Brad King brad.king at kitware.com
Thu May 5 10:32:45 EDT 2005


Karl Merkley wrote:
> I got the latest cvs version of cmake to try out the XCode generator on 
> my very complex project.   One of the first things I ran into was an 
> error related to a custom flex command.
> 
> ADD_CUSTOM_COMMAND(OUTPUT ${WORDLISTS_BINARY_DIR}/wordlist.cpp
>                    COMMAND flex
>                    ARGS -L -o${WORDLISTS_BINARY_DIR}/wordlist.cpp
>                         ${WORDLISTS_SOURCE_DIR}/wordlist.l
>                    MAIN_DEPENDENCY ${WORDLISTS_SOURCE_DIR}/wordlist.l
>                    )
> XCode recognizes wordlist.l as a sourcecode.lex file.  XCode attempts to 
> process this file but I don't end up with a wordlist.cpp output in the 
> correct place.   I get a wordlist.yy.c as the generated file.
> 
> Is this just not implemented?  Any ideas on how to fix this?

Try replacing MAIN_DEPENDENCY with DEPENDS.  The rule won't be 
associated directly with the .l file but it may solve the problem.  If 
so, it means the MAIN_DEPENDENCY is not implemented properly in this 
generator.  Either way, please submit this as a bug report here:

http://www.cmake.org/Bug

Thanks,
-Brad


More information about the CMake mailing list