[CMake] linking static library.
Łukasz Tasz
lukasz at tasz.eu
Wed Dec 12 03:56:06 EST 2012
Does somebody has some ideas?
Can I enforce cmake to make library as a one 'shoot' - single command line?
thanks in advance
Lukasz
Łukasz Tasz
2012/12/5 Łukasz Tasz <lukasz at tasz.eu>:
> Hi all,
>
> I have a problem with making static library.
> There is behaviour which is not clear for me.
>
> I have long list of objects to be linked. For shared library linking
> is done as one g++ command,
> For static sources are grouped into few groups and there is sequence of:
> ar cr libnanme obj_list1
> ar r libnanme obj_list2
> ar r libnanme obj_list3
> ...
>
> Could somebody explain me what's the reason for such a grouping?
> Issue at my side is that both objects wont go to the archive if:
> ar cr .... foo/foo.o ....
> ar r .... bar/foo.o ....
>
> bar/foo.o will replace foo/foo.o
>
> I know it's not a good idea to put same name of object info archive,
> but it's still valid...
>
> I would like to avoid replacing template for appending to static
> library CMAKE_C_ARCHIVE_APPEND
>
> thank in advance
> Łukasz Tasz
More information about the CMake
mailing list