Add native CMake context generation support - #529
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
4595c47 to
fbdf629
Compare
Parse and validate native CMake metadata, generate context-specific build wrappers, and integrate native targets and image outputs into super builds. Add fixtures and coverage for default and explicit native CMake settings.
fbdf629 to
f2293ec
Compare
|
Coverage Impact ⬇️ Merging this pull request will decrease total coverage on Modified Files with Diff Coverage (4)
🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
There was a problem hiding this comment.
Pull request overview
This PR adds first-class handling of “native CMake” contexts by parsing cmake metadata from .cbuild.yml files, generating per-context CMake wrapper projects (for configure/build/comp-db), and integrating those contexts into the solution-level super-build orchestration (including mixed-context behavior).
Changes:
- Parse, validate, and classify contexts as regular / West / native-CMake based on
.cbuild-idx.yml+.cbuild.ymlmetadata. - Generate native-CMake context wrapper
CMakeLists.txtwith targets fordatabaseandcmake, and wire those into the super CMake build graph. - Add unit + golden-file coverage and new test fixtures for native-CMake solutions.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/data/solutions/cmake-support/solution.csolution.yml | Adds a solution fixture containing native CMake projects/contexts. |
| test/data/solutions/cmake-support/solution.cbuild-idx.yml | Adds cbuild index fixture marking contexts as cmake: true. |
| test/data/solutions/cmake-support/ref/explicit-core1.Debug+CM0/CMakeLists.txt | Golden reference for generated native-CMake wrapper (minimal metadata). |
| test/data/solutions/cmake-support/ref/core0.Debug+CM0/CMakeLists.txt | Golden reference for generated native-CMake wrapper (generator/config/target/images). |
| test/data/solutions/cmake-support/out/explicit-core1/CM0/Debug/explicit-core1.Debug+CM0.cbuild.yml | Adds .cbuild.yml fixture including cmake: metadata. |
| test/data/solutions/cmake-support/out/core0/CM0/Debug/core0.Debug+CM0.cbuild.yml | Adds .cbuild.yml fixture including richer cmake: metadata (images/target/configure). |
| pkg/maker/superlists.go | Extends super-project generation to handle per-context West/native-CMake targets and native output images. |
| pkg/maker/parser.go | Adds parsing structures and validation for native-CMake context metadata and classification flags. |
| pkg/maker/parser_test.go | Adds unit tests validating parsing + classification of native-CMake contexts. |
| pkg/maker/maker.go | Routes context generation to the new native-CMake CMakeLists generator. |
| pkg/maker/maker_test.go | Adds a smoke test for native-CMake solution generation. |
| pkg/maker/cmake.go | Introduces native-CMake context wrapper CMakeLists.txt generator. |
| pkg/maker/cmake_test.go | Adds tests asserting generated native-CMake wrappers and super-project wiring. |
| cmd/cbuild2cmake/commands/root_test.go | Adds golden-file integration test for the native-CMake solution scenario. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Fixes
Changes
Checklist