MantisBT - CMake
View Issue Details
0014649CMakeCMakepublic2013-12-16 02:352014-06-02 08:37
Arunmozhi 
Stephen Kelly 
normalminoralways
closedno change required 
 
 
0014649: INTERFACE_LIBRARY does not allow defined properties
An INTERFACE library allows only whitelisted properties and not user-defined properties. Only user can decide if the defined property can be applicable for an INTERFACE library or not.
No tags attached.
txt CMakeLists.txt (298) 2013-12-16 02:35
https://public.kitware.com/Bug/file/5017/CMakeLists.txt
Issue History
2013-12-16 02:35ArunmozhiNew Issue
2013-12-16 02:35ArunmozhiFile Added: CMakeLists.txt
2013-12-16 06:35Stephen KellyNote Added: 0034781
2013-12-16 06:36Stephen KellyNote Edited: 0034781bug_revision_view_page.php?bugnote_id=34781#r1335
2013-12-16 08:00ArunmozhiNote Added: 0034782
2013-12-23 11:17Stephen KellyNote Added: 0034859
2013-12-23 11:17Stephen KellyStatusnew => resolved
2013-12-23 11:17Stephen KellyResolutionopen => no change required
2013-12-23 11:17Stephen KellyAssigned To => Stephen Kelly
2014-06-02 08:37Robert MaynardNote Added: 0036065
2014-06-02 08:37Robert MaynardStatusresolved => closed

Notes
(0034781)
Stephen Kelly   
2013-12-16 06:35   
(edited on: 2013-12-16 06:36)
You need to be more specific. Post some code which shows why the property on the INTERFACE library needs to be set, and no alternative is sensible. http://sscce.org/ [^]

(0034782)
Arunmozhi   
2013-12-16 08:00   
User defined properties can be used for any reason to store some target specific information globally. I simply do not see a reason to block it for a specific target type.

If you really looking for a usage requirement, I store the type of some custom targets in a specific property. I assumed that when I query this type property from any target (other than those custom targets), it shall return empty string. But I saw error when I queried the property from a interface_library target and hence raised this bug. There will definitely be alternative way of doing things, but I see this issue more from the theoretical and compatibility point of view rather than practical reasons. The module which I wrote for previous versions of cmake now gives error due to this. This module generates Android.mk for our project, so definitely not for a simple usage of cmake.
(0034859)
Stephen Kelly   
2013-12-23 11:17   
> The module which I wrote for previous versions of cmake now gives error due to this.

This is acceptable. The module pre-dates the INTERFACE_LIBRARY type.

Another module might attempt to read the LOCATION of an INTERFACE_LIBRARY target for example, which makes no sense at all.

It just so happens that your module doesn't otherwise trip up on INTERFACE_LIBRARY targets, but it is a new type of object with new semantics and it is reasonable to require new handling for it.
(0036065)
Robert Maynard   
2014-06-02 08:37   
Closing resolved issues that have not been updated in more than 4 months.