[cmake-developers] conditionals in generator expressions

Brad King brad.king at kitware.com
Mon Sep 24 09:25:14 EDT 2012


On 09/24/2012 09:23 AM, Brad King wrote:
> On 09/24/2012 09:15 AM, Stephen Kelly wrote:
>> I also want to obsolete the IMPORTED_LINK_INTERFACE_LIBRARIES in favor 
>> of INTERFACE_LINK_LIBRARIES so that expressions such as 
>>
>>  $<TARGET_PROPERTY:foo,INTERFACE_LINK_LIBRARIES>
>>
>> work for every target, not just non-imported ones. I'm not really sure why 
>> the IMPORTED_ variants of those properties were created and whether they are 
>> really needed?
> 
> I don't remember for sure the reasoning at the time.  Imported targets
> were so new we weren't sure how they would end up working out.  The
> IMPORTED_ prefix gave us a namespace to separately document them.

<brainstorming>

One approach to eliminate the IMPORTED_ names is to teach get/set_property
and related commands to automatically remove the IMPORTED_ prefix from
property names if the target is imported.  Then even existing files
generated by export() or install(EXPORT) of older CMake versions would
magically load with the new property names.

</brainstorming>

-Brad



More information about the cmake-developers mailing list