[cmake-developers] Policy for INTERFACE_LINK_LIBRARIES

Brad King brad.king at kitware.com
Mon Dec 3 10:27:09 EST 2012


On 12/03/2012 10:06 AM, Stephen Kelly wrote:
> Brad King wrote:
>> The CONFIG_DEBUG property complements the "debug" keyword in tll().
>> That's all it does, and it exactly matches the behavior we need in
>> the motivating case.  Something like $<COMPATIBLE_CONFIG:cfg> may
>> be useful but that can be added in the future in another topic.
> 
> Yes, it could be added in the future, but the generator expression added by 
> generatorIface could not then be ported to use it (after a release is made 
> with this patch in it) without breaking behavior backward compatibility.

The purpose of the generatorIface logic is to implement the "debug"
keyword from tll() with a generator expression.  It doesn't make sense
to generalize the test that keyword performs because ideally in the future
no one will use this keyword anymore and will use generator expressions
instead.

>> When constructing a topic pretend that each commit is the last commit
>> you will ever make to CMake, without the rest of the topic after it,
>> or at least without future topics.  If it doesn't make sense to leave
>> it off at that point then the commits are organized incorrectly and
>> therefore harder to review.

Perhaps better wording for the above: We can't put any topics in master
that depend on future topics for completeness.

> That would mean that add-INTERFACE_LINK_LIBRARIES-property should also 
> include the rest of the commits to add the LINK_LIBRARIES property and use 
> that for static libraries to generate the INTERFACE_LINK_LIBRARIES property 
> on exported targets. Otherwise add-INTERFACE_LINK_LIBRARIES-property topic 
> would be introducing a bug.

...but that behavior is not influenced by the new policy CMP0019.
Currently this topic will just generate the old properties named
IMPORTED_LINK_INTERFACE_LIBRARIES(_<CONFIG>) for static libs and
everything will work, no?  The future topic is needed only to
support generator expressions in tll() for static libs.

Anyway, I think once the LINK_PUBLIC part of the policy is worked
out then I'll perform one final review pass through the topic.
I'd also like to have the CMP0019 test added to it covering the
current form of the policy (since it's changed since you wrote the
test before).  I can help work out any dashboard issues like those
you encountered the first time.

After that it will be ready to have the other topics based on it.
Once the LINK_LIBRARIES part is in we can merge them together to
master.  Let's just do one of these related topics at a time to
make revisions easier.

Thanks,
-Brad



More information about the cmake-developers mailing list