[cmake-developers] INTERFACE_LINK_LIBRARIES property?

Brad King brad.king at kitware.com
Fri Jun 28 08:24:52 EDT 2013


On 06/28/2013 06:02 AM, Stephen Kelly wrote:
> Is it really worthwhile to introduce both INTERFACE and LINK_INTERFACE?

No, I forgot that "LINK_INTERFACE" does not exist.
It is fine to just add "INTERFACE".

> * LINK_PUBLIC is treated as an alias for PUBLIC 
> * LINK_PRIVATE is treated as an alias for PRIVATE

Yes, though see response below about mixing.

> * LINK_INTERFACE_LIBRARIES is *not* treated as an ALIAS for INTERFACE

Correct.  This one is different because it is a command mode,
not a keyword that can appear anywhere among other libraries.

> That would mean mixtures like this would be allowed:
> 
>  target_link_libraries(lhs LINK_PUBLIC a PRIVATE b)
> 
> Should they be?

I was thinking that at the time I sent the grandparent message
but now that I see an example spelled out I agree it looks
nicer to make them exclusive.  That will also be easier to
document because the list of signatures will not need something
like "<PUBLIC|LINK_PUBLIC>" in it.

So, if the first argument after the lhs is "LINK_PUBLIC"
or "LINK_PRIVATE" then it is the existing signature, and if
it is "PUBLIC" or "PRIVATE" or "INTERFACE" then it is the
"new" signature, right?

Thanks,
-Brad



More information about the cmake-developers mailing list