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 recommends FetchContent_MakeAvailable over FetchContent_Populate #2124

Open
LandryNorris opened this issue Dec 4, 2024 · 1 comment
Labels

Comments

@LandryNorris
Copy link

According to the CMake docs, FetchContent_Populate is deprecated as of 3.30. When syncing the examples, the following is printed by CMake 3.30:

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

FetchContent_MakeAvailable was added in 3.14, so to maintain compatibility with 3.13, a version check would be needed.

@LandryNorris
Copy link
Author

Currently there are two usages of FetchContent_Populate according to a search. I changed the usage in the import script when copying it into my project, and had no issues (the if check can also be removed, since MakeAvailable handles whether the content has already been populated).

@lurch lurch added the build label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants