www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Building static and dynamic

reply Russel Winder via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
I am fairly sure I have asked this before, but I can't find the email=E2=80=
=A6

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?

--=20
Russel.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder ekiga.n=
et
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
Feb 14 2016
parent reply ZombineDev <valid_email he.re> writes:
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
Feb 14 2016
parent Russel Winder via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
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=C2=A0
 email=E2=80=A6
=20
 LDC builds for static and dynamic libraries fine, but it=C2=A0
 requires two independent build/install with a manual edit of a=C2=A0
 file in between. Is there any way of getting CMake to create a=C2=A0
 build that build both and installs both without intervention?
=20 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=3DON 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. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Feb 14 2016