[cmake-developers] Generator Expression self-references now allowed?

Brad King brad.king at kitware.com
Fri Feb 22 13:20:48 EST 2013


On 02/22/2013 11:32 AM, Stephen Kelly wrote:
> Brad King wrote:
>> Can't you instead simply have the usage requirements skip appending
>> a target's own requirements to itself?  That way the resulting
>> generator expression would still not have a self reference.
> 
> Yes, but I only realized that after replying to the rest of the mail :).

Thanks.  The new approach in the topic looks good.  Now the commit that
you mostly reverted should become just:

-      return parent->Parent ? CYCLIC_REFERENCE : SELF_REFERENCE;
+      return (parent == this->Parent) ? SELF_REFERENCE : CYCLIC_REFERENCE;

right?  Can you please squash them back together and write a new commit
message that explains why this one hunk is needed?

>> ?  The LinkInterfaceLoop test was added here:
>>
>>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e756d2b
>>
>> to cover a case that was accidentally allowed but that should not be used.
>> I'd rather not drop this great safety check for backward-compatibility
>> with bad code.
> 
> Perhaps a policy can be added for that?

Yes, but I'd rather not squeeze it in before 2.8.11.  If you add one
we can keep the topic in your clone and put it in after the release.

Thanks,
-Brad



More information about the cmake-developers mailing list