CMake
for macOS
Use this page to configure CMake in your project. The settings described here are project-related; this page is marked with icon.
Item | Description |
---|---|
Automatically reload CMake project on editing | If this checkbox is selected, CLion automatically reloads a project while editing a CMake file. If this checkbox is not selected, after editing a CMake file a banner shows up, where you can choose to reload the current project manually, or enable automatic reload, which leads to selecting this checkbox: ![]() However, if external changes take place (for example, version control update), the CMake project reloads anyway. |
Profiles
Profiles list | In this field, select a CMake profile to be generated. You can edit or delete the existing profile or create a new one.
Note, that the list of CMake profiles determines the list of profiles of the Run/Debug Configurations dialog and the list of resolve contexts. |
Name | This field represents the name of the selected profile. |
Build type | From this drop down list select the desired build type. The default type is Debug. |
Toolchain | From this drop down list, select the desired toolchain. This list consists of toolchains you had created in the Toolchains settings dialog. If nothing is selected, the Default toolchain is used. |
CMake options | In this text field, specify the additional CMake options to be passed to the CMake command. The options should be delimited with spaces. |
Environment | Click
|
Generation path | Specify here the location of the generated CMake files. That could be either absolute (for example, c:\CLion Projects\My Project\CMake Files\cmake-build-debug or relative to the current project root path (for example, cmake-build-debug):
This setting is saved in .idea/workspace.xml and is not supposed to be shared. Note: If you select a subdirectory of the project root as the generation output, the IDE marks the files of that subdirectory as excluded from the project and considers them as non-project files. Navigation actions like Navigate to file are not applicable to these files. |
Build
Description | |
---|---|
Build options | In this text field, specify the options to be passed to the build tool used by CMake. Find more information about the available build options in the CMake documentation. You can also click If nothing is specified, the default settings are used. Note, that default settings depend on the selected environment. For example, if make generator is selected, the default value is |