[cmake-developers] transitive -I and -D usage requirements

Brad King brad.king at kitware.com
Thu Dec 13 10:42:05 EST 2012


On 12/13/2012 10:27 AM, Stephen Kelly wrote:
> Stephen Kelly wrote:
> 
>> set_property(TARGET foo INTERFACE_INCLUDE_DIRECTORIES
>> /include/foo
>> $<TARGET_PROPERTY:bar,INTERFACE_INCLUDE_DIRECTORIES>
>> $<TARGET_PROPERTY:bat,INTERFACE_INCLUDE_DIRECTORIES>
>> )
>>
>> The consumer will get the foo include followed by the bar include followed
>> by the bat include. Due to the way tll() resolves and orders dependencies,
>> that would not be the same.
> 
> Oh, of course, the consumer might also need to re-order the includes, and 
> would do so by populating the INCLUDE_DIRECTORIES of the consumer with the 
> ones which need to be first anyway using include_directories or setting the 
> target property at configure-time. This is the same no matter which 
> transitivity logic is followed.

Yes.

My next response to the "Setting include directories via target_link_libraries"
thread that I'm currently preparing will subsume the concerns raised in this
thread so I won't bother with a more detailed reply here yet.

-Brad



More information about the cmake-developers mailing list