[CMake] delayed target

Andrea Crotti andrea.crotti.0 at gmail.com
Thu Feb 23 05:13:20 EST 2012


On 02/23/2012 05:18 AM, Michael Hertling wrote:
>
> There is a possibility to dynamically reconfigure/rebuild the project
> without an intermediate manual step and in a way that you'll have one
> target per egg, but that approach is disadvantageous in other regards
> and possibly won't work with generators other than the Makefiles ones.
>
> IMO, if you really need one target per egg, you should gather them at
> configure time and accept the need to reconfigure the project by hand
> when necessary. If one target per egg isn't a must-do, gather them at
> build time and use a script - CMake, shell, whatever - to unzip them;
> this can be done well in parallel also.
>
> Regards,
>
>

What I could do to make it *really* idiot-proof also in my situation, is
to force a reconfiguration for every call.

I could for example add a target

add_target(reconfigure
   ${CMAKE_COMMAND} .
)

and make all the other targets depend on it.
So I'm sure that I never have to rerun cmake myself, how does that sound?


More information about the CMake mailing list