Building static and dynamic

Russel Winder via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Sun Feb 14 05:31:49 PST 2016


On Sun, 2016-02-14 at 09:58 +0000, ZombineDev via digitalmars-d-ldc
wrote:
> On Sunday, 14 February 2016 at 09:54:37 UTC, Russel Winder wrote:
> > I am fairly sure I have asked this before, but I can't find the 
> > email…
> > 
> > LDC builds for static and dynamic libraries fine, but it 
> > requires two independent build/install with a manual edit of a 
> > file in between. Is there any way of getting CMake to create a 
> > build that build both and installs both without intervention?
> 
> https://github.com/ldc-developers/ldc/issues/1282

I have noted this on the issue as well:

In order to generate both static and dynamic libraries, you have to run
the build twice. In the CMakeCache.txt file, near the top is an option:

//Whether to build the runtime as a shared library
BUILD_SHARED_LIBS:BOOL=ON

Switching this to ON creates dynamic libraries, amending to OFF and
rerunning the build creates the static libraries. My question is:
Surely CMake can do both as a single batch job? If it cannot then it
would have to be seen as a mark that CMake is crap.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-ldc/attachments/20160214/a59e14ee/attachment.sig>


More information about the digitalmars-d-ldc mailing list