Update cmake plugin to support Ninja generator
Metadata
Current evaluation
Merged. Adds a cmake-generator plugin option to enable Ninja builds, leveraging CMake 3.15+ features. Reviewer suggestions were acknowledged, and the update was successfully integrated.
Suggested action: —
No scores available.
Issue body
v2 plugins are meant to be run with core20, so we can safely assume, that we have CMake version 3.16.3
CMake supports --install option since [3.15](https://cmake.org/cmake/help/v3.15/release/3.15.html#command-line), and -j option is available since [3.12](https://cmake.org/cmake/help/latest/release/3.12.html#command-line)
These improvements can fix builds with Ninja generator.
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Adds a cmake-generator plugin option to enable Ninja builds, leveraging CMake 3.15+ features. Reviewer suggestions were acknowledged, and the update was successfully integrated. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to add Ninja generator support to the CMake plugin. Introduces a cmake-generator configuration option, with reviewer feedback suggesting an enum type. Successfully enables Ninja builds for CMake projects. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Adds a cmake-generator plugin option to enable Ninja builds. Reviewers recommended an enum type for the option. The change resolves compatibility by utilizing CMake 3.15+ and 3.12+ features in core20 environments. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1579 Make it possible to use the cmake ninja generator | snapcraft | closed | Closed due to failing unit tests and lack of follow-up. The cmake plugin refactoring to support the ninja generator was abandoned pending necessary fixes. | |
| #2397 cmake plugin: use native primitives | snapcraft | merged | Merged into master. The cmake plugin replaces make with native primitives, enabling alternative build generators like ninja. Approved by reviewer, passed CI, and integrated successfully. | |
| #3288 cmake v2 plugin: add help for cmake generators | snapcraft | merged | Merged changes adding help documentation for cmake generators to the cmake v2 plugin. Approved by a reviewer, passed CI checks, and applied successfully. |