CMake for D2 ready for testers

Russel Winder russel at russel.org.uk
Sat Oct 9 03:30:44 PDT 2010


On Sat, 2010-10-09 at 12:06 +0200, Jens Mueller wrote:
[ . . . ]
> With CMake you can check whether Qt is installed on the system. There is
> a FindQt.cmake.

Waf can do this sort of thing simply as well, especially via pgk-config
if available.  SCons is a little more clumsy but it is there and usable.

Basically I think they are all the same on this sort of point in that
there is a tick in the box.

[ . . . ]

> They have very good documentation. Something that's not the case for
> CMake. With CMake you have to google a lot. Thankfully that's mainly
> needed if you dive into into the internals. Writing a simple
> CMakeLists.txt is a matter of minutes. I hope I'm not too biased here
> because I've been using it for almost 2 years.

I agree that just writing CMakeLists.txt is not hard if you have a
straightforward project.  But I found the poor documentation of CMake a
barrier a couple of years back when I had a non-standard build.

To be honest I don't think the Waf documentation is that good either.
In far too many places presentation is Waf implementation oriented and
assumes knowledge of the source code.  SCons documentation is not that
great either.  The user guide is a bit too superficial, but the manual
page is authoritative, just lacking in examples.  The wikis and
especially the mailing lists are the things that mean Waf and SCons
users have few problems.   

[ . . . ]

> > ctx.find_program('touch', var='TOUCH')
> 
> Only finds a program, right? I'd like to find a library. I.e. I need the
> path to the header files and the library files. I'll guess there is
> something like find_file.

The giveaway is in the method name :-)  there are also methods for
checking for header files, libraries and packages.  SCons is a bit
behind Waf on this but it does have all the facilities.

[ . . . ]
> I do not know how important this whole Windows integration is, but with
> CMake you can generate a Windows installer.
> Together with Visual Studio support it's a good choice if Windows is
> your main client. Could be the reason why CMake is used so often.

I suspect CMake is ahead of Waf and SCons on this, but there are
external tools that can be use, and I am fairly sure they are usable
trivially from Waf and SCons.

[ . . . ]
> You need to have python installed. I have no feeling how many system
> have python installed. But probably more than CMake.

I suspect that Windows is the only system that does not now ship a
version of Python as standard.

[ . . . ]
> > In any case, it's interesting and we'll put it on our evaluation-list.
> 
> Can you keep me informed about the result? Just curious which features
> influenced your final decision.

I'd love to know as well.  All too often people make decisions and the
decision gets promulgated, but without the rationale for the decision.
It is the decision+rationale that is so useful for future decision
making.

-- 
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 russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101009/de8a5b0e/attachment.pgp>


More information about the Digitalmars-d mailing list