View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014503CMakeCMakepublic2013-10-22 05:162016-06-10 14:31
Reportericando 
Assigned ToKitware Robot 
PriorityhighSeverityfeatureReproducibilityalways
StatusclosedResolutionmoved 
PlatformAnyOSAnyOS VersionAny
Product VersionCMake 2.8.12 
Target VersionFixed in Version 
Summary0014503: Make a library can ``link to'' a objlib
DescriptionObjlib is useful implementing self-registration factories, where we rely on global/static variables' constructor to register itself in a factory. The major issue is linker will remove those symbols that are not referenced, and we can use objlib to force linking these symbols.

Currently the caveat is we need to specify all objlib at add_executable, which makes it painful. It would be great if a library can specify objlib in target_link_libraries or some other new command, and it will pass those objlib all the way up to the executable, and executable will automatically include those objlibs as its source. In this way, we can maintain the alwayslink requirement where the library is defined, not at top-level.

Thanks.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0034214)
Brad King (manager)
2013-10-22 08:33

Steve, will this use case be subsumed by your INTERFACE_SOURCES work?

In general it is tricky to define what tll() means for object libraries because using objects makes sense only for immediate or transitive linking but not both for a single target.
(0034216)
Stephen Kelly (developer)
2013-10-22 11:41

Yes, here's a relevant link:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/7082 [^]
(0034222)
icando (reporter)
2013-10-23 04:06

Thanks for the work. Has it been implemented in master?
(0034223)
Stephen Kelly (developer)
2013-10-23 04:07

Nope, not yet.
(0034783)
icando (reporter)
2013-12-16 18:38

Looks like the target version is removed. Does it mean we can't expect it be fixed in 3.0?
(0035456)
Stephen Kelly (developer)
2014-03-20 11:12

Part of doing this properly would involve allowing installation, export and import of object libraries. That is currently blocked by a need to represent architecture in paths with Xcode.

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/9705/focus=9722 [^]
(0042400)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2013-10-22 05:16 icando New Issue
2013-10-22 08:30 Brad King Assigned To => Stephen Kelly
2013-10-22 08:30 Brad King Status new => assigned
2013-10-22 08:33 Brad King Note Added: 0034214
2013-10-22 11:41 Stephen Kelly Note Added: 0034216
2013-10-22 11:42 Stephen Kelly Target Version => CMake 3.0
2013-10-23 04:06 icando Note Added: 0034222
2013-10-23 04:07 Stephen Kelly Note Added: 0034223
2013-12-04 12:23 Stephen Kelly Target Version CMake 3.0 =>
2013-12-16 18:38 icando Note Added: 0034783
2014-02-26 08:25 Stephen Kelly Relationship added related to 0014151
2014-02-26 08:31 Stephen Kelly Relationship deleted related to 0014151
2014-03-20 11:12 Stephen Kelly Note Added: 0035456
2014-03-20 11:12 Stephen Kelly Assigned To Stephen Kelly =>
2016-06-10 14:29 Kitware Robot Note Added: 0042400
2016-06-10 14:29 Kitware Robot Status assigned => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team