# CMakePresets.json section appears too early in the cmake(1) doc

**URL:** https://discourse.cmake.org/t/cmakepresets-json-section-appears-too-early-in-the-cmake-1-doc/1998
**Category:** Development
**Created:** [October 14, 2020, 3:02am UTC](https://discourse.cmake.org/t/cmakepresets-json-section-appears-too-early-in-the-cmake-1-doc/1998 "2020-10-14T03:02:58Z")
**Posts on this page:** 4
**Page:** 1

<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: [October 14, 2020, 3:02am UTC](https://discourse.cmake.org/t/cmakepresets-json-section-appears-too-early-in-the-cmake-1-doc/1998/1 "2020-10-14T03:02:58Z")

</div>

The `CMakePresets.json` feature newly added in CMake 3.19 takes up a substantial amount of space early in the page for the `cmake(1)` documentation. It should have its own section within that page and I would suggest it should come after the generic `Options` section, not before it as it does now. This would seem a more logical flow and less overwhelming to a new user.

As an aside, the `Synopsis` seems to miss a lot of the structure of that page. It might be worth looking at whether it should turn into or be augmented by a HTML table of contents like some other documentation pages provide. Navigation could be substantially improved as a result.

Cc: @kyle.edwards

---

<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: [October 14, 2020, 3:05am UTC](https://discourse.cmake.org/t/cmakepresets-json-section-appears-too-early-in-the-cmake-1-doc/1998/2 "2020-10-14T03:05:02Z")

</div>

Another option is to consider a separate dedicated page for the `CMakePresets.json` material. That might help prevent the `cmake(1)` manual from overwhelming users who are just interested in the options that the `cmake` command line supports in its various use cases.

---

<div class="post-metadata">

### Author: ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)
#### Post date: [October 14, 2020, 7:36am UTC](https://discourse.cmake.org/t/cmakepresets-json-section-appears-too-early-in-the-cmake-1-doc/1998/3 "2020-10-14T07:36:29Z")

</div>

I agree with @craig.scott, a dedicated page for this feature seems the good approach.  
Adding some more examples can be helpful as well: I think particularly about the inheritance concept.

And to finish, is there a possibility to generate a preset from the current `CMake` configuration? I didn’t found anything about that. This facility could be greatly helpful to popularize this feature.

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [October 14, 2020, 12:47pm UTC](https://discourse.cmake.org/t/cmakepresets-json-section-appears-too-early-in-the-cmake-1-doc/1998/4 "2020-10-14T12:47:44Z")

</div>

@kyle.edwards please create a dedicated `cmake-presets(7)` manual and reference it from where the content is now. Then it can be extended with the [proposed schema](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5366).
