[CMake] Re: CMake script vs. Lua

Brandon Van Every bvanevery at gmail.com
Fri Dec 14 16:56:12 EST 2007


On Dec 14, 2007 3:54 PM, Rodolfo Schulz de Lima <rodolfo at rodsoft.org> wrote:
> I look to a cmake script and it YELLS at me, with all
> those upper cased letters.

The newfangled style is to write your commands in lower case.  All the
CMake CVS documentation is in this style now.  I've started to adopt
it in my own work, as it saves me having to hold down Caps Lock as
much.  CMake variables are still UPPER_CASE.  Both lower and upper
case is accepted for commands; haven't tried variables.

> The assignment syntax is ugly,

I can't call set(var value) "ugly".  I can call it slightly verbose,
as opposed to var=value.

> and repeating
> the if clause in else() and endif() is boring and error prone (albeit
> this check can be disabled)

It is boring precisely because it is *not* error prone.  It is a way
of ensuring against errors.  If you haven't got your if..else..endif
conditionals matched up, your code dies.  Usually with an error
message... sometimes though, it seems to die silently when invoked by
a shell.  That could be handled better.  But the principal of forcing
conditional matching is a reasonable idea in a build system, I think.

> and we can't exit a for loop before it ends
> (mimicking C's 'break' clause).

I rarely use 'break' even in C code.

> I can live with those things, hoping
> that cmake language will improve with time.

Here, the strategic issue is not minor features the language does or
doesn't have.  The strategic issue is that the new CMake user has to
learn it, and objects to having to learn it, because it is Yet Another
Scripting Language.  The marketing value of Lua is that a lot of
people already know it, and hence, a lot of people are willing to
learn it.  They'll go through exactly the same pain about what Lua has
/ doesn't have, but they won't *mind* it, because they already believe
in Lua before they even start learning the details of it.  The
assurances of the rest of the computer industry make it so; "Lua is
considered Good."  The same cannot be said for CMake script, and will
never be said for CMake script, unless it becomes the de facto
standard build system that everyone in the computer industry uses for
nearly everything.  We're nowhere near that endgame, and with CMake's
current infrastructure, we're at no risk of ever being in such a lofty
place.  So, I feel comfortable saying that CMake will remain Yet
Another Scripting Language.

Previously I asked if there's something CMake script can never do.  I
will say 1 such thing: it will *never* gain mindshare.  CMake itself
may gain plenty of mindshare as a build tool.  But CMake script will
never do so.  It is incapable of that.  It is not recognized by the
computer industry as an important development language, and it never
will be.


Cheers,
Brandon Van Every


More information about the CMake mailing list