Uses CMake to generate build-scripts and can run these.
This invokes cmake with the given options to generate the build scripts.
Any non-zero exit code during build-script generation causes Jenkins to mark the build as a failure.

To run the generated build script, you have to add build tool invocation steps.

For example, to run the equivalent of the sh shell script

   mkdir build && cd build
   cmake -G Ninja <workpace-root>/source
   DESTDIR=<workpace-root>/artifacts ninja all install
  
you would enter the following pipeline script:

  cmakeBuild
      generator: 'Ninja',
      buildDir: 'build',
      sourceDir: 'source',
      installation: 'InSearchPath',
      steps: [
          [args: 'all install', envVars: 'DESTDIR=${WORKSPACE}/artifacts']
      ]