Skip to content

cmake-presets support #205

@ksrp1984

Description

@ksrp1984

I created a CMakePresets.json file containing project configurations.
I can see the list of available configurations by adding --list-presets to Other CMake arguments
I can run a configuration by adding --preset MY_CONFIG_NAME
But I can't run --build --presets and --workflow --presets.

Cmake4Eclipse adds first: -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_RULE_MESSAGES:BOOL=OFF -G "Unix Makefiles".
Cmake throws an error. Cmake expects --workflow --presets to be the first argument.

The first step would be to add the ability to run cmake with its own parameters, without adding additional arguments. I think it's not difficult to implement.

The second step would be to load configurations from CMakePresets.json. This is more complicated. I'm not sure it's possible.
But the first step would be enough. Configurations with --preset can be created manually.

CMakePresets.json is very useful when the project is distributed, and a user who does not use Eclipse can build it from the command line, or in another IDE supporting Cmake (VS, QTCreator...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions