[CMake] Generating Source Files
Jeremy Cowgar
jeremy at cowgar.com
Wed Apr 8 17:50:42 EDT 2009
Bill Hoffman wrote:
> ******** This is what you left out **********
> ******** We have to make sure cmake re-runs when
> ******** input files to this change, the only way
> ******** to do that is to use them as an input to cmake
> # now make parser.e an input to cmake, so that cmake will
> # re-run when make is run and parser.e changes
> configure_file(parser.e parser.e.flagfile)
Ah! That caused it to work. I'm terribly sorry about that. Now, I have
just one more question, hopefully, about this whole process. parser.e is
only one of the files that could possibly trigger a retranslation. The
entire list is:
SET( EU_CORE_FILES common.e emit.e error.e fwdref.e global.e inline.e
keylist.e main.e mode.e
opnames.e parser.e pathopen.e reswords.e scanner.e scinot.e shift.e
symtab.e )
Should I make each one of those a CONFIGURE_FILE() ?
Also, if I could offer a suggestion, maybe it's harder than it sounds,
but on your ADD_CUSTOM_COMMAND, this whole process would be much, much,
much simpler if you had the ability to run, say a MACRO() after the
custom command is done building. If I could do that, I would simply
create a macro that does FILE( GLOB EU_INT_FILES interpreter/*.c ) or
something to that effect.
Jeremy
More information about the CMake
mailing list