[OpendTect_Developers] R: R: CMake Help

Kristofer Tingdahl kristofer.tingdahl at dgbes.com
Tue Jul 10 17:04:42 CEST 2012


David and Antonio,

On Tue, Jul 10, 2012 at 1:46 PM, David Epelboim <david at geoinfo.com.ar>wrote:

>  Kris,
>
> Jumping into Antonio's bandwagon, are there ways to add an Object file
> instead? .o or .obj...
>

you can add .o or .obj files using the OD_MODULE_SOURCES variable, in the
same way as you add .c or .cc files. If CMake finds an obj-file in the
list, it will simply include it in the shared library.

You can however not add static libraries directly, they have to be
unpacked. You can either do that yourself, or you could let our cmake
script do it for you.

thank you for your prompt response. As I remarked, one problem I had with
> pmake mkshobjlib was precisely that it used to unpack libraries and link
> plugins object files + library unpacked object files.
>
> This approach fails for quite large (static) libraries (the link command
> is too long to fit shell buffers), depending on the number of libraries and
> object files contained in each library: letting the linker create a .so
> file adding the –Lmylib directives works and does not need to unpack
> libmylib.a.
>
>
I can see that there may be a problem if you have extremely large shared
libraries. We have a one internally with more than 300 files, and that
works flawlessly. The link-command under cmake is not put on the
commandprompt, but is stored in a file (CMakeFiles/<target>/link.txt)
Perhaps that does a difference.


Best regards,


Kristofer Tingdahl

-- 
Kristofer Tingdahl, Ph. D.
CEO
dGB Earth Sciences
http://www.dgbes.com <https://www.facebook.com/OpendTect>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opendtect.org/pipermail/developers/attachments/20120710/aedb9855/attachment.html>


More information about the Developers mailing list