www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - CMake support for D

reply Dibyendu Majumdar <d.majumdar gmail.com> writes:
Does CMake recognise D in the enable_language command?

If not is there a workaround?

Thanks and Regards
Dibyendu
Jan 03
next sibling parent Trent Forkert <trentforkert+d gmail.com> writes:
On Sunday, 3 January 2016 at 17:30:15 UTC, Dibyendu Majumdar 
wrote:
 Does CMake recognise D in the enable_language command?
No.
 If not is there a workaround?
I have a fork of CMake that adds D support here: https://github.com/trentforkert/cmake It's been a while since I published updates, but it should still work. If you encounter bugs please file them.
Jan 03
prev sibling parent reply Luis <luis.panadero gmail.com> writes:
On Sunday, 3 January 2016 at 17:30:15 UTC, Dibyendu Majumdar 
wrote:
 Does CMake recognise D in the enable_language command?

 If not is there a workaround?

 Thanks and Regards
 Dibyendu
I suggest use dub instead of cmake. I did a try to use cmake some time ago (a few years ago, before dub), and was a nightmare to get ir working on GNU/Linux and Windows. With dub , simply works fine with a simple json file.
Jan 04
next sibling parent Russel Winder via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
On Mon, 2016-01-04 at 08:28 +0000, Luis via Digitalmars-d-learn wrote:

=20
 I suggest use dub instead of cmake. I did a try to use cmake some=C2=A0
 time ago (a few years ago, before dub), and was a nightmare to=C2=A0
 get ir working on GNU/Linux and Windows. With dub , simply works=C2=A0
 fine with a simple json file.
The problem though is twofold: 1. IDE support, cf. CLion required CMake. 2. Getting things packaged in Debian/Fedora. As far as I am aware, Dub is not yet packaged by Debian and Fedora and so cannot be used for creating Debian or Fedora packages. If Dub could be packaged then it opens up a whole new world of possibilities. For now though use of SCons and CMake is nigh on required for projects aiming to get packaged. --=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
Jan 04
prev sibling parent reply Dibyendu Majumdar <d.majumdar gmail.com> writes:
On Monday, 4 January 2016 at 08:28:03 UTC, Luis wrote:
 I suggest use dub instead of cmake. I did a try to use cmake 
 some time ago (a few years ago, before dub), and was a 
 nightmare to get ir working on GNU/Linux and Windows. With dub 
 , simply works fine with a simple json file.
CMake has worked well for me for C/C++ projects, on Windows, Linux and OSX. Pity no official support for D. I need support for apps that have a mixed code base not just D. Thanks for suggesting dub, will check it out. Also premake seems to support D so that is another option. Regards
Jan 04
parent Edwin van Leeuwen <edder tkwsping.nl> writes:
On Monday, 4 January 2016 at 12:40:23 UTC, Dibyendu Majumdar 
wrote:
 Thanks for suggesting dub, will check it out. Also premake 
 seems to support D so that is another option.
Another alternative is reggae which supports mixed code base: https://github.com/atilaneves/reggae and can generate ninja/make/tup build rules (similarly to cmake).
Jan 04