So this is it. After 7 years of peaceful cohabitation with the autotools, we moved to cmake as a configury black magic. I must say that I had a very contradictory position on that point. I was a big fan of the move if it would eventually allow to build properly on Windows. But I also resisted a lot to the move because I feared the fancy-messy aspect of cmake. I saw a lot of pages where the main argument was "cmake is ways more cool than the oldish autotools", but I don't trust the trends.

The more combative arguments I saw in flavor of cmake were that autotools are difficult to learn. But this argument also was useless to me since I already know the autotools, and since the SimGrid project is small enough to allow me to deal with any configury issues that could appear. It's hard to learn, but I know it already.

I was also kinda waiting for cmake to become mainstream. It's a bit better than 8 years ago where I were once unable to build corba on AIX because cmake were not installed on that arch (and require a lot of python cruft to get installed manually). But we're not completely there yet: it's for example not installed in the default system image of Grid'5000...

My main issue with cmake was that I was afraid that cmake people come from the windows world, where you have only one CPU architecture (ok, 2 if you count amd64 -- but that's far from the 10+ architectures we have under Unix) and 7 versions of the operating system. The autotools is not only a set of tools, that's also a list of principles that you should follow to reach the portability grail.

But we did it. Pierre was asked since December to port SimGrid to cmake, to check whether it was a valid alternative, and we switched less than a week ago. I must say that I'm very pleased of what I discover.

  • the generated makefiles make it easy to build only a part of the system. I used to struggle with lines like "make -C src && make -C examples/msg masterslave/masterslave_mailbox && ./examples/msg/masterslave/masterslave_mailbox (+args)". Now, I simply say "make simgrid masterslave_mailbox && ctest -R masterslave"
  • ctest is ways more efficient than the old "make check" system, where I had to script in perl around it to get it usable. I love the undocumented -j flag of ctest, with which you still get a properly formated output without the tests to intermix their logs. I also love the -R flag which allows me to select very easily the set of tests to run from the mass when I change a little thing.
  • cdash is a working replacement for buildbot, with which I never managed to do exactly what I want. In cdash, it works before I try. Check it out:
  • ccmake is just a working replacement for the AutoConfInteractive set of macros that I did so long ago (and never really used because it wasn't usable). I wouldn't have even dreamed of the Qt interface to cmake in autotools context.
  • The integration into eclipse is just fine, and this also works even before I think about it.

Really, that's pleasant. I didn't had to heavily edit the cmake files myself yet and I kinda fear this stupid syntax with all upper cases, but that's barely an argument given the mess of m4 with misplaced spaces breaking everything...

I'm still waiting for the Windows port to appear to buy it completely, but it looks like I'm an happy cmake user already. I wouldn't have bet much on this 3 months earlier, actually.