# Build actions

> **TL;DR**
> `Build` in the main menu

The actions for building, cleaning, and installing projects are grouped in the Build section of the main menu.

Tables below describe how the Build actions work for the following types of projects:

* [CMake](quick-cmake-tutorial.html),

* [Makefile](makefiles-support.html),

* [Meson](meson.html),

* [Compilation Database](compilation-database.html) with [custom build targets](custom-build-targets.html) and [custom run/debug configurations](custom-build-targets.html#custom-rundebug).

## Build actions for CMake projects

| Action | Description |
|  Build Project  |  Builds the `all` target from each [CMake profile](cmake-profile.html) configured for the current project:   ![build project action](https://resources.jetbrains.com/help/img/idea/2026.2/cl_buildproject.png) This action serves as the most global build action, as it does not require a CMake profile or Run/Debug configuration to be preselected.  |
|  Build All in <selected profile>  |     Builds the `all` target from the current CMake profile.       You can configure the profiles in [CMake settings](cmake0.html) and then select the desired one in the Run/Debug configuration switcher.     |
|  Build <selected configuration> |  Builds the selected [Run/Debug configuration](run-debug-configuration.html) for CMake projects.  |
|  Recompile <current file>  |     [Compiles](compiling-single-file.html) the currently opened file or a group of files, if selected in the Project View. When used for multiple files, recompilation stops upon the first compilation failure.     |
|  Install  |  Runs `cmake install` for the currently selected CMake profile (for more information, refer to [CMake install](using-cmake-install.html)).  |
|  Rebuild Project  |     Calls Clean for all the CMake profiles and then Build Project.     |
|  Rebuild All in <selected profile>  |  Calls Clean and then Build All in <selected profile>.  |
|  Rebuild <selected configuration>  |     Calls Clean and then Build <selected configuration>:      ![rebuild configuration](https://resources.jetbrains.com/help/img/idea/2026.2/cl_rebuildconfig.png)  |
|  Clean  |  Cleans the project by building the `clean` target from the current CMake profile.  |

## Build actions for Makefile projects

| Action | Description |
|  Build Project  | Calls `make` for the target specified in the Build target field of the [Makefile settings](makefiles-support.html#makefile-settings) or for the first target in the project’s top Makefile if Build target is empty.  |
|  Build <selected configuration> | Calls `make` for the target specified in the selected [configuration](makefiles-support.html#rd-configs). |
|  Recompile <current file>  |     [Compiles](compiling-single-file.html) the currently opened file or a group of files, if selected in the Project View. When used for multiple files, recompilation stops upon the first compilation failure.     |
|  Rebuild Project  | Calls `make clean` and `make` for the targets specified in Build target and Clean target of the Makefile settings. If Build target is empty, the first target from the project’s top Makefile is used.  |
|  Rebuild <selected configuration>  | Calls `make clean` and `make` for the target specified in the selected configuration. |
|  Clean  | Calls `make clean` for the target specified in the selected configuration. |

## Build actions for Meson projects

| Action | Description |
|  Build Project  |  Calls `meson compile`.  |
|  Build <target> |  Calls `meson compile <target>`.  |
|  Recompile <current file>  |     [Compiles](compiling-single-file.html) the currently opened file or a group of files, if selected in the Project View. When used for multiple files, recompilation stops upon the first compilation failure.     |
|  Rebuild Project  |     Calls `meson compile --clean` to clean up the project, then calls `meson compile`.     |
|  Rebuild <target>  |     Calls `meson compile --clean` to clean up the project, then calls `meson compile <target>`.     |
|  Clean  |  Calls `meson compile --clean` to clean up the project.  |

## Build actions for Compilation Database projects

| Action | Description |
| --- | --- |
|  Build Project  |  For custom build targets: calls the Build tool of the first target. |
|  Build <selected configuration> | For custom Run/Debug configurations: calls the Build tool of the target specified in the selected configuration. |
|  Recompile <current file>  |     [Compiles](compiling-single-file.html) the currently opened file or a group of files, if selected in the Project View. When used for multiple files, recompilation stops upon the first compilation failure.     |
|  Rebuild Project  |  For custom build targets: calls the Clean tool, then the Build tool of the first target. |
|  Rebuild <selected configuration>  | For custom Run/Debug configurations: calls the Clean and then the Build tool of the target specified in the selected configuration. |
|  Clean  | For custom Run/Debug configurations: calls the Clean tool of the target specified in the selected configuration. |

## See also

### How tos

[Quick CMake tutorial](quick-cmake-tutorial.html) [Compile files without build](compiling-single-file.html) [CMake install](using-cmake-install.html)

