FLAMEGPU / FLAMEGPU2

FLAME GPU 2 is a GPU accelerated agent based modelling framework for CUDA C++ and Python
https://flamegpu.com
MIT License
106 stars 22 forks source link

CMake 3.30 deprecates `FetchContent_Populate` #1223

Open ptheywood opened 3 months ago

ptheywood commented 3 months ago

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.