[CMake] Re: CMake script vs. Lua

Alexander Neundorf a.neundorf-work at gmx.net
Fri Dec 14 20:45:24 EST 2007


On Friday 14 December 2007, Brandon Van Every wrote:
> On Dec 14, 2007 2:38 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> > It really boils down to this:  There is no way we can ever stop
> > supporting the current cmake language.   It would be a huge break in
> > backwards compatibility.
>
> Gee I'm getting paid to migrate a huge build system, from ancient

You're writing this since quite some time already to this list, still not 
done ? I hope you're not fiddling around with trying to use cmake as a 
programming language...

> crufty GNU Autoconf / GMake crap to CMake.  Writing a translator to go
> from CMake script to Lua script, both under Kitware's control, would

Don't try to write a converter from some buildsystem to cmake *in* cmake.
CMake is primarily a build tool, not a programming language, so use a real 
programming language for that.
I just once again did something (very small but) similar, and after thinking 
for a short time to do it in cmake (it actually didn't build anything at all, 
but just some simple scripting task) I decided to use ruby (once again, as I 
did for converting the kde makefile.am's to cmake). While not as fluent as in 
cmake it took me half an hour to do it, in cmake it would have been more 
complicated.

Conclusion: use cmake to build programs, not for writing programs

Alex


More information about the CMake mailing list