CLion 2016.1 Help

CMake. Cache

In this section:


Use this tab to change CMake caches.

Note the following:

  • The table is filled with the variables from CMakeCache.txt file on initial import.
  • The table is empty with an error message, when a cache file cannot be read, and there is no main CMakeFile in project or it is empty.
  • The table does not show Internal options, CMAKE_BUILD_TYPE and CMAKE_CACHEFILE_DIR.
  • The table is updated on reloads.
  • Adding and deleting variables is not supported.
  • Changes are not preserved on invalidating caches. Also changes to certain CMake options (e.g. CMAKE_C_COMPILER, CMAKE_CXX_COMPILER) cause the cache to be dropped and regenerated.

Refer to the CMake documentation for details.


edit1Click this button or press Enter to change the value of the selected variable.
Press Enter to update the cell.

The changed variable and its value are shown blue, until the changes are applied or dropped:


If values are not found (-NOTFOUND), they are shown red.

Click mainToolbarSave or resetProfile to apply or drop the changes.

mainToolbarSaveClick this button to apply changes and reload the CMake project. Note that the changes to the variables are not applied right away, but only after applying and reloading.
resetProfileClick this button to discard changes.
Click this button to clean the CMake cache and reload the project.
VariableThis column of the table contains the list of CMakeCache.txt on initial import.
ValueThis column contains the list of CMake variables values. Each cell of this column is editable on clicking the edit1 button.


The variables are shows color-coded:

  • Black: variables are in their default state.
  • Blue: variables are changed, but the changes are not yet applied.
  • Red: variables with the not-found values.
  • Grey: variables without values.

See Also

Languages, Frameworks and Technologies:


Last modified: 20 July 2016