Skip to content
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

CMake 3.30: FetchContent_Populate(package_name) is deprecated #588

Closed
Mrkol opened this issue Aug 16, 2024 · 3 comments
Closed

CMake 3.30: FetchContent_Populate(package_name) is deprecated #588

Mrkol opened this issue Aug 16, 2024 · 3 comments

Comments

@Mrkol
Copy link

Mrkol commented Aug 16, 2024

Something changed in CMake and I now get this warning every time CPM downloads a package

[cmake] CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
[cmake] Calling FetchContent_Populate(MY_PACKAGE_NAME) is deprecated, call
[cmake] FetchContent_MakeAvailable(MY_PACKAGE_NAME) instead. Policy CMP0169 can be set to OLD
[cmake] to allow FetchContent_Populate(MY_PACKAGE_NAME) to be called directly for now, but the
[cmake] ability to call it with declared details will be removed completely in a
[cmake] future version.

@Avus-c
Copy link
Contributor

Avus-c commented Aug 16, 2024

This is odd - it should've been fixed in release v0.40.1.

Did you update CPM? If the warning is still showing in the new version, could you provide a code snippet showing how you're using CPM? We may have overlooked something in the fix (#570).

@Mrkol
Copy link
Author

Mrkol commented Aug 16, 2024

Ooooh, my bad, for some reason I though that the get_cpm.cmake automatically downloads the latest version. Issue is gone after updating, thank you!

@vulptex
Copy link
Contributor

vulptex commented Mar 3, 2025

For DOWNLOAD_ONLY True packages this is still spit out:

Calling FetchContent_Populate(gcc-arm-none-eabi) is deprecated, call
  FetchContent_MakeAvailable(gcc-arm-none-eabi) instead.  Policy CMP0169 can
  be set to OLD to allow FetchContent_Populate(gcc-arm-none-eabi) to be
  called directly for now, but the ability to call it with declared details
  will be removed completely in a future version.

For some reasons, i wasn't able to use CMP0169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants