# CMake cache

CMake caches variables and settings in the `CMakeCache.txt` file. When you load a project for the first time, this file is generated in the build directory (`cmake-build-debug` or `cmake-build-release` by default) according to the contents of [CMakeLists.txt](cmakelists-txt-file.html).

If required, you can open and edit `CMakeCache.txt` as a regular text file. For this, click ![](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.fileTypes.config.svg) in the CMake Tool Window or locate the file in the project tree.

You can view and edit values of CMake cache variables in the [CMake profile settings](cmake-profile.html#cmake-cache-variables).

Procedure: Reset CMake cache

To reset the CMake cache without affecting the CLion cache, do one of the following:

* Select `Tools | CMake | Reset Cache and Reload Project` from the main menu.

* Click the ![](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.settings.svg) icon in the [CMake tool window](cmake.html) and select ![](https://resources.jetbrains.com/help/img/idea/2026.2/app.actions.forceRefresh.svg)Reset Cache and Reload Project:

![Reset Cache and Reload Project option in the CMake tool window](https://resources.jetbrains.com/help/img/idea/2026.2/cl_cmake_resetcache_toolwindow.png)

* Call Reset Cache and Reload Project using the Find Action dialog (`Ctrl+Shift+A` (Windows), `⌘ ⇧ A` (macOS), `⌘ ⇧ A` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ P` (macOS System Shortcuts), `Ctrl+Shift+A` (XWin), `Ctrl+Shift+A` (GNOME), `Ctrl+Shift+A` (KDE), `Escape, X` (Emacs), `Ctrl+Shift+P` (Sublime Text), `⌘ ⇧ P` (Sublime Text (macOS)), `⌘ ⇧ A` (Xcode), `Ctrl+Shift+A` (Visual Studio), `⌘ ⇧ A` (Visual Studio (macOS)), `Ctrl+Shift+A` (ReSharper), `⌘ ⇧ A` (ReSharper (macOS)), `Ctrl+Shift+A` (QtCreator), `⌘ ⇧ A` (QtCreator (macOS)), `Ctrl+I` (NetBeans), `Ctrl+Shift+A` (Eclipse), `⌘ 3` (Eclipse (macOS))).

> **Tip:**
> You can also [assign a shortcut](configuring-keyboard-and-mouse-shortcuts.html#add-keyboard-shortcut) to this action in `Settings | Keymap`.

> **Note:**
> Resetting CMake cache invalidates an [environment file](how-to-create-toolchain-in-clion.html#env-scripts) cache.

## See also

### Procedures

[Quick CMake Tutorial](quick-cmake-tutorial.html)

