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

Stephen Kelly steveire at gmail.com
Thu Dec 13 10:27:07 EST 2012


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.

Thanks,

Steve.





More information about the cmake-developers mailing list