[CMake] Re: CMake script vs. Lua

Bill Hoffman bill.hoffman at kitware.com
Sat Dec 15 12:41:38 EST 2007


OK, so here are my thoughts on using CMake as a full scripting language. ...

I think it is feature/mission creep.  When I started CMake, I was trying 
to make a tool that would make building software with native tools easy 
for non build system types of developers (mostly researchers).  Usually 
on a team of developers there is one person that knows how to build 
software, and that person maintains complicated makefiles/autotools 
stuff, and maybe a windows developer on the team maintains some visual 
studio project files.  CMake is meant to make the build system 
accessible to all the programmers on the team.  The input should and can 
be simple for many projects.  It should be easy to link in external 
libraries and to create libraries for others to use.  I think CMake has 
meet those goals fairly well.

However, I never intended for the language to be used as a general 
purpose programming tool.  There are much better languages out there for 
that type of thing.  When compared to perl/python for text manipulation 
processing CMake is a poor choice.  If on the other hand, you want to 
build a c/C++ project CMake is a good choice.  I don't think it is a 
worth while effort to try and compete with perl/python.  Use the right 
tool for the right thing.  Scope creep is a common pitfall for software 
projects.  Here are some wiki entries about the issue:

http://en.wikipedia.org/wiki/Creeping_featurism
http://en.wikipedia.org/wiki/Scope_creep

Scope creep is a more accurate term for what is going on with trying to 
make the CMake language a competitor to perl/python.

As to why I regret starting this thread, I think it is a waste of my 
time. Most likely 3 or 4 bugs from the CMake bug tracker were not closed 
because I have been reading/writing emails on this thread.  As someone 
pointed out there are plenty of bugs in the tracker to fix!

 From wiki featurism:
>  software which over-emphasizes new features to the detriment
 > of other design goals, such as simplicity, compactness,
 > stability, or bug reduction.

Adding a whole new language would not help the build process at all, and 
would take away from all of the above.  It would fork the project if we 
did not support the CMake language forever.  It would be classic CMake, 
and lua CMake or something like that.  Some projects would move over and 
others would keep using the old stuff.  Less of the bugs and build 
features would get implemented. There are plenty of important build 
features that need to be added to CMake that have nothing to do with 
language.  Those would get put on the back burner.  And, it would all be 
done for what?  So, the language was more elegant?  There are some vocal 
complainers about the language, but I suspect there is a silent majority 
that really don't care, and are just happy to have the software build 
correctly the first time they build it.  (I could have fixed at least 
one but instead of writing this email.... :)  ).

-Bill



More information about the CMake mailing list