-
Notifications
You must be signed in to change notification settings - Fork 35
do not use FetchContent_Populate in CMake >= 3.28 #1300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
lukaszstolarczuk
merged 1 commit into
oneapi-src:main
from
bratpiorka:rrudnick_fix_populate
May 9, 2025
Merged
do not use FetchContent_Populate in CMake >= 3.28 #1300
lukaszstolarczuk
merged 1 commit into
oneapi-src:main
from
bratpiorka:rrudnick_fix_populate
May 9, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66719aa
to
ab67de5
Compare
bratpiorka
commented
May 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adapts the build pipeline to account for deprecation of FetchContent_Populate by selecting the appropriate CMake commands based on the version.
- Remove the "Check spelling in docs" step from the spelling checks.
- Update the CMake version in the reusable_basic workflow to use a specific version (3.29.0) instead of "latest".
Reviewed Changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
.github/workflows/reusable_checks.yml | Removed the docs spelling check step, potentially affecting documentation quality validation. |
.github/workflows/reusable_basic.yml | Updated the CMake version to 3.29.0 and renamed the install step accordingly. |
Files not reviewed (2)
- CMakeLists.txt: Language not supported
- examples/cuda_shared_memory/CMakeLists.txt: Language not supported
KFilipek
approved these changes
May 8, 2025
c860665
to
b551fcf
Compare
lukaszstolarczuk
approved these changes
May 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Starting with CMake 3.30, FetchContent_Populate is deprecated. It can be replaced by FetchContent_Declare(... EXCLUDE_FROM_ALL) + FetchContent_MakeAvailable(). However, the EXCLUDE_FROM_ALL flag is available only from CMake 3.28
This pull request checks the CMake version, and for versions <= 3.28, we use FetchContent_Populate, and for later versions, we use EXCLUDE_FROM_ALL + FetchContent_MakeAvailable.
example logs with different CMake versions:
CMake 3.14.0
https://github.com/oneapi-src/unified-memory-framework/actions/runs/14906699261/job/41871908648?pr=1300
CMake 3.29.0
https://github.com/oneapi-src/unified-memory-framework/actions/runs/14906699261/job/41871908635?pr=1300
CMake latest (3.31.6)
https://github.com/oneapi-src/unified-memory-framework/actions/runs/14906699261/job/41871908632?pr=1300
fixes #971