# Does it make sense to set cmakeMinimimRequired in CMakePresets.json?

**URL:** https://discourse.cmake.org/t/does-it-make-sense-to-set-cmakeminimimrequired-in-cmakepresets-json/14285
**Category:** Usage
**Created:** [June 25, 2025, 1:09pm UTC](https://discourse.cmake.org/t/does-it-make-sense-to-set-cmakeminimimrequired-in-cmakepresets-json/14285 "2025-06-25T13:09:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![georg](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/g/9f8e36/32.png) [@georg](https://discourse.cmake.org/u/georg)
#### Post date: [June 25, 2025, 1:09pm UTC](https://discourse.cmake.org/t/does-it-make-sense-to-set-cmakeminimimrequired-in-cmakepresets-json/14285/1 "2025-06-25T13:09:31Z")

</div>

Hi all,

I am wondering if it makes sense to set the option field `cmakeMinimumRequired` in `CMakePresets.json` in addition to `cmake_minimum_required()` in the top-level `CMakeLists.txt`.

I made some experiments and it turned out that the JSON field does not has any influence on the project. It does not overwrite or set the minimum required version. It is still necessary to call the function `cmake_minimuim_required()`. Also the JSON field does not support version ranges.

Could the JSON field be used in a useful manner?

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [June 25, 2025, 8:58pm UTC](https://discourse.cmake.org/t/does-it-make-sense-to-set-cmakeminimimrequired-in-cmakepresets-json/14285/2 "2025-06-25T20:58:26Z")

</div>

The `cmakeMinimumRequired` field in CMake presets is rarely useful. The `version` field is what matters for the preset itself, and as you’ve observed, the `cmake_minimum_required()` command in the top level `CMakeLists.txt` enforces the CMake version requirement and policies.

About the only use for `cmakeMinimumRequired` that I came across was where a presets file needed to use some feature only available in a later CMake version than what the project’s own minimum was. I forget what the feature was, probably something like a CMake cache variable or an option to `ctest` or `cpack`. Outside of that sort of use case, it’s hard to come up with a reason to bother putting `cmakeMinimumRequired` in a presets file. Frankly, I almost never do.

---

<div class="post-metadata">

### Author: ![georg](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/g/9f8e36/32.png) [@georg](https://discourse.cmake.org/u/georg)
#### Post date: [June 26, 2025, 7:30pm UTC](https://discourse.cmake.org/t/does-it-make-sense-to-set-cmakeminimimrequired-in-cmakepresets-json/14285/3 "2025-06-26T19:30:19Z")

</div>

Thanks for the clarification, Craig!
