Tuesday, April 15, 2008

Cmake: it just keeps getting better

I have talked about how great cmake is before. Yesterday I read a little more and found it better then I thought. Included with cmake is ctest and cpack.

Ctest can be used to run test cases and every can have the output of these test sent to a web thing called Dart. Once cmake is up and running it is easy to add ctest. It took me two like to have a simple test working.

After learning about ctest it sent me down a path that showed me I need to look into testing more. I think ctest will work best to build components and then build small test drives for these components. It seems to me you need to know how to build good interfaces before you use test good. The last thing I want to do is write a bunch of test and then refactor the interface. This means changing the test and the code in the project that uses that component. Assume I figure this out I think ctest will make test easy and "fun".

Then there is cpack. Once we have some code we think other should have it would be nice to provide them an easy method to install it. That is were cpack comes in. Because the cmake tools are cross platform so is cpack. It can (or will be able soon in cmake 2.6) to create deb, rpm, and window installers. Plus a couple of other simple script and tar installers for *nix. So assuming you know what you are doing it will be easy to get the software out there.

I think the worst part of the cmake tool is the documention. It seems like there are very few examples of all these great features. They sell a book, but I don't want to buy it just to have them release a new version and make the book out of date. So I guess I will keep playing with cmake until I figure it out. Overall if you need to build your system I would say you need to look at cmake. It is nice.

2 comments:

Redsaz said...

Paul, thanks to your hard work in this field, I hereby use my powers to declare you the designated "Build Master of Pezad." It is a thankless job, and it also a job that doesn't actually exist, and I actually have no power in Pezad to declare you any title whatsoever. However, since you know more about cmake or make than anyone else at Pezad, you are also the most qualified. Congratulations!

Also, for people not currently involved in Pezad, we have a system of meritocracy. However, we never use it, so instead we are using anarchism. This is really because we are too lazy to enforce a true structure yet. That will come in a later version.

paul said...

A build master. Sounds like a title I could take on. I was once a web master, but that was not as cool.