cmake: Shouldn't use sourcedir for building
Metadata
Current evaluation
CMake builds still read from SNAPCRAFT_PART_SRC, preventing patches to a build-tree copy before snapcraftctl build; current craft-parts behavior needs maintainer triage.
Suggested action: needs triage
Reason: The current craft-parts CMakePlugin reports get_out_of_source_build() as true, invokes CMake against part_src_subdir, and the part handler only copies sources into the build directory when that flag is false, so the reported limitation remains. The desired behavior is clear, but changing the plugin's source/build semantics needs compatibility review and tests; the issue has no labels, comments, or maintainer response to establish its disposition.
Evaluated by: mr-cal-bot
Impact:
47
Quick Win:
20
Complexity:
45
Confidence:
92
Actionability:
78
Issue body
Currently cmake plugin runs configuration using the files in SNAPCRAFT_PART_SRC, IMO it should copy them to SNAPCRAFT_PART_BUILD and run against it so that one can patch these files in the build step (before running `snapcraftctl build`).
https://github.com/snapcore/snapcraft/blob/3d4483d6f48d7cc212b9b472438758881252a08a/snapcraft/plugins/cmake.py#L114
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
47
Quick Win:
20
Complexity:
45
Confidence:
92
Actionability:
78
|
needs triage | CMake builds still read from SNAPCRAFT_PART_SRC, preventing patches to a build-tree copy before snapcraftctl build; current craft-parts behavior needs maintainer triage. | |
| stealth/space-bunny-alpha |
Impact:
28
Quick Win:
7
Complexity:
54
Confidence:
94
Actionability:
55
|
close stale | The legacy CMake plugin kept pulled sources immutable by configuring from SNAPCRAFT_PART_SRC rather than a copied build tree; modern CMake builds are out-of-source. | |
| qwen/qwen3.8-27b |
Impact:
30
Quick Win:
22
Staleness:
95
Complexity:
25
Confidence:
85
Support Request:
10
|
close stale | Request for cmake plugin to use out-of-source builds (build in SNAPCRAFT_PART_BUILD instead of SNAPCRAFT_PART_SRC). 2689 days old, no labels, no comments, no maintainer interaction. The current craft-parts cmake plugin already implements out-of-source builds via get_out_of_source_build() returning True. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
35
Confidence:
95
Support Request:
15
|
close stale | Request to change cmake plugin to use out-of-source builds instead of running configuration in the source directory. Issue is completely inactive and references a legacy plugin architecture. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
45
Confidence:
90
Support Request:
10
|
close stale | CMake plugin runs configuration in the source directory instead of the build directory, blocking pre-build patching. Unlabeled, no maintainer response, inactive for over seven years. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
98
Complexity:
25
Confidence:
85
Support Request:
15
|
close stale | cmake plugin configures builds in the source directory instead of the build directory, blocking patching during the build step. The issue is seven years old with no maintainer engagement or labels. |
Update history
| Date | Change |
|---|---|
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3123 cmake v2 plugin: configure with $SNAPCRAFT_PART_SRC | snapcraft | merged | Merged in 6c6644476: the cmake v2 plugin now configures with $SNAPCRAFT_PART_SRC, preventing errors in projects that require separate source and build directories. | |
| #3154 cmake v2 plugin: take source-subdir into account | snapcraft | merged | Merged as 2a58a4e5c, updating the CMake v2 plugin to honor source-subdir by using SNAPCRAFT_PART_SOURCE_WORK for pull and build work directories. |