CLion 1.5 Help

CMake. Cache

In this section:

Basics

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.

Toolbox

ItemDescription
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:

CMake_toolwindowCache

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.
cl_iconCleanCMakeCache2x
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.

Legend

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:

Procedures:

Reference:

Last modified: 2 February 2016