{jenkins-plugin-info:cmakebuilder|jiraComponent=cmakebuilder-plugin}

This plugin can be used to build cmake based projects within Jenkins.
It provides

  • a build-step that generates the build scripts from a CMakeLists.txt file and allows to run these with the appropriate build tool,
  • a build-step to invoke some tools of the CMake suite (CMake/CPack/CTest) with arbitrary arguments plus
  • automatic installation of the CMake tool suite.

Screenshots (for the impatient)

Screenshots showing the configuration can be viewed here CMake Build Configuration, here Tool Configuration and here Global Configuration.

Global configuration

To ease the pain of provisioning Jenkins worker nodes, the plugin can download a recent version of cmake on demand from cmake.org and use that exclusively for a build. (Thanks to cmake.org for constantly providing portable/relocatable binaries for public download.)
Jenkins admins may configure the available CMake versions on the global configuration page.

Build-script generator build step

This build step generates the build scripts from a CMakeLists.txt file and is able to run the scripts. It accepts the following parameters:

  1. CMake version to use — downloaded on demand, selectable versions get configured on the global configuration page
  2. CMake Buildscript Generator
  3. Source directory
  4. Build directory
  5. CMake Build Type — Debug/Release/...
  6. Cache file — to pre-populate cmake cache variables
  7. Clean/Incremental build — to clean the build directory prior to buildscript generation
  8. Pass arbitrary command-line arguments to cmake.

To perform the actual build, this build step tries to detect the actual build tool corresponding to the chosen CMake Buildscript Generator and

CMake/CPack/CTest execution step

This build step allows to invoke the corresponding tool of the CMake suite with arbitrary command-line arguments.
It accepts the follwing configuration parameters:

  1. CMake version to use
  2. Working directory
  3. Command-line arguments.

Change Log

Version 2.6.0 (21 Jun 2018)

This change affects only cmake installations that do not install automatically. Any default InSearchPath installation with a tool name of just cmake is auto-migrated. Anyway, You will find messages in the Jenkins log if the cmake installation cannot be auto-migrated.

Version 2.5.2 (05 May 2018)

Version 2.5.1 (31 Mar 2018)

Version 2.5.0 (27 Mar 2018)

DO NOT USE WITH PIPELINE: The Pipeline snippet generator duplicates argument 'cmakeArgs' as 'arguments and 'buildDir as 'workingDir'.

Version 2.4.6 (11 Feb 2018)

Version 2.4.5 (04 Apr 2017)

Version 2.4.4 (20 Sep 2016)

Version 2.4.3 (26 Jun 2016)

Version 2.4.2 (09 May 2016)

Version 2.4.1 (24 Feb 2016)

Version 2.4.0 (6 Feb 2016) DO NOT INSTALL!

DO NOT INSTALL: Existing build steps will loose their cmake-argument and working dir settings.
For those who have it installed: Do not run Manage Old Data from the Jenkins Management page.

Version 2.3.3 (20 Nov 2015)

Version 2.3.2 (9 Oct 2015)

Version 2.3.1 (4 Oct 2015)

Version 2.3 (11 Sep 2015)

Version 2.2 (28 Aug 2015)

Version 2.1 (11 Jul 2015)

Version 2.0 (5 Jul 2015)

This version is almost a complete re-write. Unfortunately, due to its new set of features,
it will be incompatible with older versions.
Changes include

Version 1.10 (14 Jun 2015)

Version 1.9 (17 Apr 2011)