[CMake] Generating files during building

Brandon Van Every bvanevery at gmail.com
Wed May 30 21:02:48 EDT 2007


On 5/30/07, Gustavo <glab at iol.pt> wrote:
>
> Due to a limitation of the compiler used, I need to split one of the
> (generated) source files into N pieces of a maximum size. These all have the
> same filename, ending in a number up to N.
>
> Since the sourcefile is generated, the number of files created is
> unpredictable and unknown until it is processed.

How many of these sourcefiles do you have?  If only a few, you could
probably do something easier than if there are tons and tons of them.

> All these N files should be compiled into a .o file each, and linked to the
> main binary in the end.

Finding .o files is a real PITA.  So, you're going to want to generate
your .c files, figure out which .c files you actually have, then do
CMake as usual.


Cheers,
Brandon Van Every


More information about the CMake mailing list