[cmake-developers] Policy for INTERFACE_LINK_LIBRARIES

Brad King brad.king at kitware.com
Mon Dec 3 11:28:20 EST 2012


On 12/03/2012 11:23 AM, Stephen Kelly wrote:
> If the policy is NEW and I export a static library, then 
> only IMPORTED_LINK_INTERFACE_LIBRARIES(_<CONFIG>) will be on the generated 
> IMPORTED targets (as is my understanding - I have not tried this).

Correct, but please test if you have a chance.  Also, try hacking the
ExportImport test's Export side to set the policy to NEW.  The test
should still pass.

> If I then try to use that IMPORTED target, the 
> IMPORTED_LINK_INTERFACE_LIBRARIES(_<CONFIG>) will be ignored, and the 
> INTERFACE_LINK_LIBRARIES will also not give me anything useful (because it 
> does not exist, despite upstream using CMP0019 == NEW), though it would be 
> populated in a future CMake release.

The policy doesn't affect the dependents directly anymore.  In
cmTarget::ComputeImportInfo we no longer look at its setting.
Therefore the old name will be used because the new name is not
set.

-Brad



More information about the cmake-developers mailing list