Getting Started with CMake Build
CodeArts Build provides multiple build templates. The CMake template can be used to build and pack cross-platform projects.
This topic describes how to use the code repository template Cpp Demo and build template CMake for a build using CMake.
Preparations
- You have registered a HUAWEI ID and enabled Huawei Cloud services.
- A project is available. If no project is available, create one.
- You have created a code repository from the template in the project. If no code repository is available, perform the following steps to create one:
- Log in to CodeArts using the Huawei Cloud account.
- Click the name of the project to create a repository for it.
- In the navigation pane, choose .
- On the Repo page, click
next to New Repository and select Template Repository.
- Access the homepage of CodeArts Repo and choose New Repository > Template Repository. On the page displayed, search for and select the Cpp Demo template.
- Click Next. Enter a repository name and click OK.
Creating a Build Task
- In the navigation pane, choose .
- Click Create Task. The Basic Information page is displayed.
- Configure the parameters and click Next.
Table 1 Configuring basic information Parameter
Description
Task Name
Specifies the name of the task.
Code Source
Select Repo.
Source Code Repository
Select the repository created in Prerequisites.
Branch
Select the branch created when you create the repository (see Prerequisites). If no branch is available, select the default master.
Description
Describe the build task.
- Select CMake as the build template and click Next.
- On the Build Actions tab page, customize build actions as required.
- Click Create.
Running the Build Task
This section describes how to run a CMake build task and view the build result.
Viewing the Build Package
The build package generated using default settings in the CMake template is stored in the build_name/build_time directory of Release Repos. This section describes how to view the build package and verify the release result.
- In the navigation pane, choose .
- Go to the release repos to view the released software package. The name of the software package is the same as that of the build task (see Creating a Build Task).
Clearing Resources
To avoid unnecessary fees, you are advised to release build resources after completing tasks.
- CodeArts Repo: Delete code repositories.
- Release Repos: Delete software packages, and clear the recycle bin.
![](https://support.huaweicloud.com/eu/qs-codeci/public_sys-resources/notice_3.0-en-us.png)
Released resources cannot be recovered. Exercise caution when performing these operations.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.