Compartir vía


CMake@1 - CMake v1 task

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

Inputs

workingDirectory - Working Directory
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.


cmakeArgs - Arguments
string.

The arguments passed to CMake.


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?

  1. Deploy an agent.

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

  3. 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?

Requirements

Requirement Description
Pipeline types YAML, Classic build
Runs on Agent, DeploymentGroup
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 Any
Settable variables Any
Agent version 1.91.0 or greater
Task category Build