This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge - task: CMake@1 inputs: #workingDirectory: 'build' # string. Alias: cwd. Working Directory. Default: build. #cmakeArgs: # string. Arguments. # Advanced #runInsideShell: false # boolean. Run cmake command inside shell. Default: false.
# CMake v1
# Build with the CMake cross-platform build system.
- task: CMake@1
  inputs:
    #workingDirectory: 'build' # string. Alias: cwd. Working Directory. Default: build.
    #cmakeArgs: # string. Arguments.
# YAML Syntax is not supported in TFS 2018.
# Use the classic designer to add and configure tasks.
# See the following Inputs section for details on the inputs that this task supports.
Input alias: cwd. string. Default value: build.

The current working directory when CMake is run.

If you specify a relative path, then it is relative to your repo. For example, if you specify build, the result is the same as if you specified $(Build.SourcesDirectory)\build.

You can also specify a full path outside the repo, and you can use variables. For example: $(Build.ArtifactStagingDirectory)\build

If the path you specify does not exist, CMake creates it.

Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

None.

Remarks

Use this task to build with the CMake cross-platform build system.

How do I enable CMake for Microsoft-hosted agents?

The Microsoft-hosted agents have CMake installed already, so you don't need to do anything. You do not need to add a demand for CMake in your azure-pipelines.yml file.

How do I enable CMake for my on-premises agent?

  • Deploy an agent.

  • On your agent machine, install CMake and make sure to add it to the user's path that the agent is running as.

  • In your web browser, go to Agent pools and add a capability named cmake. Set its value to yes.

    How does CMake work? What arguments can I use?

  • About CMake
  • CMake documentation
  • Demands Self-hosted agents must have capabilities that match the following demands to run jobs that use this task: cmake Capabilities This task does not satisfy any demands for subsequent tasks in the job. Command restrictions Settable variables Agent version 1.91.0 or greater Task category Build