[cmake-developers] Convention driven CMAKE_USE_PACKAGE macro

Stephen Kelly steveire at gmail.com
Sun Mar 4 17:44:21 EST 2012


Brad King wrote:

> On 2/24/2012 1:56 PM, Clinton Stimpson wrote:
>> What about a more generic approach like the following?
>>
>> add_library(foo IMPORTED ...)
>> set_target_properties(foo PROPERTIES
>>        DEPENDENT_COMPILE_DEFINITIONS "FOO_DEFINE"
>>        DEPENDENT_INCLUDE_DIRECTORIES "/path/to/foo/include")
>>
>> add_executable(bar ...)
>> target_link_libraries(foo bar)
>>
>> And that could automatically add -DFOO_DEFINE and -I/path/to/foo/include
>> to the bar executable.
>> So basically any DEPENDENT_<property>  can be pushed to<property>  on the
>> other target.
> 
> Nice.  This is exactly the kind of interface I had in mind for the
> "usage requirements" approach Alex and I were discussing elsewhere
> in this thread.  We will have to think about how to define transitive
> properties of these requirements though.
> 

Is this kind of thing roadmapped in any way? Can we work on getting it into 
2.8.9 (Is it too late for 2.8.8) and start designing or brainstorming more 
fully?

Thanks,

Steve.





More information about the cmake-developers mailing list