A few months ago I set out to build my first hudson plugin. It was an interesting, sometimes difficult journey which came to a good end with the CMake Builder Plugin, a build tool which can be used to build cmake projects with hudson. The feature set of this first version was somewhat limited since I applied the scratch-my-own-itch approach – which by the time meant only support for GNU Make under Linux.
As expected, it wasn’t long until feature requests and enhancement suggestions came up in the comments of my corresponding blog post. So in order to make the plugin more widely useable I used our second Open Source Love Day to add some nice little features.
Update: I used our latest OSLD to make the plugin behave in master/slave setups. Check it out!
Let’s take a walk through the configuration of version 1.0 :

1. As in the first version you have to set the path to the cmake executable if it’s not already in the current PATH.
2. The build configuration starts as in the first version with Source Directory, Build Directory and Install Directory.

3. The Build Type can now be selected more conveniently by a combo box.
4. If Clean Build is checked, the Build Dir gets deleted on every build

5. The advanced configuration part starts with Makefile Generator parameter which can be used to utilize the corresponding cmake feature.
6. The next two parameters Make Command and Install Command can be used if make tools other than GNU Make should be used
7. Parameter Preload Script can be used to point to a suitable cmake pre-load script file. This gets added to the cmake call as parameter of the -C switch.
8. Other CMake Arguments can be used to set arbitrary additional cmake parameters.
The cmake call will then be build like this:
/path/to/cmake \ -C </path/to/preload/script/if/given \ -G <Makefile Generator> \ -DCMAKE_INSTALL_PREFIX=<Install Dir> \ -DCMAKE_BUILD_TYPE=<Build Type> \ <Other CMake Args> \ <Source Dir>
After that, the given Make and Install Commands are used to build and install the project.
With all these new configuration elements, the CMake Builder Plugin should now be applicable in nearly every project context. If it is still not useable in your particular setting, please let me know. Needless to say, feedback of any kind is always appreciated.


