[cmake-developers] Setting target properties before the target is defined ?

Alexander Neundorf neundorf at kde.org
Tue Feb 19 14:57:23 EST 2013


On Tuesday 19 February 2013, Brad King wrote:
> On 02/18/2013 08:23 AM, Brad King wrote:
> > Another approach is to just add an extra property to imported targets
> > that list their dependencies that are expected to be targets.  If when
> > following the link interface out of that target and a library name is
> > not a target, check the extra property on the very same target to see
> > if it should have been one.
> 
> Any comment on this idea?  It may be simpler to implement and produce
> better error messages.

I had the same idea, but went with the directory property first.
The target property would avoid any scope-issues, it looks quite elegant.

I haven't worked on the link-dependency-calculation much, so I wasn't sure how 
this code exactly works, so I went with the (for me) easier way, checking 
directly in FindTargetToUse().

Can you give me a pointer where the member of the link interface are checked ?

Alex



More information about the cmake-developers mailing list