MantisBT - CMake
View Issue Details
0001790CMakeCMakepublic2005-04-22 14:092013-03-04 08:38
Brad King 
Bill Hoffman 
lowfeaturealways
closedfixed 
 
CMake 2.8.8 
0001790: GET_TARGET_PROPERTY OBJECT_FILES
Several users have asked about linking lots of small libraries yet also providing a single big library with the same objects. Currently CMake cannot do this even though we support external object files. Now that local generate has been removed all runs of cmake have global knowledge and the configure stage can hook into the generators. This would allow us to provide this target property:

GET_TARGET_PROPERTY(SMALL_A_OBJS smallA OBJECT_FILES)
GET_TARGET_PROPERTY(SMALL_B_OBJS smallB OBJECT_FILES)

ADD_LIBRARY(big ${SMALL_A_OBJS} ${SMALL_B_OBJS})
No tags attached.
Issue History
2012-10-18 11:55David ColeNote Added: 0031274
2012-10-18 11:55David ColeStatusassigned => resolved
2012-10-18 11:55David ColeFixed in Version => CMake 2.8.8
2012-10-18 11:55David ColeResolutionopen => fixed
2013-03-04 08:38Robert MaynardNote Added: 0032476
2013-03-04 08:38Robert MaynardStatusresolved => closed

Notes
(0002381)
Brad King   
2005-05-03 08:51   
This link was also suggested:

http://66.102.9.104/search?q=cache:0y-utpzDcywJ:lists.gnu.org/archive/html/libtool/2004-09/msg00124.html+libtool+convenience+library+windows&hl=en&ie=UTF-8 [^]

> If these so-called "convenience" libraries are meant to be linked in
> whole, they should not be ar archives at all. You should just link them
> directly into a relocatable object file:
> ld -r -o <convenience.obj> *.o
(0002499)
Alex Neundorf   
2005-06-14 16:59   
It would be quite cool if this could somehow be made to work. It would make compiling KDE with cmake much easier :-)
(0003128)
Alex Neundorf   
2005-10-12 14:02   
Any progress on this ?
How about this idea: http://public.kitware.com/pipermail/cmake/2005-September/007291.html [^]

Alex
(0031274)
David Cole   
2012-10-18 11:55   
I think this can be considered fixed now in 2.8.8 based on the OBJECT library feature (see bottom of help text for add_library):

  http://cmake.org/cmake/help/v2.8.8/cmake.html#command:add_library [^]

Please re-open and add a note to discuss if you disagree...
(0032476)
Robert Maynard   
2013-03-04 08:38   
Closing resolved issues that have not been updated in more than 4 months.