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 deprecates FetchContent_Populate #1223

Open
1 of 3 tasks
ptheywood opened this issue Aug 22, 2024 · 0 comments
Open
1 of 3 tasks

CMake 3.30 deprecates FetchContent_Populate #1223

ptheywood opened this issue Aug 22, 2024 · 0 comments

Comments

@ptheywood
Copy link
Member

ptheywood commented Aug 22, 2024

CMake 3.30 deprecates calling FetchContent_Populate with a single argument.

preferring FetchContent_MakeAvailable() should be preffered or FetchContent_Populate with atleast one extra argument must be used.

We've previously used FetchContent_Populate as older versions of FetchContent_MakeAvailable did not provide functionality we require (i.e. fetching projects which are not CMake projects).

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

See https://cmake.org/cmake/help/latest/policy/CMP0169.html

Unfortunately, this deprecation warning does not respect CMAKE_WARN_DEPRECATED, which combined with -Werror=dev means that CI is reporting failures.


Short term, we chould be able to set the policy to OLD for existing behaviour to continue functioning until the behaviour is removed.

Long term, we will need to replace all uses of FetchContent_Populate(<name>) with one of the alternatives.
We may need to maintain the current paths if the new forms require CMake > 3.18.

  • Fix CI short term
  • Long term fix
  • Apply similar long-term fixes to all the standalone repos which fetch flamegpu2 via fetch_content
ptheywood added a commit that referenced this issue Aug 22, 2024
Sets policy CMP0169 to OLD to prevent dev warnings related to FetchContent_Populate(<name>).

This needs fixing propperly for longer term support, see #1223
ptheywood added a commit that referenced this issue Sep 4, 2024
Sets policy CMP0169 to OLD to prevent dev warnings related to FetchContent_Populate(<name>).

This needs fixing propperly for longer term support, see #1223
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

1 participant