CMake is a project that aims at being a replacement for the GNU Build System (Autoconf, Automake and friends). DevChannel asked Andy Cedilnik, one of CMake’s core developers, a few questions about the project’s philosophies. UPDATE: Part II of the article here.
but i’m all for scons:
http://www.scons.org
Having used it from small to very large projects, I’m not willing to replace it. Its only drawback is that it cant be parsed to be used from an IDE (although it can generate IDE project files including for vs.net), but being so easy to add files and dirs (I actually have it to scan the dir for .cpp files and compile them), managing single libraries across many directories, managing multiple compile trees (one with debug, one without, or one with another compiler), extremely easy portability (works perfect in windows and with microsoft compilers), etc.
It still needs work on the detection area though, but luckily most stuff can be retrieved with pkg-config.
After using CMake for over a year, I really don’t understand why it hasn’t become _wildly_ popular. Header configuration is easy, dependency tracking is automatic, out-of-source builds are trivial, library building is trivial, optional components are simple to specify, etc. And all of this is implemented using a single CMake package with no dependencies to anything except your C++ compiler. And it works flawlessly on Windows (without Cygwin!) as well as *nix.
Not to say that autotools don’t do the job – they obviously do. But CMake is so very far ahead of autotools that I’m really at a loss to explain why autotools is still used at all.
are the autotools a cryptic mess that is so complex that there has to be something better?
I’ve been looking for a *good* alternative to the GNU autotools for awhile now, and this seems to fit the bill.
No, it’s not just you. The autotools are a complex mess. I don’t trust anything that generates code that I can’t read… I use scons on a couple of projects, and it is insanely great
How does it compares to the others?
http://buildtool.sourceforge.net
I was going to mention buildtool as well, I haven’t tried it but it looks pretty nice, and more simple than something python based like scons.
I agree, add any bigger dependency over a simpile thing is kind of annoy to me like scons. It makes easier to be part of core/base system.
I’ve been particularly interested in the prospects of Cmake and buildtool. What I would like to see is how Cmake compares to buildtool, though. (I don’t have any interest in autotools, so I don’t see a point in comparison)
–Tim
Building out of source is trivial with autotools. After cd:ing to your build dir:
configure; make
thats it! you need to supply the path to configure, of course.
It’s not just you. I tried to learn autotools once, bought a book even, but there was so much cruft I couldn’t stand it.
About the only good thing I have to say about autotools is their output can be run on any Unix set up for development (Make + compiler, basically) and build your program without having to install any new tools.
Having just heard of CMake, I think I will check it out in detail. I’ve been wanting something better than autotools for a while, but XML seems ridiculously heavyweight for specifying a build (ANT) and I’m not sure I like the idea of needing Python to build a program (SCons).
At any rate, it will be interesting to see what happens in the next few years, if one of these new generation of make + autotools replacements ‘wins’ the popularity contest and if we have a new de-facto standard for building cross-platform software.
Personally, I don’t understand why someone would choose to use non-GNU tools when GNU tools are already available. Why not just help to make Autotools better? GNU needs all the support it can get, and using competing projects will not help GNU and Free Software become better.
using non-GNU *CAN* help Free Software ecology.
Free Software is not just GNU.
and sometimes to make something better,
it may not possible to just fixing/doing patch/adding features on top of existing one,
but need to redesign to whole architecture/process (or philosophy).
may be it just like Emacs, Emacs is great, it can do everything, but not everybody like its philosophy/style.
and well, this is ‘freedom’.
cmake is written in c++. but i think it’s more portable using ansi c
Another system would be Pre Make Kit (http://pmk.sourceforge.net/). Any more?
To me it looks like a guy trying to solve the easy problems. What if you want to use cmake when you want to build Eiffel programs for example? Test for some strange things?
Shell scripts are actually useful to test for things, versions, etc. Declarative programming just isn’t enough. But I’m sure cmake will find its niche.
And autoconf isn’t that hard, just do a small project, and go from there.