[cmake-developers] Developer tasks - Refactoring

Daniel Pfeifer daniel at pfeifer-mail.de
Wed Sep 7 16:52:06 EDT 2016


On Wed, Feb 10, 2016 at 12:12 AM, Stephen Kelly <steveire at gmail.com> wrote:
> 3) Compute cmGeneratorTarget state non-lazily in its constructor.
> * Historically target state for generators was computed lazily because it
>   might need to be cleared and re-computed.  That is no-longer true.

SourceFilesMap is cleared in a call to AddSource. It is then
recomputed the next time GetSourceFiles is called.

> * For example, the LinkInformation is populated lazily in
>   cmGeneratorTarget::GetLinkInformation.
> * Instead the LinkInformation could be populated in the cmGeneratorTarget
>   constructor for all known configurations.  That is what generators will
>   request during generate-time anyway.
> * Doing this will make it possible to split a cmComputedTarget out of
>   cmGeneratorTarget.

I started splitting out a cmComputedTarget. It is initialized in its
constructor for one single configuration.
The entries of the ComputedTargets map are computed and recomputed
lazily because of the reason mentioned above.

Please review: https://github.com/purpleKarrot/CMake/commits/computed-target


More information about the cmake-developers mailing list