CMake Builder Plugin for Hudson

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.

cmakebuilder demo config

cmakebuilder demo config

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
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!

About these ads

19 Responses to CMake Builder Plugin for Hudson

  1. anoymous says:

    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.

  2. Stuart Herring says:

    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.

    • volkerkaiser says:

      @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.

  3. pollux Su says:

    hi,thanks for your excellent job!
    where can i get this plugin? The hudson official site?

  4. pollux Su says:

    Another question:
    Does this plugin work well for c project?

    My project was written by C and using
    c-unit( to test my code.

    • volkerkaiser says:

      @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.

  5. […] published the first version of a cmakebuilder plugin for Hudson. Check out my corresponding blog post. Possibly related posts: (automatically generated)Solr, finallyJQuery IE Selector Bug Fixed […]

  6. Joey Z says:

    Hi volkerkaiser,
    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.:)

    • volkerkaiser says:

      @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?

  7. Ole B says:

    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.

    • volkerkaiser says:

      @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.

  8. Simeon Fitch says:

    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!

  9. Scott Rasmussen says:

    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

  10. Amit says:

    Does this plugin work on Windows? I tried using it on Windows, but there is no output from cmake.

    Thanks for the plugin :).

  11. Amit says:

    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.

  12. Andrei says:

    Can you please change the order of arguments so they will correspond to the documentation:

    cmake [options]

    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
    fails. while
    cmake.exe -C “./presetPath/preset.cmake” -G “Visual Studio 8 2005″ -Wdev “./sourcePath”

  13. […] 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 […]

  14. […] of our hudson plugins, namely the cmake builder plugin, got some feature love, incorporating suggestions from plugin users. We especially thank Ole B. for […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 92 other followers

%d bloggers like this: