[CMake] cmake policy CMP0022 error

Stephen Kelly steveire at gmail.com
Fri Oct 25 11:06:29 EDT 2013


Clinton Stimpson wrote:

> I'm trying to point out that I did not get a warning when I was using
> cmake_minimum_required(VERSION 2.8)
> set_target_properties(mytarget PROPERTIES LINK_INTERFACE_LIBRARIES "")
> with
> CMake 2.8.12.
> 
> That looks like a bug.

The policy warning is only issued if 

1) Both LINK_INTERFACE_LIBRARIES and INTERFACE_LINK_LIBRARIES are set on a 
single target (either by using set_property or by using the various 
target_link_libraries signatures).

2) You export() or install(EXPORT) a target which has 
LINK_INTERFACE_LIBRARIES set, but which does not use the new 
EXPORT_LINK_INTERFACE_LIBRARIES option to those commands to cause it to be 
exported to the targets file, even though the policy is set to NEW.


There may be a bug there, or a chance to emit a warning we're not currently 
emitting. Please file a bug with a testcase if that is the case.

Thanks,

Steve.




More information about the CMake mailing list