Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Add support for CMake presets #32

Open
shrkamat opened this issue Apr 26, 2022 · 3 comments
Open

Add support for CMake presets #32

shrkamat opened this issue Apr 26, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@shrkamat
Copy link

shrkamat commented Apr 26, 2022

Describe the problem or limitation you are having
CMake has come up with this cool feature called presets to support common build configurations. Request to add support for CMake presets.

Describe the solution you'd like
Allow listing of presets and selecting preset similar to select_target

Describe alternatives you've considered

NA / None

Additional context

documentation
demo

Steps

pip install cmake-init
cmake-init SDK
# input sane defaults
cd SDK
cmake --list-presets
cmake --preset dev-unix
cmake --build build/dev-unix --target all

Screenshot
asciinema cast

@maikelmeyers
Copy link

So far, none of the vim/neovim plugins seem to support this feature. But there are more and more projects that use it. In these projects, you can't use these plugins, which is a pity. The Cmake plugin from VSCode has this feature integrated right away. I really hope that the vim/neovim plugins will follow suit. The cmake-presets are very comfortable.

@Shatur
Copy link
Owner

Shatur commented Aug 10, 2022

I totally understand, I just don't use it currently. But PR is very welcome.

@maikelmeyers
Copy link

maikelmeyers commented Aug 10, 2022

Just for reference here: https://github.com/microsoft/vscode-cmake-tools/blob/HEAD/docs/cmake-presets.md

It would be enough if the preset mode is activated as soon as a CMakePresets.json is present.

Then it only needs a few elements:

  1. Selecting one of the Configurean Build presets from the existing ones.
  2. configure or builds are called with the selected presets.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants