CMake presets

Last modified: 25 July 2022

CMake Presets are a way to configure and share CMake options using two files:

  • CMakePresets.json for project-wise builds. This file can be shared via VCS.

  • CMakeUserPresets.json for developers' own local builds. This file should not be checked into VCS.

Both CMakePresets.json and CMakeUserPresets.json have the same format and should be located in the project's root directory.

CMake Profiles have many settings in common with CMake Presets and are also shareable via VCS. The major difference is that profiles reference CLion toolchains, which contain information that is not present and not needed in CMake presets (like the debugger or environment settings).

Issues and nearest plans for CMake Presets support are listed as subtasks in this ticket: CPP-25018. The general parent task is CPP-22906.