Class CmakeBuilder

All Implemented Interfaces:
ExtensionPoint, Describable<Builder>, BuildStep

public class CmakeBuilder extends AbstractCmakeBuilder
Executes cmake as a build step.
Author:
Volker Kaiser (initial implementation), Martin Weber
  • Field Details

    • ENV_VAR_NAME_CMAKE_BUILD_TOOL

      public static final String ENV_VAR_NAME_CMAKE_BUILD_TOOL
      the key for the build variable that holds the build tool that the build-scripts have been generated for (e.g. /usr/bin/make or /usr/bin/ninja)
      See Also:
  • Constructor Details

    • CmakeBuilder

      @DataBoundConstructor public CmakeBuilder(String installationName)
      Minimal constructor.
      Parameters:
      installationName - the name of the cmake tool installation from the global config page.
    • CmakeBuilder

      @Deprecated public CmakeBuilder(String installationName, String generator)
      Deprecated.
      to minimize number of mandatory field values.
      Old constructor.
      Parameters:
      installationName - the name of the cmake tool installation from the global config page.
      generator - the name of cmake´s buildscript generator. May be empty but not null
  • Method Details

    • readResolve

      protected Object readResolve()
    • setGenerator

      @DataBoundSetter public void setGenerator(String generator)
      Sets the name of the build-script generator.
      Parameters:
      generator - the name of cmake´s build-script generator or null or empty if the default generator should be used
    • getGenerator

      public String getGenerator()
    • setSourceDir

      @DataBoundSetter public void setSourceDir(String sourceDir)
    • getSourceDir

      public String getSourceDir()
    • setBuildDir

      @DataBoundSetter public void setBuildDir(String buildDir)
    • getBuildDir

      public String getBuildDir()
    • setBuildType

      @DataBoundSetter public void setBuildType(String buildType)
    • getBuildType

      public String getBuildType()
    • setCleanBuild

      @DataBoundSetter public void setCleanBuild(boolean cleanBuild)
    • getCleanBuild

      public boolean getCleanBuild()
    • setPreloadScript

      @DataBoundSetter public void setPreloadScript(String preloadScript)
    • getPreloadScript

      public String getPreloadScript()
    • setPreset

      @DataBoundSetter public void setPreset(String preset)
    • getPreset

      public String getPreset()
    • setCmakeArgs

      @DataBoundSetter public void setCmakeArgs(String cmakeArgs)
    • getCmakeArgs

      public String getCmakeArgs()
    • setSteps

      @DataBoundSetter public void setSteps(List<BuildToolStep> toolSteps)
      Sets the toolSteps property.
    • getSteps

      public List<BuildToolStep> getSteps()
      Gets the toolSteps property.
      Returns:
      the current toolSteps property.
    • perform

      public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException
      Specified by:
      perform in interface BuildStep
      Overrides:
      perform in class BuildStepCompatibilityLayer
      Throws:
      InterruptedException
      IOException
    • getDescriptor

      public CmakeBuilder.DescriptorImpl getDescriptor()
      Overridden for better type safety.
      Specified by:
      getDescriptor in interface Describable<Builder>
      Overrides:
      getDescriptor in class Builder