Use this page to configure CMake profile settings for the current project.
Reload CMake project on editing CMakeLists.txt or other CMake configuration files
If this checkbox is selected, CLion automatically reloads your project when you edit CMakeLists.txt or CMakePresets.json.
If this checkbox is cleared, CLion displays a pop-up message where you can choose to reload the current project manually or enable the automatic reload (which leads to selecting this checkbox):
However, if some external changes take place (for example, an update from version control), the project reloads anyway.
In this field, select a CMake profile. You can edit, delete, or add profiles here.
Note: this list of CMake profiles determines the profiles available in the Run/Debug Configurations switcher and the list of resolve contexts.
If you disable a profile, it will not be included in CMake reload. Use this option to disable the profiles you don't need at the moment.
This field represents the name of the selected profile.
From this drop down list, select the desired build type.
By default, in case this field has not been set manually, the type is Debug.
Note that the Default option corresponds to the empty value of CMAKE_BUILD_TYPE.
From this drop down list, select the desired toolchain. This list consists of toolchains you created in the Toolchain settings dialog.
If nothing is selected, then CLion uses the toolchain that is currently set as default (the first one in the toolchains list).
Here you can select the CMake generator:
Alternatively, you can set the generator via CMake options. CLion updates both fields accordingly.
In this field, specify additional CMake options, separated by spaces.
For example, here you can specify a custom CMake generator via
You can also insert project path macros in this field by clicking :
Specify here the desired location for the generated CMake files. This path can be either absolute (for example, c:\CLion_Projects\My_Project\cmake-build-debug) or relative to the current project root (for example, cmake-build-debug).
Leave this field empty to use the default location, which is cmake-build-[buid_type] under the project root.
This setting is saved in .idea/workspace.xml and is not supposed to be shared.
In this field, specify the options to be passed either to the build tool used by CMake or as command line parameters to CMake itself.
Options from this field are passed to CMake during the build phase (see the description of the CMake build command for more information).
For the arguments to be used by the underlying build tool (make, Ninja, or another one), they should be preceded with
If nothing is specified in this field, CLion uses the default settings, which depend on the selected environment. For example, if the make generator is selected, the default value is
Click to invoke the Environment Variables pane and select there the environment variables to be passed to CMake on the generation phase.