Build actions
In CLion, the actions for building, cleaning, and installing projects are grouped in the Build menu.
Tables below describe how the Build actions work for CMake, Makefile, and Compilation Database projects (with custom build targets and custom run/debug configurations).
Build actions for CMake projects
Action | Description |
---|---|
Build Project | Builds the 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 You can configure the profiles in CMake settings and then select the desired one in the Run/Debug configuration switcher. |
Build <selected configuration> | Builds the selected Run/Debug configuration for CMake projects. |
Recompile <current file> | Compiles 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 |
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>: |
Clean | Cleans the project by building the |
Build actions for Makefile projects
Action | Description |
---|---|
Build Project | Calls |
Build <selected configuration> | Calls |
Recompile <current file> | Compiles 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 |
Rebuild <selected configuration> | Calls |
Clean | Calls |
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 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. |