lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Feb 2, 2008 5:08 PM, Wesley Smith <wesley.hoke@gmail.com> wrote:
>
> Well, when you include modules like lfs (Lua File System), lua SVN,
> luasocket, etc., I'd wager that you could indeed do more with Lua than
> you could with CMake (or at lest in a more unified fashion without
> having to resort to shell scripts and such).  I may be wrong though.
> Does CMake allow for the programmatic searching of files in directory
> trees or allow updating of files from a repository?

CMake has ADD_CUSTOM_COMMAND which allows you to do anything.  If you
want to knock yourself out with Lua or Python or Perl or Ruby
scripting, you can.  I don't think "in a more unified fashion" is a
compelling benefit.  There are Lua shops, there are Python shops,
there are Ruby shops, etc.  I do think it is appropriate for CMake to
assimilate the minor functionality of various scripting languages.
For instance, CMake has acceptable regular expression support at
present, and it seems silly to me to call out to Python or Perl or sed
to do simple regex processing.  So my own translation scripts convert
all of that to CMake's regular expressions.  But if someone wants to
do a whole lot of custom processing in their favorite scripting
language, they should just call out.  Or else learn CMake script and
call out to a CMake script, that's what I do.

For large builds, I'm interested in whether there's something that
fullblown scripting languages can do, structurally / organizationally
speaking, that CMake script can't do.  Like OO in the build system,
for instance.  Is it helpful?  Does it matter?  Once upon a time, I
didn't think lexical scoping would matter much in the build system,
that it was ok for all variable names to be global.  Then my build got
sufficiently complex and I started wanting lexical scoping.  Many
other people did too, so this is being added in CMake 2.6.0.  We'll
have proper function calls and local variables and so forth.  My
thought is, if I didn't previously anticipate the need for OO or some
other higher level organizing paradigm, could I be wrong again?

But I no longer believe that it matters for small to medium sized
projects, like up to 100K LOC.  They just aren't big enough to need a
complicated build structure.


Cheers,
Brandon Van Every