<div dir="ltr"><div>Hi Tony,</div><div><br></div><div>I expect what your seeing is likely the result of how MaraiaDBhas specifically implemented their CMake build.  The only builtin CMake variable to control this is BUILD_SHARED_LIBS, which when set to "ON" changes the behavior of add_library(foo) to be add_library(foo SHARED), instead of the default add_library(foo STATIC).  The other BUILD_STATIC_LIBS and DISABLE_SHARED are variables are not builtin to CMake and are part of however they have chosen to implement their build.</div><div><br></div><div>CMake builds are typically designed to produce a single configuration, i.e. shared release or static debug, etc.  Often, however, because to have the flexibility to do otherwise. projects will try to instead implement a build that produces several configurations in a single pass.  It seems this is what MariaDB has done and as such the variables to control it will be unique and specific to that project and how they've decided to implement it.</div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">----------<br>Chuck Atkins<br>Staff R&D Engineer, Scientific Computing<br>Kitware, Inc.<br></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 9, 2018 at 12:23 PM REIX, Tony <<a href="mailto:tony.reix@atos.net">tony.reix@atos.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div id="m_1738457561020838378divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p style="margin-top:0;margin-bottom:0">Hi,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">On AIX, when building MongoC 1.11, cmake 3.11.4 generates lib*.so files and lib*.a files which contain .o files.</p>
<p style="margin-top:0;margin-bottom:0">On AIX, we should get libraries lib*.a containing the lib*.so file.</p>
<p style="margin-top:0;margin-bottom:0">I've tried to use:</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div>    -DBUILD_SHARED_LIBS=ON              \<br>
    -DBUILD_STATIC_LIBS=OFF \<br>
    -DCMAKE_C_CREATE_SHARED_LIBRARY=ON  \<br>
    -DCMAKE_CXX_CREATE_SHARED_LIBRARY=ON  <br>
and I see that, for MariaDB, someone has tried with:<br>
</div>
<p style="margin-top:0;margin-bottom:0"><font size="3" color="black" face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols"><span style="font-size:12pt"><font color="black"><font size="3" face="Calibri">   
 -DDISABLE_SHARED=OFF  <br>
</font></font></span></font></p>
<p></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">None seems to work.<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Which CMake variable should I use for asking CMAKE to generate shared libraries rather than static ones: lib*.a file containing .so files rather than .o files.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thanks<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<div id="m_1738457561020838378Signature">
<div id="m_1738457561020838378divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px"><span lang="fr"><font size="2" color="black" face="Arial"><span dir="ltr" style="font-size:10pt"><font size="2" face="Times New Roman"><span style="font-size:16px">
<div style="margin:0"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font size="2" face="Verdana,sans-serif"><span style="font-size:9pt">Cordialement,<br>
<br>
Tony Reix<br>
<br>
<a href="mailto:tony.reix@atos.net" target="_blank">tony.reix@atos.net</a><br>
<br>
ATOS / Bull SAS<br>
ATOS Expert<br>
IBM Coop Architect & Technical Leader<br>
</span></font></span></font></div>
<div style="margin:0"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font size="2" face="Verdana,sans-serif"><span style="font-size:9pt">Office : +33 (0) 4 76 29 72 67</span></font></span></font></div>
<div style="margin:0"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font size="2" face="Verdana,sans-serif"><span style="font-size:9pt">1 rue de Provence - 38432 Échirolles - France</span></font></span></font></div>
<div style="margin:0"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><a href="https://mail.ad.bull.net/owa/redir.aspx?C=PvphmPvCZkGrAgHVnWGsdMcDKgzl_dEIsM6rX0g4u4v8V81YffzBGkWrtQeAXNovd3ttkJL8JIc.&URL=http%3a%2f%2fwww.atos.net%2f" id="m_1738457561020838378LPNoLP" target="_blank"><font size="2" face="Verdana,sans-serif"><span style="font-size:9pt">www.atos.net</span></font></a></span></font></div>
</span></font></span></font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake-developers" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake-developers</a><br>
</blockquote></div>