www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Premake officially gains D support

reply Manu via Digitalmars-d <digitalmars-d puremagic.com> writes:
Perhaps of interest, I have been maintaining D support in Premake for
years (as an extension).
It was finally merged into mainline... so Premake now officially
supports D out-of-the-box. Huzzah!

What is Premake I hear you ask?
It's a project gen, more-or-less like cmake and friends, except that
it's favoured by the gamedev industry, mainly because it better
expresses and supports multi-platform builds, and also supports
Windows environments much better than popular linux build solutions.
I also find it much easier and more concise to script and express my
build environment than cmake or alike.

Premake can produce quality D makefiles, and it also has comprehensive
support for Visual Studio (VisualD), and MonoDevelop (Mono-D).
I use Premake extensively for cross-language builds, since it can
integrate C/C++ and D code very nicely.

The recent dub discussions have made me start questioning how I might
integrate dub support...

Curious to know if anyone here uses Premake, or cares...?
Jun 02 2015
next sibling parent reply "extrawurst" <stephan extrawurst.org> writes:
On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote:
 Perhaps of interest, I have been maintaining D support in 
 Premake for
 years (as an extension).
 It was finally merged into mainline... so Premake now officially
 supports D out-of-the-box. Huzzah!

 What is Premake I hear you ask?
 It's a project gen, more-or-less like cmake and friends, except 
 that
 it's favoured by the gamedev industry, mainly because it better
 expresses and supports multi-platform builds, and also supports
 Windows environments much better than popular linux build 
 solutions.
 I also find it much easier and more concise to script and 
 express my
 build environment than cmake or alike.

 Premake can produce quality D makefiles, and it also has 
 comprehensive
 support for Visual Studio (VisualD), and MonoDevelop (Mono-D).
 I use Premake extensively for cross-language builds, since it 
 can
 integrate C/C++ and D code very nicely.

 The recent dub discussions have made me start questioning how I 
 might
 integrate dub support...

 Curious to know if anyone here uses Premake, or cares...?
I don't use it right now, but I came in contact with it already and like the concept - like you said it does not feel so alien on windows. Once I have the need to do cross language builds in my project I would like premake to have dub support, cause thats what I am using and what I guess everyone starting with D uses. So: support for that would be great ;) ~Stephan
Jun 02 2015
parent Manu via Digitalmars-d <digitalmars-d puremagic.com> writes:
On 2 June 2015 at 18:28, extrawurst via Digitalmars-d
<digitalmars-d puremagic.com> wrote:
 On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote:
 Perhaps of interest, I have been maintaining D support in Premake for
 years (as an extension).
 It was finally merged into mainline... so Premake now officially
 supports D out-of-the-box. Huzzah!

 What is Premake I hear you ask?
 It's a project gen, more-or-less like cmake and friends, except that
 it's favoured by the gamedev industry, mainly because it better
 expresses and supports multi-platform builds, and also supports
 Windows environments much better than popular linux build solutions.
 I also find it much easier and more concise to script and express my
 build environment than cmake or alike.

 Premake can produce quality D makefiles, and it also has comprehensive
 support for Visual Studio (VisualD), and MonoDevelop (Mono-D).
 I use Premake extensively for cross-language builds, since it can
 integrate C/C++ and D code very nicely.

 The recent dub discussions have made me start questioning how I might
 integrate dub support...

 Curious to know if anyone here uses Premake, or cares...?
I don't use it right now, but I came in contact with it already and like the concept - like you said it does not feel so alien on windows. Once I have the need to do cross language builds in my project I would like premake to have dub support, cause thats what I am using and what I guess everyone starting with D uses. So: support for that would be great ;) ~Stephan
Well, the thing about dub and premake, is that premake does heaps more than dub does. In order to interact the languages and make them link together properly, you need to describe enough about the projects to premake, and by doing so, you give it enough information to have premake spit out a makefile directly. I imagine there's possibility to integrate support for using dub to fetch and build dependencies, but for a project itself, I imagine it would be kinda awkward since premake has far more control over the build options than dub provides, also the premake build descriptions cross projects, languages and platforms, and provide sufficient information to link all the outputs together properly.
Jun 02 2015
prev sibling next sibling parent Rikki Cattermole <alphaglosined gmail.com> writes:
On 2/06/2015 8:22 p.m., Manu via Digitalmars-d wrote:
 Perhaps of interest, I have been maintaining D support in Premake for
 years (as an extension).
 It was finally merged into mainline... so Premake now officially
 supports D out-of-the-box. Huzzah!
Yay!
Jun 02 2015
prev sibling next sibling parent reply "Per =?UTF-8?B?Tm9yZGzDtnci?= <per.nordlow gmail.com> writes:
On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote:
 Curious to know if anyone here uses Premake, or cares...?
How does CMake compare to SCons? Does it support automatic caching of build artifacts like SCons does?
Jun 02 2015
parent reply Manu via Digitalmars-d <digitalmars-d puremagic.com> writes:
On 2 June 2015 at 20:23, via Digitalmars-d <digitalmars-d puremagic.com> wrote:
 On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote:
 Curious to know if anyone here uses Premake, or cares...?
How does CMake compare to SCons? Does it support automatic caching of build artifacts like SCons does?
You mean premake? I don't really know about scons, tell me about the features of scons that are of interest and I can respond to those points? I'm not sure what you mean about caching if build artifacts? My impression of scons; it depends on the python runtime, which is a massive distribution. It turns me off for this reason alone, since python is rarely found on a windows machine. Premake on the other hand is a single self-contained and tiny exe with no operational dependencies. It is easy to commit premake to the repo, and then no dependencies are required to invoke the build system on any platform. Windows is particularly tedious with respect to operational dependencies, since given windows lack of standard package management and/or software versioning, makes it unreasonable to expect some comprehensive system of dependencies to support a trivial app whose only job is to make a makefile (or [IDE of choice] project files).
Jun 02 2015
parent Jacob Carlborg <doob me.com> writes:
On 2015-06-02 12:39, Manu via Digitalmars-d wrote:

 My impression of scons; it depends on the python runtime, which is a
 massive distribution. It turns me off for this reason alone, since
 python is rarely found on a windows machine.
I'm wondering if there's a version where python is bundled, i.e. in the executable. It might be quite large but at least it will be easier. -- /Jacob Carlborg
Jun 03 2015
prev sibling next sibling parent reply Mike Parker <aldacron gmail.com> writes:
On 6/2/2015 5:22 PM, Manu via Digitalmars-d wrote:

 Curious to know if anyone here uses Premake, or cares...?
I used it for my C stuff, and would be still if I did C anymore. I think it's great that you've gotten D into the mainline. I can see a big benefit to using Premake to manage cross-language builds and will certainly make use of it. I've never liked CMake, SCons or the other build systems I've tried.
Jun 02 2015
parent "ponce" <contact gam3sfrommars.fr> writes:
On Tuesday, 2 June 2015 at 13:13:31 UTC, Mike Parker wrote:
 On 6/2/2015 5:22 PM, Manu via Digitalmars-d wrote:

 Curious to know if anyone here uses Premake, or cares...?
I used it for my C stuff, and would be still if I did C anymore. I think it's great that you've gotten D into the mainline. I can see a big benefit to using Premake to manage cross-language builds and will certainly make use of it. I've never liked CMake, SCons or the other build systems I've tried.
Same opinion here, premake is the nicest (and smaller) of similar tools in that space.
Jun 04 2015
prev sibling next sibling parent "Atila Neves" <atila.neves gmail.com> writes:
 Curious to know if anyone here uses Premake, or cares...?
I would care, if I hadn't written a meta build system very much like that in D: http://forum.dlang.org/thread/ranqlmrjornlvopsuris forum.dlang.org#post-ranqlmrjornlvopsuris:40forum.dlang.org Atila
Jun 02 2015
prev sibling next sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 6/2/15 1:22 AM, Manu via Digitalmars-d wrote:
 Perhaps of interest, I have been maintaining D support in Premake for
 years (as an extension).
 It was finally merged into mainline... so Premake now officially
 supports D out-of-the-box. Huzzah!
Great work. Thanks, Manu! -- Andrei
Jun 02 2015
prev sibling next sibling parent reply "weaselcat" <weaselcat gmail.com> writes:
On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote:
 Curious to know if anyone here uses Premake, or cares...?
would care more if it had ninja support, ninja is vastly superior to makefiles when using a meta buildtool system. premake's use of lua trounces the awful cmake DSL.
Jun 02 2015
next sibling parent reply "Atila Neves" <atila.neves gmail.com> writes:
On Tuesday, 2 June 2015 at 20:51:36 UTC, weaselcat wrote:
 On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote:
 Curious to know if anyone here uses Premake, or cares...?
would care more if it had ninja support, ninja is vastly superior to makefiles when using a meta buildtool system. premake's use of lua trounces the awful cmake DSL.
You mean like the Ninja support in the link I posted above? With a D DSL? Atila
Jun 02 2015
parent "weaselcat" <weaselcat gmail.com> writes:
On Wednesday, 3 June 2015 at 06:00:42 UTC, Atila Neves wrote:
 On Tuesday, 2 June 2015 at 20:51:36 UTC, weaselcat wrote:
 On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote:
 Curious to know if anyone here uses Premake, or cares...?
would care more if it had ninja support, ninja is vastly superior to makefiles when using a meta buildtool system. premake's use of lua trounces the awful cmake DSL.
You mean like the Ninja support in the link I posted above? With a D DSL? Atila
Didn't even notice, at a quick glance it looks really good. I'll have to look into this.
Jun 02 2015
prev sibling parent Manu via Digitalmars-d <digitalmars-d puremagic.com> writes:
On 3 June 2015 at 06:51, weaselcat via Digitalmars-d
<digitalmars-d puremagic.com> wrote:
 On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote:
 Curious to know if anyone here uses Premake, or cares...?
would care more if it had ninja support, ninja is vastly superior to makefiles when using a meta buildtool system.
It does. Premake has experimental ninja support. The main author uses ninja, and he has a ninja module for premake. Lots of the premake extensions need to be made more visible, but extensions are a fairly new concept in premake.
 premake's use of lua trounces the awful cmake DSL.
Yeah, Lua is a really good language for this sort of description. I like how premake feels. I find the files much more brief, and more readable than cmake.
Jun 03 2015
prev sibling next sibling parent "Jonathan M Davis" <jmdavisProg gmx.com> writes:
On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote:
 Curious to know if anyone here uses Premake, or cares...?
I've never heard of premake, but having support for D in more tools is pretty much always a good thing, and there are bound to be some folks who really care. So, this is definitely good news. - Jonathan M Davis
Jun 02 2015
prev sibling parent reply Dibyendu Majumdar <d.majumdar gmail.com> writes:
On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote:
 Perhaps of interest, I have been maintaining D support in 
 Premake for
 years (as an extension).
 It was finally merged into mainline... so Premake now officially
 supports D out-of-the-box. Huzzah!


 Curious to know if anyone here uses Premake, or cares...?
Hi - Thanks for this; I currently use CMake for C/C++ projects, but due to lack of support for D in CMake, planning to migrate to premake. Regards Dibyendu
Jan 15 2016
next sibling parent reply Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Fri, 2016-01-15 at 21:13 +0000, Dibyendu Majumdar via Digitalmars-d
wrote:
[=E2=80=A6]
=20
 Hi - Thanks for this; I currently use CMake for C/C++ projects,=C2=A0
 but due to lack of support for D in CMake, planning to migrate to=C2=A0
 premake.
Is this project totally dead? (It's what's left of the CMakeD2 on GoogleCode. https://github.com/dcarp/cmake-d If D was fully supported by CMake, then along with a variant of Kingsley's IntelliJ IDEA plugin, you would have a CLion based IDE for working with D. This would be especially useful if CMake for D made use of Dub for dependency management. --=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 16 2016
parent reply Dragos Carp <dragoscarp gmail.com> writes:
On Saturday, 16 January 2016 at 16:43:35 UTC, Russel Winder wrote:
 On Fri, 2016-01-15 at 21:13 +0000, Dibyendu Majumdar via 
 Digitalmars-d
 wrote:
 […]
 
 Hi - Thanks for this; I currently use CMake for C/C++ 
 projects, but due to lack of support for D in CMake, planning 
 to migrate to premake.
Is this project totally dead? (It's what's left of the CMakeD2 on GoogleCode. https://github.com/dcarp/cmake-d If D was fully supported by CMake, then along with a variant of Kingsley's IntelliJ IDEA plugin, you would have a CLion based IDE for working with D. This would be especially useful if CMake for D made use of Dub for dependency management.
cmake-d is still active, just not so much used. I'll try to address any issue that arise.
Jan 18 2016
parent reply Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Mon, 2016-01-18 at 11:14 +0000, Dragos Carp via Digitalmars-d wrote:
=20
[=E2=80=A6]
 cmake-d is still active, just not so much used.
 I'll try to address any issue that arise.
Splendid. I'll see if it is possible to integrate this with Kingsley's IDEA D plugin into CLion. It would be really good if this could be achieved by the time of ACCU 2016. I'll see if there is any interest at JetBrains in helping with this. =C2=A0 --=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 18 2016
parent reply rsw0x <anonymous anonymous.com> writes:
On Monday, 18 January 2016 at 13:31:09 UTC, Russel Winder wrote:
 On Mon, 2016-01-18 at 11:14 +0000, Dragos Carp via 
 Digitalmars-d wrote:
 
[…]
 cmake-d is still active, just not so much used.
 I'll try to address any issue that arise.
Splendid. I'll see if it is possible to integrate this with Kingsley's IDEA D plugin into CLion. It would be really good if this could be achieved by the time of ACCU 2016. I'll see if there is any interest at JetBrains in helping with this.
Isn't CLion just regular opensource JetBrains' IDE with a proprietary C++ extension?
Jan 18 2016
parent Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Mon, 2016-01-18 at 14:02 +0000, rsw0x via Digitalmars-d wrote:
 [=E2=80=A6]
=20
 Isn't CLion just regular opensource JetBrains' IDE with a=C2=A0
 proprietary C++ extension?
Yes and no. As with all JetBrains product, it is all based on the same Kotlin/Java implemented engine. However there are (apparently according to JetBrains insider sources) some subtle differences in how plugins work with the different variants of the engine. Also there is the "which version" problem. CLion assumes use of CMake/Make for project definition. There are requests for CMake/Ninja and SCons. Kingsley is currently trying to get the D stuff working in IDEA with Dub. If D is to replace C++ rather than Java/Kotlin/Scala/Clojure/Groovy, then it would be a good idea for it to work in CLion. =C2=A0=C2=A0 --=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 18 2016
prev sibling parent reply Dibyendu Majumdar <d.majumdar gmail.com> writes:
On Friday, 15 January 2016 at 21:13:22 UTC, Dibyendu Majumdar 
wrote:
 On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote:
 Perhaps of interest, I have been maintaining D support in 
 Premake for
 years (as an extension).
 It was finally merged into mainline... so Premake now 
 officially
 supports D out-of-the-box. Huzzah!
Hi - Thanks for this; I currently use CMake for C/C++ projects, but due to lack of support for D in CMake, planning to migrate to premake.
Unfortunately I find that premake doesn't support DMD correctly on Windows 64-bit - it attempts to use the D linker rather than the MS Linker. Regards
Jan 16 2016
next sibling parent reply Mike Parker <aldacron gmail.com> writes:
On Sunday, 17 January 2016 at 00:18:37 UTC, Dibyendu Majumdar 
wrote:

 Unfortunately I find that premake doesn't support DMD correctly 
 on Windows 64-bit - it attempts to use the D linker rather than 
 the MS Linker.

 Regards
I can reproduce this. Specifying architecture "x64" apparently does not cause -m64 to be passed along to DMD and it must be set in a buildoptions directive.
Jan 16 2016
parent Mike Parker <aldacron gmail.com> writes:
On Sunday, 17 January 2016 at 03:56:11 UTC, Mike Parker wrote:
 On Sunday, 17 January 2016 at 00:18:37 UTC, Dibyendu Majumdar 
 wrote:

 Unfortunately I find that premake doesn't support DMD 
 correctly on Windows 64-bit - it attempts to use the D linker 
 rather than the MS Linker.

 Regards
I can reproduce this. Specifying architecture "x64" apparently does not cause -m64 to be passed along to DMD and it must be set in a buildoptions directive.
https://github.com/premake/premake-dlang/issues/6
Jan 16 2016
prev sibling parent Manu via Digitalmars-d <digitalmars-d puremagic.com> writes:
On 17 January 2016 at 10:18, Dibyendu Majumdar via Digitalmars-d
<digitalmars-d puremagic.com> wrote:
 On Friday, 15 January 2016 at 21:13:22 UTC, Dibyendu Majumdar wrote:
 On Tuesday, 2 June 2015 at 08:23:08 UTC, Manu wrote:
 Perhaps of interest, I have been maintaining D support in Premake for
 years (as an extension).
 It was finally merged into mainline... so Premake now officially
 supports D out-of-the-box. Huzzah!
Hi - Thanks for this; I currently use CMake for C/C++ projects, but due to lack of support for D in CMake, planning to migrate to premake.
Unfortunately I find that premake doesn't support DMD correctly on Windows 64-bit - it attempts to use the D linker rather than the MS Linker. Regards
It's a bug, instructions for workaround on the bug report. The project is incorrectly being populated with '<isX86_64>0</isX86_64>', which should be 1 for x64. You can fix it manually or with a script if you like, I'll fix the actual bug asap.
Jan 17 2016