Hi Chuck,

I also followed the discussions, we thank you for your answers and we shall 
come back to you if needed.

Regards,
Séna

From: Chuck Atkins [mailto:chuck.atk...@kitware.com]
Sent: Tuesday, August 21, 2018 6:58 PM
To: REIX, Tony <tony.r...@atos.net>
Cc: CMake Developers <cmake-developers@cmake.org>; APEKE, SENA (ext) 
<sena.apeke.exter...@atos.net>
Subject: Re: [cmake-developers] Shared libraries

Hi Tony,

I believe I somewhat misunderstood what appears to be two separate issues here: 
1: how to get your build to generate the static and shared libraries and 2: the 
library format doesn't seem correct. Regarding 1, it will be project specific 
if the project's build designed to simultaneously produce multiple 
configurations. In the context of MongoC, I've looked at the CMake files and it 
seems as though shared libraries are always built and static libraries can 
*also* be explicitly enabled/disabled by setting -DENABLE_STATIC=ON or 
-DENABLE_STATIC=OFF.

Regarding 2,


On AIX, when building MongoC 1.11, cmake 3.11.4 generates lib*.so files and 
lib*.a files which contain .o files.

On AIX, we should get libraries lib*.a containing the lib*.so file.

While with most SysV and BSD unices the concept of "shared libraries" and 
"runtime linking" are one in the same and go togethor, on AIX they are two 
seperate ideas orthogonal to one another.  On AIX you can have shared libraries 
used for runtime-linking, i.e. libfoo.so containing objects, and archive files 
libfoo.a used for compile time linking.  The archive file can then in turn 
contain object files used for static linkling or an so used for shared linking. 
 CMake will produce the stand alone libfoo.so shared lib for shared runtime 
linking and the libfoo.a archive with object files for static compile-time 
linking, but I believe does not support generating the libfoo.a archive with 
.sos for shared compile-time linking.

- Chuck
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers

Reply via email to