← Back to issue list

cmake v2 plugin: take source-subdir into account

View original Github issue

Metadata

Project
snapcraft
Number
#3154
Type
pull request
State
merged
Author
sergiusens
Labels
Created
Updated
Closed

Current evaluation

Merged. Updates cmake v2 plugin to use SNAPCRAFT_PART_SOURCE_WORK instead of SNAPCRAFT_PART_SOURCE for pull and build steps, fixing source subdirectory handling. Approved, passed CI, and modified 10 files (+55/-7).

Suggested action:

No scores available.

Issue body

Setup 2 _WORK variables, for the pull and build step, use SNAPCRAFT_PART_SOURCE_WORK from get_build_commands instead of SNAPCRAFT_PART_SOURCE. Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] 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. Updates cmake v2 plugin to use SNAPCRAFT_PART_SOURCE_WORK instead of SNAPCRAFT_PART_SOURCE for pull and build steps, fixing source subdirectory handling. Approved, passed CI, and modified 10 files (+55/-7).
qwen3.6-35b-a3b-mtp-q6 Merged. Updated the cmake v2 plugin to use SNAPCRAFT_PART_SOURCE_WORK instead of SNAPCRAFT_PART_SOURCE for pull and build steps, correctly accounting for source subdirectories.
qwen3.6-35b-a3b-mtp-q6 Merged updates to the cmake v2 plugin that properly account for source-subdir by switching from SNAPCRAFT_PART_SOURCE to SNAPCRAFT_PART_SOURCE_WORK during pull and build steps.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3123 cmake v2 plugin: configure with $SNAPCRAFT_PART_SRC snapcraft merged Merged a fix updating the cmake v2 plugin to configure via $SNAPCRAFT_PART_SRC. This resolves build failures for projects verifying distinct source and build directories. Approved by one reviewer and passed CI checks.
86%
#2399 cmake plugin: use build snaps to search paths snapcraft merged Merged. Updated the cmake plugin to use build snaps for path searching. Approved by a reviewer with 96.29% diff coverage across two files (+155/-13 lines).
78%
#1825797 cmake: Shouldn't use sourcedir for building snapcraft (launchpad) open 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.
73%
#442 executor: fix subdir in pull and build steps craft-parts merged Merged fix aligning pull and build step working directories with source-subdir settings. Approved by two reviewers and passed CI. Reviewers noted potential Snapcraft breakage and recommended noting workaround removal in release notes.
72%
#841 Replace SNAPCRAFT_PART_INSTALL in the part attributes. snapcraft merged Merged after dual reviewer approval. Replaced SNAPCRAFT_PART_INSTALL references across seven files with a 70-line update. Reviewers suggested adding cmake integration tests, but the change was merged without them.
72%
#2122 many: introduce variables for part src and build snapcraft merged Merged following approval. Introduces new environment variables and replacements for part src and build directories, resolving LP #1763028. Consolidates SNAPCRAFT_* environment handling into a single location. Approved by one reviewer with passing CI checks.
72%
#250 parts: check for out of source builds craft-parts merged Merged fix for out-of-source builds with the source-subdir parameter. Added missing out-of-source checks and corrected source directory selection for cmake and meson plugins. Approved, passed CI, and merged with 221 additions and 24 deletions across 22 files.
72%
#248 fix: parts: check for out of source builds craft-parts closed Merged to fix out-of-source build detection in cmake and meson plugins, resolving source directory selection issues with the source-subdir parameter. Addresses CRAFT-1185.
72%
#3217 cmake v2 plugin: add stage to CMAKE_PREFIX_PATH snapcraft merged Merged changes to the cmake v2 plugin that add a stage to CMAKE_PREFIX_PATH, fixing core18 to core20 snap porting. Unit tests were updated to pytest. Approved and passed CI.
71%
#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.
71%