Load/reload CMake
Last modified: 11 January 2023Load CMake
When a CMakeLists.txt file is detected under the project root, CLion loads its automatically.
To manually load a CMakeLists.txt file, right-click it in the project tree and select Load CMake Project from the context menu:
Reload CMake on changes in CMakeLists.txt
When you make changes in the CMakeLists.txt file, CLion prompts you to reload the project.

There are two options for project reload:
Reload changes
In this case, you reload the project once, and all the subsequent changes in CMakeLists.txt will also require reloading.
Enable Auto-reload
This option lets CLion silently reload the project on every change in your CMakeLists.txt.
This is similar to selecting the Reload CMake project on editing CMakeLists.txt or other CMake configuration files checkbox in Settings | Build, Execution, Deployment | CMake:
Note that your project is reloaded automatically when you reset the CMake cache.
Disable CMake auto-reload
To completely disable automatic reload including external changes, go to Settings | Advanced Settings and set the corresponding checkbox:
Reload CMake manually
To reload a project manually when needed, use one of the following options:
Call Find Action (Ctrl+Shift+A) and start typing reload cmake. Select the
Reload CMake Project action.
From the main menu, select File |
Reload CMake Project or Tools | CMake |
Reload CMake Project.
In CMake tool window, click
.
tip
You can also assign a shortcut for the Reload CMake Project action in Settings | Editor | Keymap
Stop project reload
To stop the process of reloading a project, use one of the following options:
Call Find Action (Ctrl+Shift+A) and start typing stop cmake. Select the
Stop CMake Project Reload action.
In CMake tool window, click
.
tip
You can also assign a shortcut for the Stop CMake Project Reload action in Settings | Editor | Keymap
Manage run/debug configurations on project reload
When you add or delete targets and reload your project, CLion automatically creates or deletes the corresponding run/debug configurations.
You can control this behavior in Settings | Advanced Settings:

Unload CMake
Use the Unload CMake Project action when you need to unlink your project off the CMake build system completely or when CLion loads a CMakeLists.txt script, but you want to use another one for your project.
Call Tools | CMake | Unload CMake Project from the main menu.
Upon this action, your project's state is as described in Load CMake.
Thanks for your feedback!