[CMake] delayed target

Andrea Crotti andrea.crotti.0 at gmail.com
Wed Feb 22 17:55:49 EST 2012


On 02/22/2012 09:37 PM, Michael Hertling wrote:
>
> In order to define one target per egg, you'd need to know the eggs at
> configuration time since you cannot define targets at build time. So,
> gathering the eggs with a custom target/command will not work. As an
> alternative, you might gather the eggs at configuration time with a
> FILE(GLOB ...) command, loop over the resulting list and define one
> target per item. However, your Makefiles would not be aware of any
> changes among the eggs - additions, removals, renamings - and you
> would need to remember to reconfigure your project by hand if you
> don't want to miss any changes. That's somewhat error-prone and
> means relinquishing one of CMake's benefits.
>
> Regards,
>
> Michael
> -
Yes sure when there are changes in that sense we need to reconfigure,
but it's really not a big deal in our case because it won't almost never 
happen,
and anyway I don't really have any other choice if I want to use the 
parallelization
provided by make -j.


More information about the CMake mailing list