Update: Check out my post introducing the newest version of the plugin.
Today I’m pleased to announce the first version of the cmakebuilder plugin for Hudson. It can be used to build cmake based projects without having to write a shell script (see my previous blog post). Using the scratch-my-own-itch approach I started out implementing only those features that I needed for my cmake projects which are mostly Linux/g++ based so far.
Let’s do a quick walk through the configuration:
1. CMake Path:
If the cmake executable is not in your $PATH variable you can set its path in the global Hudson configuration page.
2. Build Configuration:
To use the cmake builder in your Free-style project, just add “CMake Build” to your build steps. The configuration is pretty straight forward. You just have to set some basic directories and the build type.
The demo config above results in the following behavior (shell pseudocode):
if $WORKSPACE/build_dir does not exist mkdir $WORKSPACE/build_dir end if cd $WORKSPACE/build_dir cmake $WORKSPACE/src -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$WORKSPACE/install_dir make make install
That’s it. Feedback is very much appreciated!!
Originally the plan was to have the plugin downloadable from the hudson plugins site by now but I still have some publishing problems to overcome. So if you are interested, make sure to check out the plugins site again in a few days. I will also post an update here as soon as the plugin can be downloaded.
Update: After fixing some maven settings I was finally able to publish the plugin. Check it out!
19 thoughts on “CMake Builder Plugin for Hudson”
Great job! At work, we have been using Hudson for a long time. Recently, I am looking into CMake as well, and this plugin is really handy.
Excellent, I’ve been using CMake for a couple of years now, and have been wanting to replace the cron + ctest + cdash CI combination I’m currently using, and have been looking at how I can make it work with Hudson.
This looks like it’ll make an excellent first step towards that.
I look forward to trying it out.
@Stuart: Thanks for your comment. I haven’t been using ctest/cdash in a real-world project so far so your feedback will be very interesting for me. Make sure to let me know how the plugin could be improved in that regard.
hi,thanks for your excellent job!
where can i get this plugin? The hudson official site?
Does this plugin work well for c project?
My project was written by C and using
c-unit(http://code.google.com/p/c-unit/) to test my code.
@pollux Su: You can download the plugin from the official hudson site. Just go to Downloads -> Plugins.
Regarding your second question: You should be able to use the plugin for C projects, too, since CMake itself works well for C projects.
Would you like to post a blog to show me the entire CI process of implement a project written by C language. Especial unit test and cmake! Of course your cmake build plugin.:)
@Joey Z: I’ve never done a pure C project which had a CI process and unit tests, but with regard to Hudson and the CMake Builder Plugin every thing should work as with C++. Maybe it’s possible for you to use a C++ unit testing framework to test your C code?
Nice plug-in! I tested it on two projects and it works great. But I do have one request for the next version: is it possible to use the CMAKE_MAKE_PROGRAM variable to specify build tool instead of ‘make’. For instance MinGw uses mingw32-make.
@Ole: Thanks for your feedback. That’s exactly the kind of requests I was hoping for since they will make the plugin applicable for more development environments. I will release a new version some time in the next few days.
I too am excited to find this plugin! However I’m having problems with it deleting the workspace if cmake fails to run (in my case, because I gave it the wrong directory). Any idea what this might be about? Again thanks for your work!
@Simeon: What exactly are your problems with deleting the workspace?
I am having problems with it tryng to create windows paths when connected to Unix nodes.
Directory could not be created: C:\opt\Hudson\workspace when it should be trying to create /opt/Hudson/etc
Does this plugin work on Windows? I tried using it on Windows, but there is no output from cmake.
Thanks for the plugin :).
I’d also be interested to know: Which other Hudson plugins do you use for C++? I can’t find anything about C++ uses for Hudson on the net.
Can you please change the order of arguments so they will correspond to the documentation:
This means that the path to source should be at the end not at the beginning. And I have got an issue with this.
When I try to define “Pre-load a script to populate the cache” using -C argument and execution fails with an error.
cmake.exe “./sourcePath” -C “./presetPath/preset.cmake” -G “Visual Studio 8 2005” -Wdev
cmake.exe -C “./presetPath/preset.cmake” -G “Visual Studio 8 2005” -Wdev “./sourcePath”