Reloading Project
When a CMakeLists.txt
file changes, CLion shows a banner on top of the editor:
As you see, CLion suggests to reload the current project using the following options:
Reload changes
Enable Auto-reload
Choose the first option to reload the current project manually. In this case, the subsequent editing on the file CMakeLists.txt
will lead to showing the same banner.
The second option results in selecting the checkbox Automatically reload CMake project on editing in the CMake page of Settings. All the subsequent changes of the file CMakeLists.txt
will cause the automatic reload of the current project and will pass unnoticed.
It is possible to make CLion always reload automatically. This is done in one of the following ways:
Open Settings, and under the Build, Execution, Deployment node click the CMake page. Then select the checkbox Automatically reload CMake project on editing.
Click and type
reload cmake
. Click the line with the required action:
In addition, CLion allows you to reload the project using the main menu. To reload a project from the main menu, do one of the following:
On the main menu, choose
On the main menu, choose
In CMake tool window, click the button
Resetting CMake cache
In some cases you may need to reset the CMake cache before building a project, without affecting the CLion cache. To reset the CMake cache and reload the project, do one of the following:
Go to
.Click the button of the CMake tool window. In the drop down menu that opens, select the Reset Cache and Reload Project option.