[CMake] Re: premake build system

Rodolfo Schulz de Lima rodolfo at rodsoft.org
Mon Dec 17 13:52:58 EST 2007


Bill Hoffman escreveu:

> Command line options have been a feature request for some time.  If 
> someone comes up with a good way to do them, I have no problem putting 
> them in CMake.  I guess the problem has always been the iterative nature 
> of the CMakeCache.txt file.   --help has to basically run the entire 
> build script to find all the arguments.  So, no need to fork on this.

Maybe not that much... I think it'll suffice to traverse the build tree 
analyzing the CMakeLists.txt, looking for argument definitions. That's 
pretty quick in C++.

> If there is something you can not do with the current cmake language 
> that could be done in lua (other than aesthetics), let us know, and 
> provide a patch, or even a report, and most likely we will put it in 
> CMake.  So, no need to fork here...

As I've said somewhere, I'm working on a macro to support precompiled 
headers. To do it properly, cmake should be a little more than a build 
system language. You might say that if I want something more elaborate, 
I could do it in C/C++ and add the command to cmake using load_command. 
But you cannot expect that everyone with a specific need should know a 
complex language like C++.

I right now need some kind of mapping data structure, like C++'s 
std::map, to record whether I've already created a pch file with certain 
flags, and what is its output name. I could do it easily with Lua 
because it supports common programming structures (a map, which it 
supports natively). But I'm stuck with cmake and must do ugly, 
non-optimal (speed-wise) things to simulate this behavior.

> I would say add the 10% to the current CMake.  I think we (cmake 
> developers) are very open to adding new and useful things to CMake. 
> Complete tested patches are always welcome.  Before wasting time on 
> creating one, it is a good idea to discuss the idea on the list to make 
> sure there is buy in.

Thanks Bill, this is the attitude that made me come to cmake, after 
reading all good things written by KDE people about it and Kitware. In 
the end, the users will have the best build system ever, and Kitware 
will have a superb visibility (i.e., money coming in...).

Regards,
rod



More information about the CMake mailing list